1 /* 2 * PROJECT: PAINT for ReactOS 3 * LICENSE: LGPL 4 * FILE: base/applications/mspaint/palette.h 5 * PURPOSE: Window procedure of the palette window 6 * PROGRAMMERS: Benedikt Freisen 7 */ 8 9 #pragma once 10 11 class CPaletteWindow : public CWindowImpl<CPaletteWindow> 12 { 13 public: 14 DECLARE_WND_CLASS_EX(_T("Palette"), CS_DBLCLKS, COLOR_BTNFACE) 15 16 BEGIN_MSG_MAP(CPaletteWindow) 17 MESSAGE_HANDLER(WM_PAINT, OnPaint) 18 MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) 19 MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown) 20 MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk) 21 MESSAGE_HANDLER(WM_RBUTTONDBLCLK, OnRButtonDblClk) 22 MESSAGE_HANDLER(WM_PALETTEMODELCOLORCHANGED, OnPaletteModelColorChanged) 23 MESSAGE_HANDLER(WM_PALETTEMODELPALETTECHANGED, OnPaletteModelPaletteChanged) 24 END_MSG_MAP() 25 26 LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 27 LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 28 LRESULT OnRButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 29 LRESULT OnLButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 30 LRESULT OnRButtonDblClk(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 31 LRESULT OnPaletteModelColorChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 32 LRESULT OnPaletteModelPaletteChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 33 }; 34