用模式对话框能显示出来,但鼠标移上去还是看不到。
技术文章中有模式文章:“在DirectX下弹出对话框 ”
http://www.csdn.net/develop/Read_Article.asp?Id=15381
15 个解决方案
#1
呼出前先调用IDIRECTSURFACE->FlipToGDISurface()
#2
同时要suspend该进程里面的其他所有线程
#3
DIRECTX全屏游戏
应该比较特殊~
应该比较特殊~
#4
没人知道吗?
#5
你的对话框资源里面一定没有visible 哦?
不改资源就加函数ShowWindow()也行....
不改资源就加函数ShowWindow()也行....
#6
建议使用DirectInput
#7
顶,我也遇到同样的问题~
#8
真的没有人知道了吗?
#9
我也碰到这样的问题
#10
gz
#11
你再出对话框之前先showcursor一下。
#12
他的是窗口弹不到最顶,和鼠标没关系呀
#13
//today i implement an example like this ,maybe help you
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//if(((DWORD)lParam & 0x40000000) && (HC_ACTION == nCode));
WORD wKey = (WORD)wParam;
if((HIWORD(lParam) & KF_UP) == 0 && HC_ACTION == nCode)
{
if(wKey == VK_ADD)//是热键
{
//获取前台窗口(游戏窗口)
HWND hWnd = ::GetForegroundWindow();
if(!g_bExist )
{
g_pDlg = new CNetClientDlg;
g_pDlg->Create(IDD_STATDIALOG, CWnd::FromHandle(hWnd));
g_pDlg->ShowWindow(SW_SHOW);
g_bExist=1;
}
}
}
LRESULT RetVal = CallNextHookEx(g_hKeyHook, nCode, wParam, lParam );
return RetVal;
}
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//if(((DWORD)lParam & 0x40000000) && (HC_ACTION == nCode));
WORD wKey = (WORD)wParam;
if((HIWORD(lParam) & KF_UP) == 0 && HC_ACTION == nCode)
{
if(wKey == VK_ADD)//是热键
{
//获取前台窗口(游戏窗口)
HWND hWnd = ::GetForegroundWindow();
if(!g_bExist )
{
g_pDlg = new CNetClientDlg;
g_pDlg->Create(IDD_STATDIALOG, CWnd::FromHandle(hWnd));
g_pDlg->ShowWindow(SW_SHOW);
g_bExist=1;
}
}
}
LRESULT RetVal = CallNextHookEx(g_hKeyHook, nCode, wParam, lParam );
return RetVal;
}
#14
我也想知道
#15
同意 kingzai(studying C#) 记得要加AFX_MANAGE_STATE(AfxGetStaticModuleState());
#1
呼出前先调用IDIRECTSURFACE->FlipToGDISurface()
#2
同时要suspend该进程里面的其他所有线程
#3
DIRECTX全屏游戏
应该比较特殊~
应该比较特殊~
#4
没人知道吗?
#5
你的对话框资源里面一定没有visible 哦?
不改资源就加函数ShowWindow()也行....
不改资源就加函数ShowWindow()也行....
#6
建议使用DirectInput
#7
顶,我也遇到同样的问题~
#8
真的没有人知道了吗?
#9
我也碰到这样的问题
#10
gz
#11
你再出对话框之前先showcursor一下。
#12
他的是窗口弹不到最顶,和鼠标没关系呀
#13
//today i implement an example like this ,maybe help you
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//if(((DWORD)lParam & 0x40000000) && (HC_ACTION == nCode));
WORD wKey = (WORD)wParam;
if((HIWORD(lParam) & KF_UP) == 0 && HC_ACTION == nCode)
{
if(wKey == VK_ADD)//是热键
{
//获取前台窗口(游戏窗口)
HWND hWnd = ::GetForegroundWindow();
if(!g_bExist )
{
g_pDlg = new CNetClientDlg;
g_pDlg->Create(IDD_STATDIALOG, CWnd::FromHandle(hWnd));
g_pDlg->ShowWindow(SW_SHOW);
g_bExist=1;
}
}
}
LRESULT RetVal = CallNextHookEx(g_hKeyHook, nCode, wParam, lParam );
return RetVal;
}
LRESULT __declspec(dllexport)__stdcall CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
//if(((DWORD)lParam & 0x40000000) && (HC_ACTION == nCode));
WORD wKey = (WORD)wParam;
if((HIWORD(lParam) & KF_UP) == 0 && HC_ACTION == nCode)
{
if(wKey == VK_ADD)//是热键
{
//获取前台窗口(游戏窗口)
HWND hWnd = ::GetForegroundWindow();
if(!g_bExist )
{
g_pDlg = new CNetClientDlg;
g_pDlg->Create(IDD_STATDIALOG, CWnd::FromHandle(hWnd));
g_pDlg->ShowWindow(SW_SHOW);
g_bExist=1;
}
}
}
LRESULT RetVal = CallNextHookEx(g_hKeyHook, nCode, wParam, lParam );
return RetVal;
}
#14
我也想知道
#15
同意 kingzai(studying C#) 记得要加AFX_MANAGE_STATE(AfxGetStaticModuleState());