The DrawState function displays an image and applies a visual effect to indicate a state, such as a disabled or default state.
BOOL WINAPI DrawState(
HDC hdc, |
// handle to device context |
HBRUSH hbr, |
// handle to brush |
DRAWSTATEPROC lpOutputFunc, |
// pointer to callback function |
LPARAM lData, |
// image information |
WPARAM wData, |
// more image information |
int x, |
// horizontal location of image |
int y, |
// vertical location of image |
int cx, |
// width of image |
int cy, |
// height of image |
UINT fuFlags |
// image type and state |
); |
Value (type) |
Meaning |
DST_BITMAP |
The image is a bitmap. The low-order word of the lData parameter is the bitmap handle. |
DST_COMPLEX |
The image is application defined. To render the image, DrawState calls the callback function specified by the lpOutputFunc parameter. |
DST_ICON |
The image is an icon. The low-order word of lData is the icon handle. |
DST_PREFIXTEXT |
The image is text that may contain an accelerator mnemonic. DrawState interprets the ampersand (&) prefix character as a directive to underscore the character that follows. The lData parameter specifies the address of the string, and the wData parameter specifies the length. If wData is zero, the string must be null-terminated. |
DST_TEXT |
The image is text. The lData parameter specifies the address of the string, and the wData parameter specifies the length. If wData is zero, the string must be null-terminated. |
The state can be one of these values:
Value (state) |
Meaning |
DSS_NORMAL |
Draws the image without any modification. |
DSS_UNION |
Dithers the image. |
DSS_DISABLED |
Embosses the image. |
DSS_MONO |
Draws the image using the brush specified by the hbr parameter. |
For all states except DSS_NORMAL, the image is converted to monochrome before the visual effect is applied.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
file: /Techref/os/win/api/win32/func/src/f18_5.htm, 8KB, , updated: 2000/4/7 11:19, local time: 2024/11/25 02:25,
3.145.103.100:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/os/win/api/win32/func/src/f18_5.htm"> DrawState</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.