You are here:

C++/Static Libraries and Windows Resource files



I have been having problems encapsulating a windows dialog box within a static library.    

Is it even possible to include a resource file within a static library?   If so how can I go about doing this?

Any answer would greatly be appreciated.


anonymous , Thank you for your question.

Modal dialog boxes ('DialogBox' function) generally use a Resource attached to the executable file. In other words, don't try to include the Resource information as an executable object inside a static library. Instead, link the Resource information into a .dll or .exe file. It is possible to read Resource information directly into memory from a static library data section, but I doubt that this is what you need.

Perhaps if you could describe what you are really trying to do (the big picture) I could give better advice.

David Spector


All Answers

Answers by Expert:

Ask Experts


David Spector


Highly knowledgeable in the C++ language, Visual C++ (MSVC), Windows API, documentation and other quality-assurance techniques, and debugging. Knowledgeable in MFC, COM, GUI design, and object-oriented design.


I have been a software engineer since 1965. I have been published. My specializations have been: biomedical programming, compiler implementation, and many kinds of Windows programming. I don't do Databases or other business-oriented stuff.

Windows?/DOS Developer's Journal, ACM SIGPLAN Notices, and Computer Science Press.

ICCP Systems Programming Certification
Master's degree equivalent in Computer Science

©2016 All rights reserved.