System buttons actually look like they press.

svn path=/trunk/; revision=4307
This commit is contained in:
Richard Campbell 2003-03-16 06:43:09 +00:00
parent 9c982f8f51
commit 46535b89b5
2 changed files with 27 additions and 7 deletions

View file

@ -1,4 +1,4 @@
/* $Id: defwnd.c,v 1.36 2003/03/14 08:34:25 rcampbell Exp $
/* $Id: defwnd.c,v 1.37 2003/03/16 06:43:09 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -96,7 +96,6 @@ UserSetupInternalPos(VOID)
AtomInternalPos = GlobalAddAtomA(Str);
}
/* ReactOS extension */
HPEN STDCALL
GetSysColorPen(int nIndex)
{
@ -190,6 +189,25 @@ UserHasBigFrameStyle(ULONG Style, ULONG ExStyle)
(ExStyle & WS_EX_DLGMODALFRAME));
}
INT GetFrameSize(HWND hWnd)
{
ULONG uStyle;
ULONG uExStyle;
uStyle = GetWindowLong(hWnd, GWL_STYLE);
uExStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
if (UserHasThinFrameStyle(uStyle, uExStyle))
{
return GetSystemMetrics( SM_CXBORDER );
}
else if (UserHasDlgFrameStyle(uStyle, uExStyle))
{
return GetSystemMetrics( SM_CXDLGFRAME );
}
return GetSystemMetrics( SM_CXFRAME );
}
void UserGetInsideRectNC( HWND hWnd, RECT *rect )
{
RECT WindowRect;
@ -246,7 +264,7 @@ void UserDrawSysMenuButton( HWND hWnd, HDC hDC, BOOL down )
hDcMem = CreateCompatibleDC(hDC);
hSavedBitmap = SelectObject(hDcMem, hbSysMenu);
BitBlt(hDC, Rect.left + 2, Rect.top +
2, 16, 14, hDcMem,
2, 16, 16, hDcMem,
(GetWindowLong(hWnd, GWL_STYLE) & WS_CHILD) ?
GetSystemMetrics(SM_CXSIZE): 0, 0, SRCCOPY);
SelectObject(hDcMem, hSavedBitmap);
@ -264,6 +282,10 @@ static void UserDrawCloseButton ( HWND hWnd, HDC hDC, BOOL bDown )
GetSystemMetrics(SM_CXSIZE)) - 2;
INT iBmpHeight = (bToolWindow ? GetSystemMetrics(SM_CYSMSIZE) :
GetSystemMetrics(SM_CYSIZE) - 4);
if(!(GetWindowLong( hWnd, GWL_STYLE ) & WS_SYSMENU))
{
return;
}
UserGetInsideRectNC(hWnd, &rect);
SetRect(&rect,
rect.right - iBmpWidth - GetSystemMetrics(SM_CXFIXEDFRAME),

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: draw.c,v 1.9 2003/03/14 07:24:35 rcampbell Exp $
/* $Id: draw.c,v 1.10 2003/03/16 06:43:09 rcampbell Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
@ -117,7 +117,6 @@ static const signed char LTRBInnerFlat[] = {
-1, COLOR_BTNFACE, COLOR_BTNFACE, COLOR_BTNFACE,
-1, COLOR_BTNFACE, COLOR_BTNFACE, COLOR_BTNFACE,
};
/* FUNCTIONS *****************************************************************/
@ -893,8 +892,7 @@ static BOOL UITOOLS95_DrawFrameCaption(HDC dc, LPRECT r, UINT uFlags)
//UITOOLS95_DFC_ButtonPush(dc, r, uFlags & 0xff00);
if(uFlags & DFCS_PUSHED)
UITOOLS95_DrawRectEdge(dc,r,BDR_SUNKENINNER | BDR_SUNKENOUTER, BF_RECT |
BF_SOFT | BF_MIDDLE);
UITOOLS95_DrawRectEdge(dc,r,EDGE_SUNKEN, BF_RECT | BF_MIDDLE | BF_SOFT);
else
UITOOLS95_DrawRectEdge(dc,r,BDR_RAISEDINNER | BDR_RAISEDOUTER, BF_RECT |
BF_SOFT | BF_MIDDLE);