您的位置:程序门 -> vc/mfc -> 进程/线程/dll



请问(光标形状改变的消息)能不能被钩到?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请问(光标形状改变的消息)能不能被钩到?
发表于:2007-07-03 23:33:09 楼主
如果能,具体是什么消息,它的参数各表示什么?如果不能,用挂钩api的方法是钩setcursor()吧?还有没有可以钩的api!
发表于:2007-07-04 08:27:511楼 得分:0
try   to   hook   wm_setcursor,   you   may   need   to   hook   api   -  
setcursor,   showcursor,   clipcursor.
发表于:2007-07-04 09:11:022楼 得分:0
yjgx007       try   to   hook   wm_setcursor

你的意思是wm_setcursor消息中有光标改变的信息,那么可以通过sendmessage(hwnd,wm_setcursor,wparam,lparam)来把光标设置成自定义的光标。如果我的光标资源id为idc_mycurosr,那我怎么填写wparam和lparam。
发表于:2007-07-04 09:14:563楼 得分:0
hhook   setwindowshookex(
    int   idhook,                 //   type   of   hook   to   install
    hookproc   lpfn,           //   address   of   hook   procedure
    hinstance   hmod,         //   handle   to   application   instance
    dword   dwthreadid       //   identity   of   thread   to   install   hook   for
);

设idhook   =   wh_getmessage
发表于:2007-09-19 13:42:574楼 得分:0
这个能钩到吗?怀疑!
发表于:2007-09-27 20:28:275楼 得分:0
资源是idc_mycurosr,你必须先   loadcursor(hinst,   makeintresource(idc_mycurosr));  
setclasslong(wparam,         //   window   handle     wparam就是窗口句柄  
        gcl_hcursor,             //   change   cursor  
        (long)   hcurs2);       //   new   cursor  


快速检索

最新资讯
热门点击