|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| No
| Import Library
| user32.lib
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
DrawState
[Now Supported on Windows NT]
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
| );
|
|
Parameters
hdc
Identifies the device context to draw in.
hbr
Identifies the brush used to draw the image, if the state specified by the fuFlags parameter is DSS_MONO. This parameter is ignored for other states.
lpOutputFunc
Points to an application-defined callback function used to render the image.
This parameter is required if the image type in fuFlags is DST_COMPLEX. It is optional and can be NULL if the image type is DST_TEXT.
For all other image types, this parameter is ignored. For more information
about the callback function, see the DrawStateProc function.
lData
Specifies information about the image. The meaning of this parameter depends
on the image type.
wData
Specifies information about the image. The meaning of this parameter depends
on the image type. It is, however, zero extended for use with the DrawStateProc function.
x
Specifies the horizontal location at which to draw the image.
y
Specifies the vertical location at which to draw the image.
cx
Specifies the width of the image, in device units. This parameter is required
if the image type is DST_COMPLEX. Otherwise, it can be zero to calculate the
width of the image.
cy
Specifies the height of the image, in device units. This parameter is required
if the image type is DST_COMPLEX. Otherwise, it can be zero to calculate the
height of the image.
fuFlags
Specifies the image type and state. The type can be one of these values:
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.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
See Also
DrawStateProc
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|