ReactOS 0.4.15-dev-8109-gd7be748
palette.h
Go to the documentation of this file.
1/*
2 * PROJECT: PAINT for ReactOS
3 * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4 * PURPOSE: Window procedure of the palette window
5 * COPYRIGHT: Copyright 2015 Benedikt Freisen <b.freisen@gmx.net>
6 */
7
8#pragma once
9
10#define CXY_COLORBOX 16 /* width / height of a normal color box */
11#define CXY_BIGBOX (CXY_COLORBOX * 2) /* width / height of the big box */
12#define CY_PALETTE (8 + CXY_BIGBOX + 8)
13
14class CPaletteWindow : public CWindowImpl<CPaletteWindow>
15{
16public:
18
30
32 virtual ~CPaletteWindow();
33
34protected:
35 HBITMAP m_hbmCached; // Cached buffer bitmap
36
38 LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
46
47protected:
48 INT DoHitTest(INT xPos, INT yPos) const;
49};
#define WM_PALETTEMODELCOLORCHANGED
Definition: precomp.h:52
virtual ~CPaletteWindow()
Definition: palette.cpp:28
LRESULT OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:187
LRESULT OnRButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:169
LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:181
LRESULT OnLButtonUp(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:211
LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:78
LRESULT OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:157
INT DoHitTest(INT xPos, INT yPos) const
Definition: palette.cpp:55
LRESULT OnEraseBkgnd(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:73
HBITMAP m_hbmCached
Definition: palette.h:35
LRESULT OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:149
LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: palette.cpp:140
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
Definition: atlwin.h:2004
static HBITMAP
Definition: button.c:44
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
int32_t INT
Definition: typedefs.h:58
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WM_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1778
#define WM_RBUTTONDBLCLK
Definition: winuser.h:1781
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define CS_DBLCLKS
Definition: winuser.h:651
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define COLOR_BTNFACE
Definition: winuser.h:928