Owen
Owen

Reputation: 4173

MFC : creating a hyperlink in a button

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.

Upvotes: 2

Views: 2932

Answers (2)

Serge Wautier
Serge Wautier

Reputation: 21898

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).

Upvotes: 4

Nick Dandoulakis
Nick Dandoulakis

Reputation: 43158

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.

Upvotes: 0

Related Questions