Syslink control - normal (double) click notification?
Normal statics have SS_NOTIFY for recieving (double)clicks. How can I handle the same events for Syslink controls when "normal" text within them is clicked,开发者_运维知识库 not the link?
I don't believe there's any easy approach. Probably the easiest is to superclass a syslink and handle WM_LBUTTONDOWN
/WM_LBUTTONUP
. You could also subclass, but There's little difference in difficulty for a less flexible solution.
see here sample code:
case WM_NOTIFY:
//NMHDR* pHeader = (NMHDR*)lParam;
//NMLINK* pNMLink = (NMLINK*)lParam;
//LITEM iItem = pNMLink->item;
switch(((NMHDR *)lParam)->code)
{
case NM_CLICK:
{
if(int(wParam) == IDC_SYSLINK_LOGIN)
{
//do something
return (INT_PTR)TRUE;
}
}
break;
}
精彩评论