[MSPAINT] Rename scrollbox as canvas

- s/CScrollboxWindow/CCanvasWindow/
- s/scrollboxWindow/canvasWindow/
- s/UpdateScrollbox/UpdateCanvas/
CORE-18867
This commit is contained in:
Katayama Hirofumi MZ 2023-03-17 07:45:14 +09:00
parent a88dcbd6c3
commit 7361592ede
8 changed files with 59 additions and 59 deletions

View file

@ -7,6 +7,7 @@ if(DBG)
endif() endif()
list(APPEND SOURCE list(APPEND SOURCE
canvas.cpp
dialogs.cpp dialogs.cpp
dib.cpp dib.cpp
drawing.cpp drawing.cpp
@ -19,7 +20,6 @@ list(APPEND SOURCE
palette.cpp palette.cpp
palettemodel.cpp palettemodel.cpp
registry.cpp registry.cpp
scrollbox.cpp
selection.cpp selection.cpp
selectionmodel.cpp selectionmodel.cpp
sizebox.cpp sizebox.cpp

View file

@ -1,8 +1,8 @@
/* /*
* PROJECT: PAINT for ReactOS * PROJECT: PAINT for ReactOS
* LICENSE: LGPL * LICENSE: LGPL
* FILE: base/applications/mspaint/scrollbox.cpp * FILE: base/applications/mspaint/canvas.cpp
* PURPOSE: Functionality surrounding the scroll box window class * PURPOSE: Providing the canvas window class
* PROGRAMMERS: Benedikt Freisen * PROGRAMMERS: Benedikt Freisen
*/ */
@ -14,22 +14,22 @@
/* FUNCTIONS ********************************************************/ /* FUNCTIONS ********************************************************/
void void
UpdateScrollbox(HWND hwndFrom) UpdateCanvas(HWND hwndFrom)
{ {
CRect tempRect; CRect tempRect;
scrollboxWindow.GetClientRect(&tempRect); canvasWindow.GetClientRect(&tempRect);
CSize sizeScrollBox(tempRect.Width(), tempRect.Height()); CSize sizeScrollBox(tempRect.Width(), tempRect.Height());
CSize sizeZoomed = { Zoomed(imageModel.GetWidth()), Zoomed(imageModel.GetHeight()) }; CSize sizeZoomed = { Zoomed(imageModel.GetWidth()), Zoomed(imageModel.GetHeight()) };
CSize sizeWhole = { sizeZoomed.cx + (GRIP_SIZE * 2), sizeZoomed.cy + (GRIP_SIZE * 2) }; CSize sizeWhole = { sizeZoomed.cx + (GRIP_SIZE * 2), sizeZoomed.cy + (GRIP_SIZE * 2) };
/* show/hide the scrollbars */ /* show/hide the scrollbars */
scrollboxWindow.ShowScrollBar(SB_HORZ, sizeScrollBox.cx < sizeWhole.cx); canvasWindow.ShowScrollBar(SB_HORZ, sizeScrollBox.cx < sizeWhole.cx);
scrollboxWindow.ShowScrollBar(SB_VERT, sizeScrollBox.cy < sizeWhole.cy); canvasWindow.ShowScrollBar(SB_VERT, sizeScrollBox.cy < sizeWhole.cy);
if (sizeScrollBox.cx < sizeWhole.cx || sizeScrollBox.cy < sizeWhole.cy) if (sizeScrollBox.cx < sizeWhole.cx || sizeScrollBox.cy < sizeWhole.cy)
{ {
scrollboxWindow.GetClientRect(&tempRect); canvasWindow.GetClientRect(&tempRect);
sizeScrollBox = CSize(tempRect.Width(), tempRect.Height()); sizeScrollBox = CSize(tempRect.Width(), tempRect.Height());
} }
@ -38,14 +38,14 @@ UpdateScrollbox(HWND hwndFrom)
si.nMax = sizeWhole.cx; si.nMax = sizeWhole.cx;
si.nPage = sizeScrollBox.cx; si.nPage = sizeScrollBox.cx;
scrollboxWindow.SetScrollInfo(SB_HORZ, &si); canvasWindow.SetScrollInfo(SB_HORZ, &si);
si.nMax = sizeWhole.cy; si.nMax = sizeWhole.cy;
si.nPage = sizeScrollBox.cy; si.nPage = sizeScrollBox.cy;
scrollboxWindow.SetScrollInfo(SB_VERT, &si); canvasWindow.SetScrollInfo(SB_VERT, &si);
INT dx = -scrollboxWindow.GetScrollPos(SB_HORZ); INT dx = -canvasWindow.GetScrollPos(SB_HORZ);
INT dy = -scrollboxWindow.GetScrollPos(SB_VERT); INT dy = -canvasWindow.GetScrollPos(SB_VERT);
if (sizeboxLeftTop.IsWindow()) if (sizeboxLeftTop.IsWindow())
{ {
@ -77,16 +77,16 @@ UpdateScrollbox(HWND hwndFrom)
imageArea.MoveWindow(dx + GRIP_SIZE, dy + GRIP_SIZE, sizeZoomed.cx, sizeZoomed.cy, TRUE); imageArea.MoveWindow(dx + GRIP_SIZE, dy + GRIP_SIZE, sizeZoomed.cx, sizeZoomed.cy, TRUE);
} }
LRESULT CScrollboxWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CCanvasWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
if (m_hWnd) if (m_hWnd)
{ {
UpdateScrollbox(m_hWnd); UpdateCanvas(m_hWnd);
} }
return 0; return 0;
} }
LRESULT CScrollboxWindow::OnHScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CCanvasWindow::OnHScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
SCROLLINFO si; SCROLLINFO si;
si.cbSize = sizeof(SCROLLINFO); si.cbSize = sizeof(SCROLLINFO);
@ -112,11 +112,11 @@ LRESULT CScrollboxWindow::OnHScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
break; break;
} }
SetScrollInfo(SB_HORZ, &si); SetScrollInfo(SB_HORZ, &si);
UpdateScrollbox(m_hWnd); UpdateCanvas(m_hWnd);
return 0; return 0;
} }
LRESULT CScrollboxWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CCanvasWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
SCROLLINFO si; SCROLLINFO si;
si.cbSize = sizeof(SCROLLINFO); si.cbSize = sizeof(SCROLLINFO);
@ -142,11 +142,11 @@ LRESULT CScrollboxWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOO
break; break;
} }
SetScrollInfo(SB_VERT, &si); SetScrollInfo(SB_VERT, &si);
UpdateScrollbox(m_hWnd); UpdateCanvas(m_hWnd);
return 0; return 0;
} }
LRESULT CScrollboxWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CCanvasWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
switch (toolsModel.GetActiveTool()) switch (toolsModel.GetActiveTool())
{ {
@ -167,7 +167,7 @@ LRESULT CScrollboxWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam,
return 0; return 0;
} }
LRESULT CScrollboxWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CCanvasWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
return ::SendMessage(GetParent(), nMsg, wParam, lParam); return ::SendMessage(GetParent(), nMsg, wParam, lParam);
} }

