|
-
January 12th, 2009, 04:39 AM
#1
How can set Hand Cursor on Hyperlink?
Hi all,
i have static text for mailto and website.and it is working as hyperlink perfectly.
only one problem is there the hand cursor not display when i move mouse on this.
please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
-
January 12th, 2009, 04:51 AM
#2
Re: How can set Hand Cursor on Hyperlink?
Could this article help you?
Victor Nijegorodov
-
January 12th, 2009, 04:56 AM
#3
Re: How can set Hand Cursor on Hyperlink?
if you are using MS VS C++ on Form, linklabel will benefit. Change the cursor easy and U can add in other curosr also. it offers many event handlings, you don't need to rewrite like you do in previous MfC
-
January 12th, 2009, 10:19 AM
#4
Re: How can set Hand Cursor on Hyperlink?
Which version of VC/MFC are you using? Since VS2003, MFC has supported (though barely documented) the SysLink control. In VS2008, it is part of the resource toolbox and can be dragged and dropped onto the dialog just like any other control. In VS2005 and earlier, you need to "remind" the compiler that it is there. Drop a custom control on your dialog; in properties, change the "Class" to "SysLink" and change the "ID" to "IDC_SYSLINK1". After that, the right-click menu will show up and things like "Add Event Handler" will become active. To make a valid link, add something like this to the "Caption" in properties:
Code:
<A HREF="http://www.google.com">www.google.com</A>
Use "Add Event Handler" to add code for your NM_CLICK event, but again, VS2005 and prior don't implement this quite correctly and omit the normal step of recasting the notification header for you, so add the line:
Code:
PNMLINK pNMLink = (PNMLINK) pNMHDR;
to take full advantage of the notification message.
A typical example of this for an about box would look like this:
Code:
void CAboutDlg::OnNMClickSyslink1(NMHDR *pNMHDR, LRESULT *pResult)
{
PNMLINK pNMLink = (PNMLINK) pNMHDR;
if(pNMLink->item.szUrl[0]){
ShellExecute(m_hWnd,NULL,pNMLink->item.szUrl,NULL,NULL,1);
}
*pResult = 0;
}
The SysLink control also supports "ID" tags for linking to other executables. See help on "Syslink COntrol Reference" for mode documentation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|