Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 1997-02-13
1
Medium Priority
?
429 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 10 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Loops Section Overview

926 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