Visual c++: launch a hyperlink in default browser

Posted on 2003-03-11
Medium Priority
Last Modified: 2010-05-18
Hello guys (and girls?).

I think this should be simple, but i can't find out how to do it:

1. Inside a Visual C++ program i have a hyperlink, and now want to launch the default browser (eg. Internet explorer), with the given hyperlink.

2. Furthermore the link is visible in the program, so it should look and feel like a hyperlink (blue, underlined AND mousecurser changes to 'hand' when moving over it).

Hope you can help me.
Question by:jim_k_l
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8114225
You could write your own, but there a lot of such controls out there.  Check out:

Expert Comment

ID: 8115981

   string hyperlink = "http://www.experts-exchange.com";
   HWINDOW handle = self.Handle; // Borland style, modify this for VC++
   ShellExecute(handle, 'open', hyperlink, nil, nil, 0);



Accepted Solution

Kocil earned 225 total points
ID: 8115989
I mean ...

ShellExecute(handle, 'open', hyperlink, NULL, NULL, 0);

I was confused with Delphi :)

Author Comment

ID: 8120161
Great, thanks a lot.
The VC++ way is:

CString hyperlink = "http://www.experts-exchange.com";
ShellExecute(m_hWnd, "open", hyperlink, NULL, NULL, 0);

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question