Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29271 Discussions

How to add a hyperlink to dialog box?

shawnxpx
Beginner
567 Views
I am programming with CVF V6.6, and want to add a simple hyperlinkof web sitein a dialog box. It seems to me that no hyperlink control is available in CVF V6.6 package, and there is no discription about this in CVF manual and related books.
I would appreciate if someonecan show me the wayto do it.
Thank you for help in advance.
Shawn
0 Kudos
3 Replies
anthonyrichards
New Contributor III
567 Views

All you need to do is supply a button, that when pressed, opens your browser with the link displayed as text on the button. So if your hyper -link is, for example "http://www.microsoft.com", you can change the text on the button to show this then, when the button is pressed it needs to activate a call-back routine that can issue the text in system command (use SYSTEM or SYSTEMQQ)

' iexplore "http://www.microsoft.com" '

(note the underlining in the above has been added by the messageboard software)

0 Kudos
Steven_L_Intel1
Employee
567 Views
I prefer using the Win32 API routine ShellExecute to opem a URL. It will do so in the registered browser of the user's choice. Just doing "iexplore" in a SYSTEMQQ may not work as that is probably not in the PATH.
0 Kudos
shawnxpx
Beginner
567 Views

Thank you both for helpful sugestions which solved my problem. The callback codes I used for the button control are

iret = ShellExecute(ghwndMain,NULL, "http://www.microsoft.com", NULL, NULL, SW_SHOWNORMAL)

which works well directly without any trouble. I have tried

iret = SYSTEM('iexplore "http://www.microsoft.com "')

whichdid not work.By running this, the program tried to open a console window, and then failed to open it. Maybesome window parameters need to be set by some extra codes before running this.

Shawn

0 Kudos
Reply