Solved

Help !!! DLL with resource !!!

Posted on 1998-06-11
3
190 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
unable to delete all specified values regedit 38 277
Unix Command -- Challenging  question 7 87
wordmultiple challenge 12 118
Can not remove SSL certificate on iPhone 6 - iOS10.2 12 259
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now