How to call a dialog from a Win32 resource DLL
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: How to call a dialog from a Win32 resource DLL

  1. #1
    Join Date
    Dec 2003
    Location
    India
    Posts
    17

    How to call a dialog from a Win32 resource DLL

    Hello There,

    How can I call a dialog , which is present in a seperate Win32 resource DLL .

    Any code or links shall be appreciated.

    Thanks
    Sujay

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,545

    Re: How to call a dialog from a Win32 resource DLL

    What is in the resource DLL: only resources (dialog template with controls) or also the dialog class implementation?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,051

    Re: How to call a dialog from a Win32 resource DLL

    Quote Originally Posted by sujayg View Post
    How can I call a dialog , which is present in a seperate Win32 resource DLL .
    Dialog cannot be present in resource dll. Dialog template can. Dialog class/procedure also can. So what is your case?

    Any code or links shall be appreciated.
    Maybe later.
    Best regards,
    Igor

  4. #4
    Join Date
    Dec 2003
    Location
    India
    Posts
    17

    Re: How to call a dialog from a Win32 resource DLL

    The resource DLL has the dialog template along with some controls . It does not have the implementation.

    Besides the above, I would also like to know what would be the case if the resource DLL had the implementation as well.
    Last edited by sujayg; January 16th, 2013 at 08:29 AM.

  5. #5
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,545

    Re: How to call a dialog from a Win32 resource DLL

    Quote Originally Posted by sujayg View Post
    The resource DLL has the dialog template along with some controls . It does not have the implementation.
    Then you have to
    Code:
    HINSTANCE hInst = ::LoadLibrary(your_dll_path_name);
    and then
    1. for MFC application - just call AfxSetResourceHandle(hInst);
    2. for Win32 - pass hInst to the API creting dialog (like CreateDialog)
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center