View file

@ -1,19 +1,19 @@
/* /*
* PROJECT: PAINT for ReactOS * PROJECT: PAINT for ReactOS
* LICENSE: LGPL * LICENSE: LGPL
* FILE: base/applications/mspaint/scrollbox.h * FILE: base/applications/mspaint/canvas.h
* PURPOSE: Functionality surrounding the scroll box window class * PURPOSE: Providing the canvas window class
* PROGRAMMERS: Benedikt Freisen * PROGRAMMERS: Benedikt Freisen
*/ */
#pragma once #pragma once
class CScrollboxWindow : public CWindowImpl<CScrollboxWindow> class CCanvasWindow : public CWindowImpl<CCanvasWindow>
{ {
public: public:
DECLARE_WND_CLASS_EX(_T("Scrollbox"), 0, COLOR_APPWORKSPACE) DECLARE_WND_CLASS_EX(_T("ReactOSPaintCanvas"), 0, COLOR_APPWORKSPACE)
BEGIN_MSG_MAP(CScrollboxWindow) BEGIN_MSG_MAP(CCanvasWindow)
MESSAGE_HANDLER(WM_SIZE, OnSize) MESSAGE_HANDLER(WM_SIZE, OnSize)
MESSAGE_HANDLER(WM_HSCROLL, OnHScroll) MESSAGE_HANDLER(WM_HSCROLL, OnHScroll)
MESSAGE_HANDLER(WM_VSCROLL, OnVScroll) MESSAGE_HANDLER(WM_VSCROLL, OnVScroll)
@ -28,4 +28,4 @@ public:
LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
}; };
void UpdateScrollbox(HWND hwndFrom); void UpdateCanvas(HWND hwndFrom);

