Solved

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

Posted on 1997-02-13
1
394 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Add content to output file 4 58
Macro to save highlighted rows as a separate file 5 38
iSeries DB2 Query 2 84
zeroMAx challenge 20 76
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. …
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…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

757 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

21 Experts available now in Live!

Get 1:1 Help Now