Click here to Skip to main content
15,917,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhoe to hide or close console windows in Win32 console application with MFC support Pin
megiddo27-Oct-04 21:07
megiddo27-Oct-04 21:07 
GeneralRe: hoe to hide or close console windows in Win32 console application with MFC support Pin
Arsalan Malik28-Oct-04 0:16
Arsalan Malik28-Oct-04 0:16 
GeneralRe: hoe to hide or close console windows in Win32 console application with MFC support Pin
David Crow28-Oct-04 4:24
David Crow28-Oct-04 4:24 
GeneralScripting support in C++/MFC apps Pin
Imtiaz Murtaza27-Oct-04 21:05
Imtiaz Murtaza27-Oct-04 21:05 
GeneralRe: Scripting support in C++/MFC apps Pin
IanAber27-Oct-04 21:20
IanAber27-Oct-04 21:20 
GeneralCSocket Connect Issue Pin
randynamics27-Oct-04 19:30
randynamics27-Oct-04 19:30 
GeneralPassing referance and passing pointer Pin
Ranjish27-Oct-04 19:13
Ranjish27-Oct-04 19:13 
GeneralRe: Passing referance and passing pointer Pin
shiraztk27-Oct-04 19:59
shiraztk27-Oct-04 19:59 
GeneralRe: Passing referance and passing pointer Pin
Ryan Binns27-Oct-04 20:17
Ryan Binns27-Oct-04 20:17 
GeneralRe: Passing referance and passing pointer Pin
Ranjish27-Oct-04 21:24
Ranjish27-Oct-04 21:24 
GeneralRe: Passing referance and passing pointer Pin
Ryan Binns28-Oct-04 13:28
Ryan Binns28-Oct-04 13:28 
GeneralRe: Passing referance and passing pointer Pin
Ranjish28-Oct-04 18:15
Ranjish28-Oct-04 18:15 
GeneralRe: Passing referance and passing pointer Pin
Ryan Binns28-Oct-04 20:27
Ryan Binns28-Oct-04 20:27 
GeneralWho Calls main and where does main returns (C/C++) Pin
Ranjish27-Oct-04 18:55
Ranjish27-Oct-04 18:55 
GeneralRe: Who Calls main and where does main returns (C/C++) Pin
Sujan Christo27-Oct-04 21:52
Sujan Christo27-Oct-04 21:52 
GeneralRe: Who Calls main and where does main returns (C/C++) Pin
jan larsen28-Oct-04 4:14
jan larsen28-Oct-04 4:14 
Ranjish wrote:
Will anybody expain to me who calls Main() in Windows and where does main returns

When you say main(), I presume that you're talking about a console app.
When you compile a C/C++ application, it's actually not you main() function which will be invoked first. The C/C++ runtime needs to set up some stuff, like initializing global objects, and then it will invoke main().
When main() exits, or when you invoke exit(), it's actually not the last code to run. Again, the C/C++ runtime needs to clean up eg. by running deallocators for global objects.


Ranjish wrote:
Who uses the return value for wht purose.

If you've started a process using spawnl(), you can use _cwait() to get the result code.

"After all it's just text at the end of the day. - Colin Davies

"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
AnswerRe: Why cann't get main window's CDC? Pin
Ryan Binns27-Oct-04 18:21
Ryan Binns27-Oct-04 18:21 
GeneralRe: Why cann't get main window's CDC? Pin
legenderious27-Oct-04 19:45
legenderious27-Oct-04 19:45 
GeneralRe: Why cann't get main window's CDC? Pin
Antony M Kancidrowski28-Oct-04 5:26
Antony M Kancidrowski28-Oct-04 5:26 
AnswerRe: Why cann't get main window's CDC? Pin
Antony M Kancidrowski28-Oct-04 5:23
Antony M Kancidrowski28-Oct-04 5:23 
GeneralRe: Why cann't get main window's CDC? Pin
legenderious28-Oct-04 15:32
legenderious28-Oct-04 15:32 
GeneralRe: Why cann't get main window's CDC? Pin
Antony M Kancidrowski29-Oct-04 1:57
Antony M Kancidrowski29-Oct-04 1:57 
QuestionWhy cann't get main window's CDC? Pin
legenderious27-Oct-04 16:41
legenderious27-Oct-04 16:41 
AnswerRe: Why cann't get main window's CDC? Pin
ytod27-Oct-04 17:01
ytod27-Oct-04 17:01 
GeneralRe: Why cann't get main window's CDC? Pin
legenderious27-Oct-04 19:49
legenderious27-Oct-04 19:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.