














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















such a window
(to be used by user processes only)
Styles of system Window class
BUTTON
BS_AUTOCHECKBOX BS_AUTORADIOBUTTON BS_PUSHBUTTON BS_RADIOBUTTON BS_DEFPUSHBUTTON … … …
hWnd = CreateWindow( "BUTTON", "Virtual University", BS_RADIOBUTTON | WS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_CAPTION, 50, 50, 200, 100, NULL, NULL, hInstance, NULL);
while(GetMessage(&msg, NULL, 0, 0) > 0) { if(msg.message == WM_LBUTTONUP) { DestroyWindow(hWnd); PostQuitMessage(0); } DispatchMessage(&msg); }
LONG GetWindowLong(
HWND hWnd , // handle to window int nIndex // offset of value to retrieve
);
The SetWindowLong() function changes an
attribute of the specified window.
Sub-classing allows you to change the behavior of an existing window, typically a control, by inserting a message map to intercept the window's messages. For example, suppose you have a dialog box with an edit control that you want to accept only non-numeric characters. You could do this by intercepting WM_CHAR messages destined for the edit control and discarding any messages indicating that a numeric character has been entered.
GetClassLong()
The GetClassLong() function retrieves the specified 32-bit (long) value from the WNDCLASS structure associated with the specified window.
GetClassLong()
LONG GetClassLong(
HWND hWnd, // handle to window
int nIndex // offset of value to retrieve
);
SetClassLong()