mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
[MSPAINT] Allow ToolBox to be right-aligned (#5213)
The user will be able to move ToolBox in the main window by dragging. - Add Bar2ID registry setting. - Add CPaintToolBar class to encapsulate the toolbar code. - Capture and track the mouse dragging in CToolBox. - Move the ToolBox if dragging is beyond the center position. CORE-18867
This commit is contained in:
parent
ce562727b8
commit
83e83bfd2c
6 changed files with 130 additions and 48 deletions
|
@ -15,6 +15,12 @@
|
|||
#define CX_TOOLBAR (TOOLBAR_COLUMNS * CXY_TB_BUTTON)
|
||||
#define CY_TOOLBAR (TOOLBAR_ROWS * CXY_TB_BUTTON)
|
||||
|
||||
class CPaintToolBar : public CWindow
|
||||
{
|
||||
public:
|
||||
BOOL DoCreate(HWND hwndParent);
|
||||
};
|
||||
|
||||
class CToolBox : public CWindowImpl<CToolBox>
|
||||
{
|
||||
public:
|
||||
|
@ -24,16 +30,22 @@ public:
|
|||
MESSAGE_HANDLER(WM_CREATE, OnCreate)
|
||||
MESSAGE_HANDLER(WM_SYSCOLORCHANGE, OnSysColorChange)
|
||||
MESSAGE_HANDLER(WM_COMMAND, OnCommand)
|
||||
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
|
||||
MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
|
||||
MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUp)
|
||||
MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged)
|
||||
END_MSG_MAP()
|
||||
|
||||
BOOL DoCreate(HWND hwndParent);
|
||||
|
||||
private:
|
||||
CWindow toolbar;
|
||||
CPaintToolBar toolbar;
|
||||
|
||||
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnSysColorChange(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue