Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC class in static library

Status
Not open for further replies.

datapath

Programmer
Feb 20, 2003
11
0
0
BR
Im trying to write a class thats inherits from CFormView. Its easy to include it in a MFC application project, but I want to make a separate project with this class in the form of a static library to be used in the main project.
The problem is that there is only options to do MFC DLL and MFC application in the wizard.
Is it possible to make a MFC class in a static library?
 
Or is there a way to convert a dll into a static library?
 
I've recently run into this problem. Even if you did get the DLL into a static lib, you still have the problem that the CFormView constructor insists on having a valid resource template name (or resource id to derive a name from). I don't know if it's possible to get a handle on resources compiled into a .lib (obviously it's easy with DLL's and .exe's), so this makes deriving from CFormView somewhat troublesome in a static lib.

I'm going to attempt to work around it by deriving from CScrollView (which doesn't required a resource template to construct) and embedding a standard CDialog as a child, and using an additional DLL to serve resources.

If you have any joy, let me know...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top