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.
Printable View
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.
Could this article help you?
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
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:
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:<A HREF="http://www.google.com">www.google.com</A>
to take full advantage of the notification message.Code:PNMLINK pNMLink = (PNMLINK) pNMHDR;
A typical example of this for an about box would look like this:
The SysLink control also supports "ID" tags for linking to other executables. See help on "Syslink COntrol Reference" for mode documentation.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;
}