mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
Added WM_SIZING message support.
This commit is contained in:
parent
ebe7831a75
commit
44675508a5
2 changed files with 19 additions and 5 deletions
|
@ -657,6 +657,16 @@ typedef struct
|
|||
#define WM_CAPTURECHANGED 0x0215
|
||||
#define WM_MOVING 0x0216
|
||||
|
||||
/* wParam for WM_SIZING message */
|
||||
#define WMSZ_LEFT 1
|
||||
#define WMSZ_RIGHT 2
|
||||
#define WMSZ_TOP 3
|
||||
#define WMSZ_TOPLEFT 4
|
||||
#define WMSZ_TOPRIGHT 5
|
||||
#define WMSZ_BOTTOM 6
|
||||
#define WMSZ_BOTTOMLEFT 7
|
||||
#define WMSZ_BOTTOMRIGHT 8
|
||||
|
||||
/* MDI messages */
|
||||
#define WM_MDICREATE 0x0220
|
||||
#define WM_MDIDESTROY 0x0221
|
||||
|
|
|
@ -2256,18 +2256,22 @@ static void NC_DoSizeMove( HWND hwnd, WORD wParam )
|
|||
else
|
||||
{
|
||||
RECT newRect = sizingRect;
|
||||
WPARAM wpSizingHit = 0;
|
||||
|
||||
if (hittest == HTCAPTION) OffsetRect( &newRect, dx, dy );
|
||||
if (ON_LEFT_BORDER(hittest)) newRect.left += dx;
|
||||
else if (ON_RIGHT_BORDER(hittest)) newRect.right += dx;
|
||||
if (ON_TOP_BORDER(hittest)) newRect.top += dy;
|
||||
else if (ON_BOTTOM_BORDER(hittest)) newRect.bottom += dy;
|
||||
if( !iconic )
|
||||
{
|
||||
NC_DrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||
NC_DrawMovingFrame( hdc, &newRect, thickframe );
|
||||
}
|
||||
if(!iconic) NC_DrawMovingFrame( hdc, &sizingRect, thickframe );
|
||||
capturePoint = pt;
|
||||
|
||||
/* determine the hit location */
|
||||
if (hittest >= HTLEFT && hittest <= HTBOTTOMRIGHT)
|
||||
wpSizingHit = WMSZ_LEFT + (hittest - HTLEFT);
|
||||
SendMessageA( hwnd, WM_SIZING, wpSizingHit, (LPARAM)&newRect );
|
||||
|
||||
if (!iconic) NC_DrawMovingFrame( hdc, &newRect, thickframe );
|
||||
sizingRect = newRect;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue