Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
...
EnumWindows(enumWindowsProc, 0);
int ret = DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_IB), hwndParent, InputBox_WndProc);
Why id doesn't show any Dialog?
Why should it show anything?
Does IDD_IB template exist?
What is hwndParent? Is it a valid handle?
What is InputBox_WndProc?
You have to debug your code to be sure all the parameters passed in the DialogBox(...) are valid!
And of course you have to use GetLastError (as S_M_A already mentioned) to obtain the extended error information if some error happened.
I use to call the DialogBox function with GetModuleHandle(NULL) instead of DLL HINSTANCE value (provided as first parameter at APIENTRY DllMain function).
Bookmarks