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
Solved

Help !!! DLL with resource !!!

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Define unique primary key 9 95
Hibernate methods 2 77
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 102
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

789 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