Page 11 - DCAP408_WEB_PROGRAMMING
P. 11
Unit 1: Windows Programming Basics
4. In the Console Wizard, confirm that only the C++ radio button is chosen: Notes
5. Click OK. You are offered with a file as below:
//—————————————————————————————————————
#include <windows.h> #pragma hdrstop
//—————————————————————————————————————
#pragma args n used
WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{return 0;
}
//——————————————————————-———————————————
6. Save the application in a new folder named Win32A.
7. Save the first file as Main.cpp and save the project as SimpleWindow.
Using Microsoft Visual C++
To create a Win32 application by means of Microsoft Visual C++, exhibit the New (5 and 6
versions) or New Project (.Net version) dialog box and choose Win32 application (5 and 6) or
Win32 Project (.Net) item. Microsoft Visual C++ offers the fastest and quite most complete
means of creating a Win32 application.
Example: It offers a skeleton application with all of the code a fundamental application
would need. Since we are learning Win32, we will go the hard manner, which includes creating
an application from scratch.
Actually, this permits to give approximately (but not exactly) the similar instructions as Borland
C++ Builder.
1. Start the Microsoft Development Environment.
2. On the main menu, click File -> New... or File -> New -> Project...
3. In the New or New Project dialog box, click either Win32 Application or click Visual C++
Projects and Win32Project:
LOVELY PROFESSIONAL UNIVERSITY 5