Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building a Win32API Application

Similar presentations


Presentation on theme: "Building a Win32API Application"— Presentation transcript:

1 Building a Win32API Application
Raw access to the API

2 Use WIN32API in your main function:
RegisterClassEx() (you provide a pointer to a function (usually called WndProc) which handles windows messages such as WM_CREATE, WM_COMMAND etc CreateWindowEx() ShowWindow() UpdateWindow() Write another function to handle Windows's messages. When the GetMsg() value is WM_CREATE, call CreateWindow(). The class specifies what kind of 'control' that window is e.g.; "edit" is a text box and "button" is a button. You have to specify a unique ID for each control. CreateWindow() returns a handle (pointer) to that control. When the user clicks on a control you receive the WM_COMMAND message with the ID of that control. Now handle that event. SetWindowText() and GetWindowText() allow you to set/get the text of any control.


Download ppt "Building a Win32API Application"

Similar presentations


Ads by Google