Adding Dialog to mdi mfc app
-
I have created a dialog and it's corresponding class, but when I call DoModal(), the dialog does not appear. DoModal returns -1, and GetLastError() returns 1812. I'm not sure what these codes mean, any help is appreciated. -Alan
MSDN says error 1812 is: 1812 The specified image file did not contain a resource section. ERROR_RESOURCE_DATA_NOT_FOUND Artificial intelligence is no match for natural stupidity. Never argue with an idiot. They will drag you down to their level where they are an expert.
-
I have created a dialog and it's corresponding class, but when I call DoModal(), the dialog does not appear. DoModal returns -1, and GetLastError() returns 1812. I'm not sure what these codes mean, any help is appreciated. -Alan
Try using the "Error Lookup" application that comes with Visual Studio (it's also part of VC6). For 1812, it sounds like the resource for the dialog was not found. This can happen if you manually edit resource.h. Try doing a 'build all' ("rebuild solution" in VS.NET parlance).
Software Zen:
delete this;