CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Location
    Berks
    Posts
    23

    CPropertyPages in a DLL

    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 ???


  2. #2
    Join Date
    Jul 1999
    Posts
    14

    Re: CPropertyPages in a DLL

    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.


  3. #3
    Join Date
    Jul 1999
    Location
    Berks
    Posts
    23

    Re: CPropertyPages in a DLL

    I think I may have found the problem...

    AFX_MANAGE_STATE(AfxGetStaticModuleState());

    found in a posting by bimmer boy last month

    Thanx anyway




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured