Advertisement Jump to content
Sign in to follow this  

Unity Open Dialog inside a LIB file

This topic is 4581 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

I'm trying to call DialogBox(hInst, MAKEINTRESOURCE(DLG_SETUPDIALOG), GetDesktopWindow(), (DLGPROC)DialogProc); from inside a static library but I get an error message: specified image file did not contain a resource section Does anyone know how to fix this? I found the same error posted here: but no solution.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Yes, the dialog needs to be included in the resource script that is linked with the executable. Note that library files cannot have their own resource scripts associated with them. Note also, that you can only have one actual resource script per executable (or DLL).

If you have a resource script for the dialog box you want to use, you have to do one of the following:

1) Set the resource script that contains the dialog in question as the resource script or the project.

2) If the project already has a resource script added to it - you have to include the resourse script with the dialog in the executable's resource script. The easiest way to do this, is to right click on the resource, select "resource includes", and specify the file in question as an include.

Hope that makes sense.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!