Launch web page from my application

前端 未结 6 769
误落风尘
误落风尘 2021-02-14 09:43

Ok, this probably has a really simple answer, but I\'ve never tried to do it before: How do you launch a web page from within an app? You know, \"click here to go to our FAQ\",

6条回答
  •  醉话见心
    2021-02-14 10:49

    Please read the docs for ShellExecute closely. To really bulletproof your code, they recommend initializing COM. See the docs here, and look for the part that says "COM should be initialized as shown here". The short answer is to do this (if you haven't already init'd COM):

    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)

提交回复
热议问题