The Gateway to Computer Science Excellence
+1 vote

In Win32, which function is used to create Windows Applications?

  1. Win APP
  2. Win API
  3. Win Main
  4. Win Void
in Others by Veteran (105k points)
recategorized by | 883 views

2 Answers

0 votes

Answer : Win Main

Win main is the function which is provided to create windows application .The user-provided entry point for a graphical Windows-based application.

Reference : Win Main as Application Entry Point 

by Boss (45.3k points)
0 votes

WinMain() is the C entry point function of any windows application. Like normal DOS/console based application which has main() function as C entry point, in windows we have WinMain() instead. WinMain() is a function which is called by system during creation of a process. First argument is the instance handle of the current process. Next is the previous instance. Command line arguments comes as next argument. Finally shell passes the show/display attribute of main window. WinMain() returns success as zero and error as non zero.

The WinMain function is called by the system as the initial entry point for a Win32-based application.



             int WINAPI WinMain(

               HINSTANCE hInstance,     /* [input] handle to current instance */

               HINSTANCE hPrevInstance, /* [input] handle to previous instance */

               LPSTR lpCmdLine,         /* [input] pointer to command line */

               int nCmdShow             /* [input] show state of window */


by (193 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,644 questions
56,500 answers
100,999 users