Solved

Making a MFC DLL  and using it

Posted on 2000-05-09
2
170 Views
Last Modified: 2010-04-02
I have constructed an MFC DLL. It is having a single function DisplayDialog, which will display a dialog box.
To use this dll I have built a new Win32 Application project and add a file to the project which contains:
<#include windows.h>
extern int DisplayDialog();
main()
{
 DisplayDialog();
}
I have copied the dll in the windows system directory, and add the .lib file in the project link setting.
While building the project It is giving an error "unresolved external symbol _WinMain@16"
How to correct this.
0
Comment
Question by:mtushar
[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
2 Comments
 
LVL 1

Accepted Solution

by:
ZivKatzir earned 50 total points
ID: 2791596
when you create a win32 application you should use WinMain() and not main().

Try using the wizard for creating a simple hallow world win32 application. you'll find that a win32 application has some more default functions. Those functions deals with creating the main window and proccessing the windows messages sent to the app.

After you look at the source generated by the wizard, switch the "Hellow world" line with a call for your dialog.

At last you can gently clean up the functionalities you do not need.
0
 

Author Comment

by:mtushar
ID: 2791844
Thanx
Just now I have tested, its working fine.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

752 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