15,466
社区成员
发帖
与我相关
我的任务
分享
CWnd wnd;
CWnd *pWnd = wnd.FindWindow(NULL, "Game name");
if (pWnd == NULL)
MessageBox(0, "un found", 0, 0);
CDlg dlg(pWnd);
dlg.DoModal();
CWnd wnd;
CWnd *pWnd = wnd.FindWindow(NULL, "Game name");
if (pWnd == NULL)
MessageBox(0, "un found", 0, 0);
CDlg dlg(pWnd);
dlg.ShowWindow(SW_SHOW);
MSG msg;
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
if(bThreadInjected) return 0;
TCHAR szPath[MAX_PATH];
::GetModuleFileName(hDllInstance, szPath, MAX_PATH);
if(!(hInjectedThreadDll = ::LoadLibrary(szPath))) return 0;
hInjectingDialog = CreateDialog(hDllInstance, (LPCTSTR)IDD_DIALOG_PRESSKEYSIMULATOR, hCurrentWindow, (DLGPROC)PressKeySimulatorDlgProc);
if(hInjectingDialog == NULL)
{
ShowLastErrorMessage(hCurrentWindow);
return FALSE;
}
ShowWindow(hInjectingDialog, SW_SHOW);
bThreadInjected = TRUE; // for StartInjectWindowThread return