13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Class cursorClass iconClass backgroundbrushThe class cursor defines the shape of the cursor when the cursor isin the client area of a window in the class. Windows automaticallysets the cursor to the given shape as soon as the cursor enters thewindow's client area, and ensures that the cursor keeps that shapewhile it remains in the client area. To assign a cursor shape to awindow class, an application typically loads the shape from theapplication's resources by using the LoadCursor function, andthen assigns the returned cursor handle to the hCursor field of theWNDCLASS structure.Windows does not require a class cursor. If a class cursor is notdefined, Windows assumes that the window will set the cursorshape each time the cursor moves into the window.The class icon defines the shape of the icon used when thewindow of the given class is minimized. To assign an icon to awindow class, an application typically loads the icon from theapplication's resources by using the Loadleon function, and thenassigns the returned icon handle to the hleon field of theWNDCLASS structure.Windows does not require a class icon. If a class icon is notdefined, Windows assumes the application will draw the iconwhenever the window is minimized. In this case, Windows sendsappropriate messages to the window procedure, requesting thatthe icon be painted.A class background brush is the brush used to prepare the clientarea of a window for subsequent drawing by the application.Windows uses the brush to fill the client area with a solid color orpattern, thereby removing all previous images from that locationwhether they belonged to the window or not.To assign a background brush to a class, an application typicallycreates a brush by using the appropriate functions from GOI, andthen assigns the returned brush handle to the hbrBaekgroundfield of the WNDCLASS structure.Instead of creating a brush, an application can use a standardsystem color by setting the field to one of the following colorvalues:[J COLOR_ACTIVE CAPTION[J COLOR_APPWORKSPACEChapter 1, Window manager interface functions 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!