Using resources from other modules in MFC

This is a discussion on Using resources from other modules in MFC within the Windows Programming forums, part of the Platform Specific Boards category; I'd like to be able to initialize a CPropertyPage object with a dialog resource from a different module. Is this ...

  1. #1
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401

    Using resources from other modules in MFC

    I'd like to be able to initialize a CPropertyPage object with a dialog resource from a different module. Is this possible?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    I don't see why not - all you need is an instance handle to the dll (AfxLoadLibrary) containing the resource(s) in question and the resource id value (for use with, for example, MAKEINTRESOURCE). Just use the dll instance returned by AfxLoadLibrary in whatever the mfc equivalent of the PROPSHEETPAGE hInstance parameter is.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Ok thanks, I'll give it a shot.
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC Programming Resources??
    By Mastadex in forum Windows Programming
    Replies: 7
    Last Post: 07-24-2004, 03:44 PM
  2. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 09:52 PM
  3. Release MFC Programs & Dynamic MFC DLL :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-18-2002, 07:42 PM
  4. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM
  5. MFC is Challenging :: C++
    By kuphryn in forum C++ Programming
    Replies: 8
    Last Post: 02-05-2002, 01:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21