Hi,
I am implementing a Win32 DLL project. In this dll I developed a dialogbox.
In order to export the dialogbox, I did the following things.
1. define a function called Test()
int Test() {
return DialogBox(NULL, MAKEINTRESOURCE(IDD_DIALOG),NULL, DlgProc);
}
2. export this Test() function.
The problem I encountered was the dialogbox did not show up. The DialogBox()
returned a -1 indicating it failed to create the dialogbox. So I called
GetLastError() and got the error code 1812, which indicates "The specified
image file did not contain a resource section.".
I am pretty sure the Test() function was successfully exported because I got
some results if I replace the DialogBox() with other functions.
I stuck there for tens of hours so if you have any clues or ideas, please
drop me a line. I deeply appreciate your help.
THanks,
Hu