Implementation of the pushed close button.

This commit is contained in:
Francois Boisvert 1999-02-18 10:37:17 +00:00 committed by Alexandre Julliard
parent 87e385fc6b
commit 308c6afe62
4 changed files with 12 additions and 7 deletions

View File

@ -143,6 +143,8 @@ static HBITMAP32 hBmpMinimizeD = 0;
static HBITMAP32 hBmpMaximize = 0;
static HBITMAP32 hBmpMaximizeD = 0;
static HBITMAP32 hBmpClose = 0;
static HBITMAP32 hBmpCloseD = 0;
static HBRUSH32 hShadeBrush = 0;
static HMENU32 MENU_DefSysPopup = 0; /* Default system menu popup */
@ -338,6 +340,7 @@ BOOL32 MENU_Init()
hBmpMaximize = LoadBitmap32A(0,MAKEINTRESOURCE32A(OBM_RESTORE));
hBmpMaximizeD = LoadBitmap32A(0,MAKEINTRESOURCE32A(OBM_RESTORED));
hBmpClose = LoadBitmap32A(0,MAKEINTRESOURCE32A(OBM_CLOSE));
hBmpCloseD = LoadBitmap32A(0,MAKEINTRESOURCE32A(OBM_CLOSED));
if (hStdCheck)
{
@ -616,7 +619,7 @@ static HBITMAP32 MENU_LoadMagicItem(UINT32 id,BOOL32 hilite)
{
case MAGIC_REDUCE : return (hilite ? hBmpMinimizeD : hBmpMinimize);
case MAGIC_RESTORE : return (hilite ? hBmpMaximizeD: hBmpMaximize);
case MAGIC_CLOSE : return (hilite ? hBmpClose : hBmpClose);
case MAGIC_CLOSE : return (hilite ? hBmpCloseD : hBmpClose);
default : return 0;
}

View File

@ -86,7 +86,7 @@ typedef unsigned long Pixel;
#include "bitmaps/obm_restored_95"
#define OBM_FIRST OBM_RADIOCHECK /* First OEM bitmap */
#define OBM_FIRST OBM_CLOSED /* First OEM bitmap */
#define OBM_LAST OBM_OLD_CLOSE /* Last OEM bitmap */
static struct
@ -94,6 +94,7 @@ static struct
char** data; /* Pointer to bitmap data */
BOOL32 color; /* Is it a color bitmap? */
} OBM_Pixmaps_Data[OBM_LAST-OBM_FIRST+1] = {
{ obm_closed_95,TRUE}, /* OBM_CLOSED */
{ obm_radiocheck, FALSE }, /* OBM_RADIOCHECK */
{ obm_trtype, TRUE }, /* OBM_TRTYPE */
{ obm_cdrom, TRUE }, /* OBM_CDROM */

View File

@ -250,6 +250,7 @@ DECL_WINELIB_TYPE(LPWINDOWPLACEMENT)
#define OBM_TRTYPE 32728
/* Wine extension, I think. */
#define OBM_CLOSED 32726
#define OBM_RADIOCHECK 32727
#define OBM_OLD_CLOSE 32767

View File

@ -933,10 +933,9 @@ void NC_DrawSysButton( HWND32 hwnd, HDC32 hdc, BOOL32 down )
{
NC_GetInsideRect( hwnd, &rect );
hdcMem = CreateCompatibleDC32( hdc );
hbitmap = SelectObject32( hdcMem, hbitmapClose );
hbitmap = SelectObject32( hdcMem, (down ? hbitmapCloseD : hbitmapClose));
BitBlt32(hdc, rect.left, rect.top, SYSMETRICS_CXSIZE, SYSMETRICS_CYSIZE,
hdcMem, (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0,
down ? NOTSRCCOPY : SRCCOPY );
hdcMem, (wndPtr->dwStyle & WS_CHILD) ? SYSMETRICS_CXSIZE : 0, 0, SRCCOPY );
SelectObject32( hdcMem, hbitmap );
DeleteDC32( hdcMem );
}
@ -1070,7 +1069,7 @@ void NC_DrawCloseButton95 (HWND32 hwnd, HDC32 hdc, BOOL32 down)
GetObject32A (hBmp, sizeof(BITMAP32), &bmp);
BitBlt32 (hdc, rect.right - (sysMetrics[SM_CYCAPTION] + 1 + bmp.bmWidth) / 2,
rect.top + (sysMetrics[SM_CYCAPTION] - 1 - bmp.bmHeight) / 2,
bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, down ? NOTSRCCOPY : SRCCOPY);
bmp.bmWidth, bmp.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject32 (hdcMem, hOldBmp);
DeleteDC32 (hdcMem);
@ -1363,7 +1362,7 @@ static void NC_DrawCaption( HDC32 hdc, RECT32 *rect, HWND32 hwnd,
{
if (!(hbitmapClose = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_CLOSE) )))
return;
hbitmapCloseD = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_CLOSE) );
hbitmapCloseD = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_CLOSED) );
hbitmapMinimize = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_REDUCE) );
hbitmapMinimizeD = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_REDUCED) );
hbitmapMaximize = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_ZOOM) );
@ -1469,6 +1468,7 @@ static void NC_DrawCaption95(
if (!hbitmapClose) {
if (!(hbitmapClose = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_CLOSE) )))
return;
hbitmapCloseD = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_CLOSED));
hbitmapMinimize = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_REDUCE) );
hbitmapMinimizeD = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_REDUCED) );
hbitmapMaximize = LoadBitmap16( 0, MAKEINTRESOURCE16(OBM_ZOOM) );