CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 1999
    Location
    Malaysia
    Posts
    99

    Make an internet link in the GUI

    How to make an internet link in the GUI by using VC++.
    Lets say I want to link the user to certain web site, when he/she click an button or a link.

    TY

  2. #2
    Join Date
    Oct 1999
    Location
    MS/India
    Posts
    132

    Re: Make an internet link in the GUI

    Make some text control or any actveX control to receive click event.

    e.g.

    www.microsoft.com

    and in the click event mapping write the code to shell execute the Internet explorer or Netscape Navigator with command line parameter as your website address.

    for this you have to use

    ShellExecute() API

    best luck.

    The bug is Human, to debug it, is divine !!

  3. #3
    Join Date
    Jul 1999
    Location
    Israel
    Posts
    1,793

    Re: Make an internet link in the GUI

    Hi check this code:

    void CMyClass::OnAnyButton()
    {
    ShellExecute(NULL,"open","www.codeguru.com",NULL,NULL,SW_MAXIMIZE);

    }





    HTH
    kishk91

    [email protected]
    http://www.path.co.il
    ICQ: 13610258

  4. #4
    Join Date
    Jul 1999
    Location
    Moscow, Russia
    Posts
    667

    Re: Make an internet link in the GUI

    Hi,
    For button create command handler like this:

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




    Good luck,
    Oleg.


  5. #5
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: Make an internet link in the GUI

    If you have a hunt through the code samples on CodeGuru, you will find some hyperlink classes which add proper hyperlink-look links. They are configurable and make it look like the real thing.

    The search facility should help to get to those samples quicker.



    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured