MFC : creating a hyperlink in a button
-
05-07-2019 - |
Question
Is there an easy way in MFC to add a hyperlink in a button? I've searched the net and they seem to offer complicated stuff.
Thanks.
Solution
This video shows how to use the SysLink common control (CLinkCtrl). Beware that MFC support for this control is new and requires VS2008 and the Feature Pack.
Bear in mind that the SysLink control is XP+. If you have to support older platforms, or if you use an older VS, your best bet is probably the good old CStaticLink by Paul DiLascia (RIP).
OTHER TIPS
MFC doesn't implement buttons with hyperlinks (actually win32 common buttons don't support it).
You'll have to use 3rd party buttons.
One option is to use the FooButton class which supports hyperlinks.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow