Jump to content
  • Advertisement
Sign in to follow this  
rogierpennink

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.

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!