Windows API Support

To help you draw rectangles and lines using the system colors, Windows provides the DrawEdge function. With this function you can select to draw any combination of raised or sunken inner or outer edges. You can also select which edges you want to draw, allowing you to draw individual lines. While it may take you awhile to figure out exactly which options to use, using this function eliminates having to create any GDI objects and guarantees that you are using the correct system colors.

Another useful API is the LoadImage function. If you call this function with the LR_LOADMAP3DCOLORS option, it transforms light gray to COLOR_3DLIGHT, gray to COLOR_3DFACE, and dark gray to COLOR_3DSHADOW. You can also use the LR_LOADTRANSPARENT option to let the parent window handle the system colors. You still have to handle the WM_SYSCOLORCHANGE to use these options, but this function helps make up for the fact that Windows currently doesn't have a transparent BitBlt function (although this function is coming with Microsoft Windows 2000).



Developing User Interfaces for Microsoft Windows
Developing User Interfaces for Microsoft Windows
ISBN: 0735605866
EAN: 2147483647
Year: 2005
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net