Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Windows Programming Basic Ideas. Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)

Similar presentations


Presentation on theme: "Intro to Windows Programming Basic Ideas. Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)"— Presentation transcript:

1 Intro to Windows Programming Basic Ideas

2 Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) Acts as an entry point just as a main function would act in a C program.

3 Common Header Files WINDEF.H – Basic type definitions. WINNT.H – Type definitions for Unicode support WINBASE.H – Kernel functions. WINUSER.H – User interface functions WINGDI.H – Graphics device interface functions.

4 Message Box function int WINAPI messageBox (HWND,LPCSTR,LPCSTR, UINT) Acts as a way do display a message onto the screen.

5 Different String Functions ILength pString IComp They can do a variety of things such as calculate string lengths, copy strings, concatenate strings, and compare strings.

6 Handles HINSTANCE – Handle to an “instance” – the program itself HWND – Handle to the window HDC – Handle to a device context The type of the object allows your program to know how to use the handle

7 Data Structures MSG – Message structure WNDCLASS – Window class structure PAINTSTRUCTURE – Paint structure RECT – Rectangle structure First two data structures are used in WinMain and the second two are used in WndProc

8 Other Messages wParm – a 32-bit message parameter dependent on the particcular message lParam – same as above Pt – mouse coordinates at the time the message was placed in the message queue


Download ppt "Intro to Windows Programming Basic Ideas. Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)"

Similar presentations


Ads by Google