开发者

Syslink control - normal (double) click notification?

开发者 https://www.devze.com 2023-02-26 21:27 出处:网络
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 be

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

精彩评论

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

关注公众号