[MSPAINT] Allow paletteWindow to be bottom-aligned (#5216)

The user will be able to move the palette window to bottom by dragging.
- Add Bar1ID registry setting.
- Move paletteWindow to top or bottom in mainWindow's WM_SIZE handling.
- Track the mouse dragging on paletteWindow.
- If the dragging is beyond the center point, then move paletteWindow.
CORE-18867
This commit is contained in:
Katayama Hirofumi MZ 2023-04-04 19:06:06 +09:00 committed by GitHub
parent ccef43f3b0
commit d0c657074d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 74 additions and 6 deletions

View file

@ -147,7 +147,7 @@ LRESULT CToolBox::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHa
RECT rc;
mainWindow.GetWindowRect(&rc);
POINT ptCenter = { (rc.left + rc.right) / 2, (rc.bottom - rc.top) / 2 };
POINT ptCenter = { (rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2 };
DWORD dwExpectedBar2ID = ((pt.x < ptCenter.x) ? BAR2ID_LEFT : BAR2ID_RIGHT);