在插件中为WM_NCHITTEST返回HTTRANSPARENT

时间:2011-09-09 17:51:40

标签: c winapi plugins hook

我怎样才能获得一个插件,让程序通过窗口进行点击?我听说我必须为WM_NCHITTEST返回HTTRANSPARENT。挂钩是否可以做到这一点?就我所知,这就是我的意思:

LRESULT CALLBACK myHook(int nCode, WPARAM wParam, LPARAM lParam) 
{
    CWPSTRUCT* pwp = (CWPSTRUCT*)lParam;

    if (nCode >= 0)
    {
    if (pwp->message==WM_NCHITTEST)
        MessageBox(NULL, TEXT("NCHITTEST has been receieved."), TEXT("NCHITTEST"), MB_ICONINFORMATION);                
    }

    return CallNextHookEx(hHook,nCode,wParam,lParam);
}

0 个答案:

没有答案