mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 09:22:58 +00:00
[MSPAINT] Define GRIP_SIZE macro and use it (#4192)
Reduce magic numbers. CORE-17931
This commit is contained in:
parent
9e1386db43
commit
614354ccb5
7 changed files with 51 additions and 53 deletions
|
@ -248,7 +248,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
selectionWindow.Create(scrlClientWindow.m_hWnd, selectionWindowPos, NULL, WS_CHILD | BS_OWNERDRAW);
|
||||
|
||||
/* creating the window inside the scroll box, on which the image in hDrawingDC's bitmap is drawn */
|
||||
RECT imageAreaPos = {3, 3, 3 + imageModel.GetWidth(), 3 + imageModel.GetHeight()};
|
||||
RECT imageAreaPos = {GRIP_SIZE, GRIP_SIZE, GRIP_SIZE + imageModel.GetWidth(), GRIP_SIZE + imageModel.GetHeight()};
|
||||
imageArea.Create(scrlClientWindow.m_hWnd, imageAreaPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
|
||||
if (__argc >= 2)
|
||||
|
@ -312,7 +312,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
}
|
||||
|
||||
/* creating the size boxes */
|
||||
RECT sizeboxPos = {0, 0, 0 + 3, 0 + 3};
|
||||
RECT sizeboxPos = {0, 0, GRIP_SIZE, GRIP_SIZE};
|
||||
sizeboxLeftTop.Create(scrlClientWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
sizeboxCenterTop.Create(scrlClientWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
sizeboxRightTop.Create(scrlClientWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
|
@ -322,7 +322,7 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
|
|||
sizeboxCenterBottom.Create(scrlClientWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
sizeboxRightBottom.Create(scrlClientWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
|
||||
/* placing the size boxes around the image */
|
||||
imageArea.SendMessage(WM_SIZE, 0, 0);
|
||||
imageArea.PostMessage(WM_SIZE, 0, 0);
|
||||
|
||||
/* by moving the window, the things in WM_SIZE are done */
|
||||
mainWindow.SetWindowPlacement(&(registrySettings.WindowPlacement));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue