Click to See Complete Forum and Search --> : CPropertyPages in a DLL
bini
August 3rd, 1999, 04:49 AM
I am trying to use CPropertyPages and CPropertySheets in a DLL. At run time, in the DoModal event of the Sheet, the array of pages is built with BuildPropPageArray but when this calls PreProcessPageTemplate an assert fails because it has failed to LockResource for the page template.
I have tried using other pages and calling afxCurrentInstanceHandle = AfxFindResourceHandle(...) with no effect.
Any Ideas ???
Milan Rathod
August 3rd, 1999, 05:13 AM
Hi, bini!
I have used property pages and property sheet in dll.
I think you have not included resources properly.
Some settings in exe project are required.
If you right click in resorce view, you will get
option of 'Resource Includes'.
In 'Read-Only Symbol directives' include
resource header file of dll project.
In 'Compile-Time Directives' find
"#include "afxres.rc"
".
Include .rc file of your dll.
I think it should work.
bini
August 3rd, 1999, 06:01 AM
I think I may have found the problem...
AFX_MANAGE_STATE(AfxGetStaticModuleState());
found in a posting by bimmer boy last month
Thanx anyway
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.