![]() |
|
#1
|
|||
|
|||
daialog based application MFCI've just made my first dialog application using MFC. It is interesting that there is no main() or WinMain() function.
I have programmed in C++ for a while, but not Visual C++ and windows applications. What is substituion for main() finction and how this work? What is the purpose of BEGIN_MESSAGE_MAP? Maybe this is substituion for main() or ...? |
|
#2
|
||||
|
||||
|
You will see something like this in your application_nameDlg.cpp file:
BOOL Capplication_nameDlg::OnInitDialog(){ //code // TODO: Add extra initialization here } This is "kind of a main" (not really). It is the first thing that your program executes when you run it.Add your initialisation where it says. The rest is done with messages - hence the MESSAGE_MAPs. You can add code in order to tell your application what to do when , let's say, a button is pressed and so on. It's quite easy if you use Class Wizard and you don't really ( I suggest u get yourself something like TYVC++ in n days , and you are ready to start.Good luck! Luci |
|
#3
|
||||
|
||||
|
I don't actually know what is the main in MFC, maybe the YourDlgApp class. Thats where everything starts. OnInitDialog is where the dialog class starts...
like luciwiz said, MESSAGE_MAPs is where the messages for your dialog is being processed. yep, classwizard would most of the work for you, but still you need to know it.. there are some messages that classwizrd don't know.. for example, the advanced message such as UPDATE_COMMANDUI,UPDATECOMMANDUI_RANGE could not be done with classwizard.. so you still need to know it. __________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds |
Recent GIDBlog
US Elections and the ?Voter?s Responsibility? by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The specified CGI application misbehaved by not returning a complete set of HTTP head | bacchus | MySQL / PHP Forum | 6 | 16-Jul-2007 22:12 |
| connecting web based dbserver to vc++ appln | meeranat | Apache Web Server Forum | 0 | 07-Jun-2004 06:03 |
| Console to MFC application | vadharah | MS Visual C++ / MFC Forum | 6 | 12-May-2004 01:30 |
| web server in secure mode not connecting to http application | tcsasp | Apache Web Server Forum | 0 | 06-Nov-2003 01:08 |
| GeoURL ICBM Address Server aka where is your site based and compare it to others | jrobbio | Advertising & Affiliates Forum | 0 | 04-Apr-2003 15:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The