Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: C and Cpp Graphics The WinMain procedure Tutorial

The WinMain procedure More Windows Programming background.

Tutorial Details:

The WinMain procedure

Every Windows programming needs a main entry point. That being said, you may be wondering what this entry point is. The main entry point for any Windows program is called WinMain. The function prototype for WinMain is a little confusing at first, but as we continue to work with it you'll notice it becomes much easier to understand. Well. we've told you what it is; now were going to show you! Here's the prototype for WinMain:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);

As you may have already noticed, the return type for WinMain is, and always will be, int. All 32-bit Windows operating system uses the calling convention WINAPI. This calling convention MUST be used to distinguish the function as the entry point. Now for the parameters. As you can see, WinMain uses four parameters when the program starts. Lets have a look at them, shall we?

hInstance - is a handle to your applications instance, where an instance
can be considered to be a single run of your application. The instance
is used by windows as a reference to your application for event handling,
message processing, and various other duties.
hPrevInstance - is always NULL.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
C and Cpp Graphics The WinMain procedure Tutorial

View Tutorial:
C and Cpp Graphics The WinMain procedure Tutorial

Related Tutorials:

SQLJ: The 'open sesame' of Java database applications
SQLJ: The 'open sesame' of Java database applications
 
3D graphics programming in Java, Part 3: OpenGL
3D graphics programming in Java, Part 3: OpenGL
 
Agents talking to agents - JavaWorld September 1998
Agents talking to agents - JavaWorld September 1998
 
Use JDBC for industrial-strength performance, Part 1 - JavaWorld January 2000
Use JDBC for industrial-strength performance, Part 1 - JavaWorld January 2000
 
JavaWorld article about JavaCC
JavaWorld article about JavaCC
 
Take control with the Proxy design pattern
Take control with the Proxy design pattern
 
Jtrix: Web services beyond SOAP
Jtrix: Web services beyond SOAP
 
Integrate Java and C++ with Jace
Integrate Java and C++ with Jace
 
The J2EE 1.4 Tutorial
The J2EE 1.4 Tutorial is a guide to developing enterprise applications for the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Here we cover all the things you need to know to make the best use of this tutorial.
 
Java look and feel icons
These pages contain a collection of toolbar button graphics. The graphics have been designed specifically for use with the Java look and feel. They conform to the Java look and feel Design Guidelines (see the "Designing Button Graphics" section of the "Ap
 
XML Document Validation with an XML Schema
This tutorial explains the procedure of validating an XML document with an XML schema.
 
Jeff Schmitt's JDBC Page
This tutorial assumes you are using the MySQL database and the GWE JDBC drivers. The host computer is triton.towson.edu.
 
JavaServer Pages Technology - Documentation
Sun's tutorial for Java Server Pages that provide a good introduction to design web pages with JSP.
 
Tag Libraries Tutorial
This tutorial describes how to use and develop JavaServer Pages tag libraries. The tutorial assumes that you know how to develop servlets and JSP pages and are familiar with packaging servlets and JSP pages into Web application archives.
 
Getting Started With the Mobile 3D Graphics API for J2ME
This tutorial introduces the Mobile 3D Graphics API for J2ME, JSR 184. The article presents an overview, potential application areas, the differences between JSR 184 and two related APIs, the classes in the new optional package, the programming model, the
 
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial.
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial. Distributed Architecture Two-tier application: In the past two-tier applications were used. Two-tier applications are also know as
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0 Building Web Application With Ant and Deploying on Jboss 3.0 Previous Tutorial Index Next In this lesson I will show you how to build you web application and install on the Jboss 3.0
 
What is WAP? Wireless Application Protocol
What is WAP? Wireless Application Protocol Tutorial What is WAP? W ireless Application Protocol or WAP for short is simply a protocol - a standerized way for delivering Internet data over wireless networks. Thus WAP links Wireless Network with
 
UltraLightClient Community Site
Community-driven Wiki site for UltraLightClient Code Snippets and Contributions If you want to contribute, please go to Register as Committer. There is no support for the content on this site by Canoo. Committers agree that the code can be used free of c
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.