Re: DialogBox show nothing
The best way is to do as they say here http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx i.e. call GetLastError.
Re: DialogBox show nothing
Quote:
Originally Posted by
anrapas
I've got this slice code inside a DLL:
Code:
...
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.
Re: DialogBox show nothing
I've found the error.
I use to call the DialogBox function with GetModuleHandle(NULL) instead of DLL HINSTANCE value (provided as first parameter at APIENTRY DllMain function).
Thanks a lot.