Link to home
Start Free TrialLog in
Avatar of sunil_djoshi
sunil_djoshi

asked on

Button as hyperlink in MFC

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
Avatar of Daniel Junges
Daniel Junges
Flag of Brazil image

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
ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sunil_djoshi
sunil_djoshi

ASKER

Hi junges
Thanks a lot fpr the answer and sorry for the late reply
 your solution works very fine
thanks a lot
Sunil Joshi
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]