CMain *pmain=NULL;
HWND GameHwnd=NULL;
LRESULT CALLBACK Gameproc(
__in int code,
__in WPARAM wParam,
__in LPARAM lParam
)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
PMSG pmsg=(PMSG)lParam;
if (pmsg->message==WM_KEYUP)
{
if (pmsg->wParam==VK_HOME)
{ int n=0;
if (n>0)
{
return CallNextHookEx(0,code,wParam,lParam);
}
if (pmain==NULL)
{
GameHwnd=pmsg->hwnd;
pmain=new CMain();
pmain->Create(IDD_D_Main);
pmain->ShowWindow(TRUE);
HWND GameHwnd=NULL;
LRESULT CALLBACK Gameproc(
__in int code,
__in WPARAM wParam,
__in LPARAM lParam
)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
PMSG pmsg=(PMSG)lParam;
if (pmsg->message==WM_KEYUP)
{
if (pmsg->wParam==VK_HOME)
{ int n=0;
if (n>0)
{
return CallNextHookEx(0,code,wParam,lParam);
}
if (pmain==NULL)
{
GameHwnd=pmsg->hwnd;
pmain=new CMain();
pmain->Create(IDD_D_Main);
pmain->ShowWindow(TRUE);
}else
{
if (pmain->IsWindowVisible())
{
pmain->ShowWindow(FALSE);
}
else
{
pmain->ShowWindow(TRUE);
}
}
}
}
return CallNextHookEx(0,code,wParam,lParam);
}
解决方案
40
Gameproc 是怎么被设置的啊