Prepare background while drawing radio buttons and checkboxes.
This commit is contained in:
parent
278dd15eb2
commit
b32c00055c
@ -832,6 +832,10 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
|||||||
/* Draw the check-box bitmap */
|
/* Draw the check-box bitmap */
|
||||||
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
|
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
|
||||||
{
|
{
|
||||||
|
/* Since WM_ERASEBKGND does nothing, first prepare background */
|
||||||
|
if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
|
||||||
|
else FillRect( hDC, &client, hBrush );
|
||||||
|
|
||||||
if( TWEAK_WineLook == WIN31_LOOK )
|
if( TWEAK_WineLook == WIN31_LOOK )
|
||||||
{
|
{
|
||||||
HDC hMemDC = CreateCompatibleDC( hDC );
|
HDC hMemDC = CreateCompatibleDC( hDC );
|
||||||
@ -841,9 +845,6 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
|||||||
/* Check in case the client area is smaller than the checkbox bitmap */
|
/* Check in case the client area is smaller than the checkbox bitmap */
|
||||||
if (delta < 0) delta = 0;
|
if (delta < 0) delta = 0;
|
||||||
|
|
||||||
if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
|
|
||||||
else FillRect( hDC, &client, hBrush );
|
|
||||||
|
|
||||||
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
|
if (infoPtr->state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
|
||||||
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
|
if (infoPtr->state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
|
||||||
if (((wndPtr->dwStyle & 0x0f) == BS_RADIOBUTTON) ||
|
if (((wndPtr->dwStyle & 0x0f) == BS_RADIOBUTTON) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user