Solved

Is there a way to create a cwnd object in a dll dynamically linked to mfc

Posted on 1997-02-13
1
419 Views
Last Modified: 2013-11-20
I try to create a cwnd object in a dll. I did it in USRDLL but failed in a dynamic-link-mfc dll. Since I need to create several dlls, I want them to share mfc library rather. The problem I had was an assert error(afxcurrentinstancehandle is NULL). I am using MSVC++4.2 and the calling app. is non-MFC(VB4 in this case). I am still new to this so experienced MFC programmers please turn the light.
0
Comment
Question by:danli020797
[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
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 5 total points
ID: 1300431
There are several ways of approaching your problem. I will demonstrate you one of the easiest ways of doing this :
(I am not very familiar with VB so I will use C syntax)

from your DLL side

__declspec(dllexport) int WINAPI SomeFunction( HWND hWnd)
{

}
0

Featured Post

 Watch the Recording: Learning MySQL 5.7

MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Suggested Courses

622 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