Occurs when a custom-draw box is painted.
VB6
![]() |
---|
Public Event CustomDraw |
Parameter | 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
Raised 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
![]() |
---|
Dim lngHdc As Long |
Then you will be able to pass lngHdc to Windows GDI API calls.