Public Group

# Odd DialogBox Error[solved]

This topic is 4414 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey all, I am having a few problems with a dialogbox in a DLL that I created. The dialogbox is modal and the return value of DialogBox is -1. The strange thing is that it returns this value only in the release version of my DLL, in the Debug version I get to see it fine. Anyway, I called GetLastError and put the results in a log file:
Universe3D[v0.1 alpha] RenderDevice LogFile:

Opening settings selection dialog.
Settings selection dialog ended, see results:
=> [ERROR]: Dialog failed.
=> LastError: 1814.

As you can see the error code is 1814, which I looked up at msdn. This is what MSDN says:
ERROR_RESOURCE_NAME_NOT_FOUND
1814 	The specified resource name cannot be found in the image file.

I find this very odd, because there are no problems at all in the debug version. Does anyone have an idea what could cause this strange behavior of the release version? P.S. I use Visual C++ (2005). [Edited by - rogierpennink on September 14, 2006 3:19:51 PM]

##### Share on other sites
Is the dialog located in your DLL or in the host application? Which HINSTANCE you you using - the DLL's or the host application's?

##### Share on other sites
The dialogbox is located in the dll. As it's a dll for a game engine it is required to be independent of the host application. The HINSTANCE is from the dll. I use the return value of LoadLibrary() for this.

##### Share on other sites
Actually, never mind. For some odd reason I decided to name my dialog resource "dlgChangeDevice" (with the double quotes) so that I didn't have to use MAKEINTRESOURCE() while calling for it. I just gave it a normal ID and used MAKEINTRESOURCE() in the DialogBox() function and it works fine. :)

Thanks for the input.

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 14
• 9
• 9
• 10
• 12
• ### Forum Statistics

• Total Topics
632910
• Total Posts
3009181
• ### Who's Online (See full list)

There are no registered users currently online

×