Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
425 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 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

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…
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…
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

722 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