Solved

Making a MFC DLL  and using it

Posted on 2000-05-09
2
169 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

Suggested Solutions

Title # Comments Views Activity
Lambda for random numbers problem 7 120
Move constructor only called if marked noexcept? 6 114
best sources to up-to-date in C++? 8 103
Least Squares Curve Fitting 4 115
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

749 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