开发者

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;
     }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