[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Button as hyperlink in MFC

Posted on 2004-03-24
6
Medium Priority
?
655 Views
Last Modified: 2012-08-13
Hi all
  I am drawing bitmap image on a button and now I want to make the button as hyperlink in MFC.
Is there any way in MFC ?
Thanks
With Regards
Sunil Joshi
0
Comment
Question by:sunil_djoshi
[X]
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
6 Comments
 
LVL 14

Expert Comment

by:Daniel Junges
ID: 10667041
Captute BN_CLICKED event and then execute the link with CreateProcess, it will open you default browser:
PROCESS_INFORMATION pi;
CreateProcess("http:\\myhost.com", 0, 0, 0, FALSE, CREATE_NEW_CONSOLE, 0, 0, 0, &pi);

If you want to change the cursor on mouse over, then you need to capture the mouse enter and exit. Please read the follow thread, it treats exactly this issue:

http://groups.google.com/groups?threadm=32475699.579A%40ix.netcom.com&rnum=2
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 800 total points
ID: 10675121
Another (similar) option...
In your OnClickXxxxx handler, use ShellExecute, like so:

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

-- Dan
0
 

Author Comment

by:sunil_djoshi
ID: 10746620
Hi junges
Thanks a lot fpr the answer and sorry for the late reply
 your solution works very fine
thanks a lot
Sunil Joshi
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10747088
sunil_djoshi,
The best way to thank an EE Expert is to click the [Accept] button next to his comment, then select the "Excellent" radio button and click [Submit]
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

In this post we will learn different types of Android Layout and some basics of an Android App.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project

650 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