Board index » cppbuilder » Newbie: OnClick Open IE & pass URL

Newbie: OnClick Open IE & pass URL

This is my first post and I'm not too sure if I'm placing it in the
right group. I've read through most of the different groups and this one
seems to be the most appropriate.

I'm trying to open up Internet Explorer or Netscape and pass it a URL
via an onCLick event.  I've seen it done before using a menu or images,
but I can't find any code examples. Where should I look to find some
reference material, or does anyone have an example of this already being
done?

 

Re:Newbie: OnClick Open IE & pass URL


If all you want to do is display the URL in general, then use ShellExecute()
from the Win32 API for that:

    #include <shellapi.h>

    ShellExecute(NULL, "open", "http://www.address.com", 0, 0,
SW_SHOWNORMAL);

If you want to display the URL in a browser window that is already currently
opened, then you need to delve into DDE instead.  Both IE and Netscape
support DDE commands.

Gambit

"Power Mac 9500" <damo...@bellsouth.net> wrote in message
news:3C6C7350.2020303@bellsouth.net...

Quote
> I'm trying to open up Internet Explorer or Netscape and pass it a URL
> via an onCLick event.  I've seen it done before using a menu or images,
> but I can't find any code examples. Where should I look to find some
> reference material, or does anyone have an example of this already being
> done?

Other Threads