开发者

How can I make a url embedded in the about dialog box appear as a hyperlink? (resource script .rc)

I have an application written in c that has no dialog box. However, when you right click the icon you get a floating menu and from there you can choose the about option. This will open an about dialog box. I have inside a link to some webpage, that can be pressed- that wil开发者_运维问答l open a browser and navigate to the URL. However, I am unable to make that URL appear as a hyperlink (all that GUI related work is done via the resource .rc file only).

Does anyone know how to color that link in blue and underline to make it appear as a hyperlink through resource script only?

Thank you


I haven't tried this myself but it looks like you can use the CONTROL statement in the resource script to include the SysLink class (which requires common controls v6/Win XP, and will therefore mean you also need a manifest in your application). For more details see http://msdn.microsoft.com/en-us/library/bb760706%28VS.85%29.aspx.

However, you will need to handle the notification from the SysLink control in order to launch the browser and you would need to call InitCommonControlsEx() before the dialog resource is used. That might stop all your GUI work being done by the rc file.

Another alternative would be to register a new window class, subclass from the SysLink control and customise the window message that would normally send the click notification to the parent in order to launch the browser. You could then use your custom class name in a CONTROL statement in the rc file. You still have more work to do but all the GUI handling would be done for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