View file

@ -61,7 +61,7 @@ class CMiniatureWindow;
class CToolBox; class CToolBox;
class CToolSettingsWindow; class CToolSettingsWindow;
class CPaletteWindow; class CPaletteWindow;
class CScrollboxWindow; class CCanvasWindow;
class CSelectionWindow; class CSelectionWindow;
class CImgAreaWindow; class CImgAreaWindow;
class CSizeboxWindow; class CSizeboxWindow;
@ -73,7 +73,7 @@ extern CMiniatureWindow miniature;
extern CToolBox toolBoxContainer; extern CToolBox toolBoxContainer;
extern CToolSettingsWindow toolSettingsWindow; extern CToolSettingsWindow toolSettingsWindow;
extern CPaletteWindow paletteWindow; extern CPaletteWindow paletteWindow;
extern CScrollboxWindow scrollboxWindow; extern CCanvasWindow canvasWindow;
extern CSelectionWindow selectionWindow; extern CSelectionWindow selectionWindow;
extern CImgAreaWindow imageArea; extern CImgAreaWindow imageArea;
extern CSizeboxWindow sizeboxLeftTop; extern CSizeboxWindow sizeboxLeftTop;

View file

@ -22,10 +22,10 @@ void CImgAreaWindow::drawZoomFrame(int mouseX, int mouseY)
LOGBRUSH logbrush; LOGBRUSH logbrush;
int rop; int rop;
RECT clientRectScrollbox; RECT clientRectCanvas;
RECT clientRectImageArea; RECT clientRectImageArea;
int x, y, w, h; int x, y, w, h;
scrollboxWindow.GetClientRect(&clientRectScrollbox); canvasWindow.GetClientRect(&clientRectCanvas);
GetClientRect(&clientRectImageArea); GetClientRect(&clientRectImageArea);
w = clientRectImageArea.right * 2; w = clientRectImageArea.right * 2;
h = clientRectImageArea.bottom * 2; h = clientRectImageArea.bottom * 2;
@ -33,8 +33,8 @@ void CImgAreaWindow::drawZoomFrame(int mouseX, int mouseY)
{ {
return; return;
} }
w = clientRectImageArea.right * clientRectScrollbox.right / w; w = clientRectImageArea.right * clientRectCanvas.right / w;
h = clientRectImageArea.bottom * clientRectScrollbox.bottom / h; h = clientRectImageArea.bottom * clientRectCanvas.bottom / h;
x = max(0, min(clientRectImageArea.right - w, mouseX - w / 2)); x = max(0, min(clientRectImageArea.right - w, mouseX - w / 2));
y = max(0, min(clientRectImageArea.bottom - h, mouseY - h / 2)); y = max(0, min(clientRectImageArea.bottom - h, mouseY - h / 2));
@ -54,7 +54,7 @@ LRESULT CImgAreaWindow::OnSize(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
{ {
if (!IsWindow()) if (!IsWindow())
return 0; return 0;
UpdateScrollbox(NULL); UpdateCanvas(NULL);
return 0; return 0;
} }
@ -346,7 +346,7 @@ LRESULT CImgAreaWindow::OnMouseLeave(UINT nMsg, WPARAM wParam, LPARAM lParam, BO
LRESULT CImgAreaWindow::OnImageModelDimensionsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) LRESULT CImgAreaWindow::OnImageModelDimensionsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{ {
UpdateScrollbox(NULL); UpdateCanvas(NULL);
return 0; return 0;
} }

View file

@ -60,7 +60,7 @@ CMiniatureWindow miniature;
CToolBox toolBoxContainer; CToolBox toolBoxContainer;
CToolSettingsWindow toolSettingsWindow; CToolSettingsWindow toolSettingsWindow;
CPaletteWindow paletteWindow; CPaletteWindow paletteWindow;
CScrollboxWindow scrollboxWindow; CCanvasWindow canvasWindow;
CSelectionWindow selectionWindow; CSelectionWindow selectionWindow;
CImgAreaWindow imageArea; CImgAreaWindow imageArea;
CSizeboxWindow sizeboxLeftTop; CSizeboxWindow sizeboxLeftTop;
@ -223,9 +223,9 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
RECT paletteWindowPos = {56, 9, 56 + 255, 9 + 32}; RECT paletteWindowPos = {56, 9, 56 + 255, 9 + 32};
paletteWindow.Create(hwnd, paletteWindowPos, NULL, WS_CHILD | WS_VISIBLE); paletteWindow.Create(hwnd, paletteWindowPos, NULL, WS_CHILD | WS_VISIBLE);
/* creating the scroll box */ // creating the canvas
RECT scrollboxWindowPos = {0, 0, 0 + 500, 0 + 500}; RECT canvasWindowPos = {0, 0, 0 + 500, 0 + 500};
scrollboxWindow.Create(hwnd, scrollboxWindowPos, NULL, canvasWindow.Create(hwnd, canvasWindowPos, NULL,
WS_CHILD | WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE, WS_EX_CLIENTEDGE); WS_CHILD | WS_GROUP | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE, WS_EX_CLIENTEDGE);
/* creating the status bar */ /* creating the status bar */
@ -236,9 +236,9 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
if (registrySettings.ShowStatusBar) if (registrySettings.ShowStatusBar)
ShowWindow(hStatusBar, SW_SHOWNOACTIVATE); ShowWindow(hStatusBar, SW_SHOWNOACTIVATE);
// Creating the window inside the scroll box // Creating the window inside the canvas
RECT imageAreaPos = {GRIP_SIZE, GRIP_SIZE, GRIP_SIZE + imageModel.GetWidth(), GRIP_SIZE + imageModel.GetHeight()}; RECT imageAreaPos = {GRIP_SIZE, GRIP_SIZE, GRIP_SIZE + imageModel.GetWidth(), GRIP_SIZE + imageModel.GetHeight()};
imageArea.Create(scrollboxWindow.m_hWnd, imageAreaPos, NULL, WS_CHILD | WS_VISIBLE); imageArea.Create(canvasWindow.m_hWnd, imageAreaPos, NULL, WS_CHILD | WS_VISIBLE);
/* create selection window (initially hidden) */ /* create selection window (initially hidden) */
RECT selectionWindowPos = {350, 0, 350 + 100, 0 + 100}; RECT selectionWindowPos = {350, 0, 350 + 100, 0 + 100};
@ -308,14 +308,14 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument
/* creating the size boxes */ /* creating the size boxes */
RECT sizeboxPos = {0, 0, GRIP_SIZE, GRIP_SIZE}; RECT sizeboxPos = {0, 0, GRIP_SIZE, GRIP_SIZE};
sizeboxLeftTop.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxLeftTop.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxCenterTop.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxCenterTop.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxRightTop.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxRightTop.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxLeftCenter.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxLeftCenter.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxRightCenter.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxRightCenter.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxLeftBottom.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxLeftBottom.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxCenterBottom.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxCenterBottom.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
sizeboxRightBottom.Create(scrollboxWindow.m_hWnd, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE); sizeboxRightBottom.Create(canvasWindow, sizeboxPos, NULL, WS_CHILD | WS_VISIBLE);
/* placing the size boxes around the image */ /* placing the size boxes around the image */
imageArea.SendMessage(WM_SIZE, 0, 0); imageArea.SendMessage(WM_SIZE, 0, 0);

View file

@ -39,6 +39,7 @@
#define WM_SELECTIONMODELREFRESHNEEDED (WM_APP + 7) #define WM_SELECTIONMODELREFRESHNEEDED (WM_APP + 7)
#include "resource.h" #include "resource.h"
#include "canvas.h"
#include "drawing.h" #include "drawing.h"
#include "dib.h" #include "dib.h"
#include "fullscreen.h" #include "fullscreen.h"
@ -49,7 +50,6 @@
#include "palette.h" #include "palette.h"
#include "palettemodel.h" #include "palettemodel.h"
#include "registry.h" #include "registry.h"
#include "scrollbox.h"
#include "selection.h" #include "selection.h"
#include "selectionmodel.h" #include "selectionmodel.h"
#include "sizebox.h" #include "sizebox.h"

View file

@ -46,7 +46,7 @@ zoomTo(int newZoom, int mouseX, int mouseY)
RECT clientRectScrollbox; RECT clientRectScrollbox;
RECT clientRectImageArea; RECT clientRectImageArea;
int x, y, w, h; int x, y, w, h;
scrollboxWindow.GetClientRect(&clientRectScrollbox); canvasWindow.GetClientRect(&clientRectScrollbox);
imageArea.GetClientRect(&clientRectImageArea); imageArea.GetClientRect(&clientRectImageArea);
w = clientRectImageArea.right * newZoom / toolsModel.GetZoom(); w = clientRectImageArea.right * newZoom / toolsModel.GetZoom();
h = clientRectImageArea.bottom * newZoom / toolsModel.GetZoom(); h = clientRectImageArea.bottom * newZoom / toolsModel.GetZoom();
@ -62,11 +62,11 @@ zoomTo(int newZoom, int mouseX, int mouseY)
toolsModel.SetZoom(newZoom); toolsModel.SetZoom(newZoom);
imageArea.MoveWindow(GRIP_SIZE, GRIP_SIZE, Zoomed(imageModel.GetWidth()), Zoomed(imageModel.GetHeight()), FALSE); imageArea.MoveWindow(GRIP_SIZE, GRIP_SIZE, Zoomed(imageModel.GetWidth()), Zoomed(imageModel.GetHeight()), FALSE);
scrollboxWindow.Invalidate(TRUE); canvasWindow.Invalidate(TRUE);
imageArea.Invalidate(FALSE); imageArea.Invalidate(FALSE);
scrollboxWindow.SendMessage(WM_HSCROLL, MAKEWPARAM(SB_THUMBPOSITION, x), 0); canvasWindow.SendMessage(WM_HSCROLL, MAKEWPARAM(SB_THUMBPOSITION, x), 0);
scrollboxWindow.SendMessage(WM_VSCROLL, MAKEWPARAM(SB_THUMBPOSITION, y), 0); canvasWindow.SendMessage(WM_VSCROLL, MAKEWPARAM(SB_THUMBPOSITION, y), 0);
return TRUE; return TRUE;
} }
@ -102,9 +102,9 @@ void CMainWindow::alignChildrenToMainWindow()
rcSpace.top += CY_PALETTE; rcSpace.top += CY_PALETTE;
} }
if (scrollboxWindow.IsWindow()) if (canvasWindow.IsWindow())
{ {
hDWP = ::DeferWindowPos(hDWP, scrollboxWindow, NULL, hDWP = ::DeferWindowPos(hDWP, canvasWindow, NULL,
rcSpace.left, rcSpace.top, rcSpace.left, rcSpace.top,
rcSpace.right - rcSpace.left, rcSpace.bottom - rcSpace.top, rcSpace.right - rcSpace.left, rcSpace.bottom - rcSpace.top,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREPOSITION); SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREPOSITION);
@ -216,9 +216,9 @@ LRESULT CMainWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
for (UINT i = 0; i < nCount; ++i) for (UINT i = 0; i < nCount; ++i)
{ {
if (zDelta < 0) if (zDelta < 0)
::PostMessageW(scrollboxWindow, WM_HSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0); ::PostMessageW(canvasWindow, WM_HSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
else if (zDelta > 0) else if (zDelta > 0)
::PostMessageW(scrollboxWindow, WM_HSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0); ::PostMessageW(canvasWindow, WM_HSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
} }
} }
else else
@ -227,9 +227,9 @@ LRESULT CMainWindow::OnMouseWheel(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL&
for (UINT i = 0; i < nCount; ++i) for (UINT i = 0; i < nCount; ++i)
{ {
if (zDelta < 0) if (zDelta < 0)
::PostMessageW(scrollboxWindow, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0); ::PostMessageW(canvasWindow, WM_VSCROLL, MAKEWPARAM(SB_LINEDOWN, 0), 0);
else if (zDelta > 0) else if (zDelta > 0)
::PostMessageW(scrollboxWindow, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0); ::PostMessageW(canvasWindow, WM_VSCROLL, MAKEWPARAM(SB_LINEUP, 0), 0);
} }
} }
} }