标签:roc eww 设置 set 窗口 window result vat get
WNDPROC g_pOldProc = NULL;
LRESULT CALLBACK NewWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_ACTIVATE:
printf("NewWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam).....WM_ACTIVATE\n");
break;
}
//继续调用原来的窗口过程函数
return CallWindowProc(g_pOldProc, hwnd, message, wParam, lParam);
}
...更改
{
HWND t_handle=.....;
g_pOldProc = (WNDPROC)GetWindowLong(t_handle, GWL_WNDPROC);//获取旧的窗口过程函数指针保存
SetWindowLong(t_handle, GWL_WNDPROC, long(NewWndProc));//设置新的窗口过程函数
}
.....还原
{
HWND t_handle=.....;
SetWindowLong(t_handle, GWL_WNDPROC, (long)g_pOldProc);//恢复旧的过程函数
}
标签:roc eww 设置 set 窗口 window result vat get
原文地址:https://www.cnblogs.com/lidabo/p/11425630.html