Occurs when a custom-draw box is painted.
SyntaxVB6
Copy Code
|
|---|
Public Event CustomDraw |
Event DataParameter | Type | Description |
|---|---|---|
hdc | [input] device context | A HDC. Handle to the device context to draw in. |
box | [input] reference to Box object | The box to be drawn. |
tag | [input] long | The tag of the box. |
shadow | [input] boolean | Indicates whether to draw a shadow or the box itself. |
left | [input] long | The left side of the box bounding rectangle. |
top | [input] long | The top side of the box bounding rectangle. |
right | [input] long | The right side of the box bounding rectangle. |
bottom | [input] long | The bottom side of the box bounding rectangle. |
Dispatch ID: 15
RemarksRaised when a custom-draw box has to be painted. Separate parameters describe:
The hdc you get is already prepared for drawing according to document coordinate system. If draw style is cdAdditional, the clipping region is set to the box shape.
The two custom-draw styles are:
If you need to handle this event in VB you should first cast the hdc to long:
VB
Copy Code
|
|---|
Dim lngHdc As Long |
Then you will be able to pass lngHdc to Windows GDI API calls.
See Also