November 1998
Intermediate to advanced
1520 pages
37h 53m
English
As you can see in Figure 9-2 the display of many of the buttons doesn’t look quite right. The push buttons are fine, but the others are drawn with a rectangular gray background that simply shouldn’t be there. This is because the buttons are designed to be displayed in dialog boxes, and in Windows 98 dialog boxes have a gray surface. Our window has a white surface because that’s how we defined it in the WNDCLASS structure:
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
We’ve been doing this because we often display text to the client area, and GDI uses the text color and background color defined in the default device context. These are always black and white. To make these buttons look a little better, we must ...
Read now
Unlock full access