Jump to content
  • Advertisement
Sign in to follow this  
pepeland

How i can insert a link on a dialog can open a web page in IE?

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

(in a win32 program with visual c++) How i can insert a link on a dialog can open a web page in IE. (Without MFC)

Share this post


Link to post
Share on other sites
Advertisement
I forget its technical name, but using the Win32 API, you can make a "subclass" of any standard Windows component. For this application, I would pick a Static Text component. Then, you just set your new component's WM_LBUTTONDOWN message to open the registered browser to the given link.


//...
oldWindowProcedure=GetWindowLong(hWndOfHTMLLink,GWL_WNDPROC);
SetWindowLong(hWndOfHTMLLink,GWL_WNDPROC,newWindowProcedure);
//...
// Inside newWindowProcedure
CallWindowProc(oldWindowProcedure,hWndOfHTMLLink,Msg,wParam,lParam);
//...

Share this post


Link to post
Share on other sites
Maybe I've not understood your question [grin].
My solution is:

system("explorer www.gamedev.net");

That's will open www.gamedev.net on IE.
I hope it can be helpful. [grin]

Share this post


Link to post
Share on other sites
in your msg rpoc for your dialog box
in the comman case
where the switch is for different buttons

case 101: //the resource id of the button
ShellExecute(Handle, "open", "http://www.website.com",
NULL,NULL,SW_SHOWDEFAULT);
return 0;

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!