Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

765 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