I've got this slice code inside a DLL:
Why id doesn't show any Dialog?Code:DWORD processId; HWND hwndParent; BOOL CALLBACK enumWindowsProc(HWND hwnd, LPARAM lParam) { DWORD procid; GetWindowThreadProcessId(hwnd, &procid); if (procid == processId) { hwndParent = hwnd; return FALSE; } return TRUE; } const char* InputBox(LPCSTR title, const char* message, const char* def_value) { HWND hwnd; MSG msg; processId = GetCurrentProcessId(); EnumWindows(enumWindowsProc, 0); int ret = DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_IB), hwndParent, InputBox_WndProc); return "0"; }
Thanks a lot.




Reply With Quote