Solved

Help !!! DLL with resource !!!

Posted on 1998-06-11
3
195 Views
Last Modified: 2013-11-20
Hi,
   I've make a dialog class together with the dialog resource and I want to put all of it together to generate a MFC extension DLL so that the code together with the resources can be reused by others easily .
   However , the test program see an invalid template name when calling CDialog::Create during run-time.
   Can you tell me what's wrong ?
0
Comment
Question by:surenechan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
motigust earned 0 total points
ID: 1317856
you should add the following code, at the begining of each function in the DLL:
      AFX_MANAGE_STATE(AfxGetStaticModuleState());

0
 
LVL 1

Expert Comment

by:chacko
ID: 1317857
Try regular DLL. Your problem seems to be the thread can not locate the application it belongs to. If ur dialog is extension DLL, your dialog creation function must be connected to an application instance.
0
 

Author Comment

by:surenechan
ID: 1317858
Yes, the test program can work properly now provided it was complied in Shared MFC DLL .
But, it seems can't get the proper instance handle of resource when complied in Static MFC Lib after the application entering the dll invoking the modal dialog.
Can you tell me why ?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question