Unicode Controls & Classes for VB6 - Version 4

clsCommonWrapper.DrawButtonWL Method

Draws a button on a specified Device Context but fills only button parts, others remain trasparent

Syntax
Public Sub DrawButtonWL (ByVal lHdc As Long, _
ByRef rWork As RECT, _
Optional ByVal lBackColor As Long = vbButtonFace, _
Optional ByVal bUseBorder As Boolean = True, _
Optional ByVal lBorderColor As Long = -1&, _
Optional ByVal bPressed As Boolean = False, _
Optional ByVal bDefault As Boolean = False, _
Optional ByVal bCancel As Boolean = False, _
Optional ByVal bDrawFocus As Boolean = False, _
Optional ByVal bRounded As Boolean = True, _
Optional ByVal iBtnStyle As eCtlButtonStyle = iCtlBtnStyle_UseDefault, _
Optional ByVal lReserved1 As Long = -1&, _
Optional ByVal bCorrectLuminance As Boolean = True)
Parameters
Parameter Description
ByVal lHdc As Long Destination DC
ByRef rWork As RECT Rectangle coordinates
Optional ByVal lBackColor As Long = vbButtonFace Background color
Optional ByVal bUseBorder As Boolean = True Draw borders?
Optional ByVal lBorderColor As Long = -1& The color of the border, leave -1& for automatic management
Optional ByVal bPressed As Boolean = False Is the button pressed?
Optional ByVal bDefault As Boolean = False Is this a default dialog button? (Activated when the user presses ENTER)
Optional ByVal bCancel As Boolean = False Is this a cancel button? (Activated when the user presses the ESC key)
Optional ByVal bDrawFocus As Boolean = False Draw the focus rectangle?
Optional ByVal bRounded As Boolean = True Are borders rounded?
Optional ByVal iBtnStyle As eCtlButtonStyle = iCtlBtnStyle_UseDefault Style of the button
Optional ByVal lReserved1 As Long = -1&
Optional ByVal bCorrectLuminance As Boolean = True Permits to change colors when they are too light or too dark to be used in a good effect
Remarks
This function has been used in WindowsLess transparent usercontrols