////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2005 Sergey Solozhentsev
// Author: Sergey Solozhentsev e-mail: salos@mail.ru
// Product: WTL Helper
// File: ColorSetupDlg.h
// Created: 08.09.2005 16:59
//
// Using this software in commercial applications requires an author
// permission. The permission will be granted to everyone excluding the cases
// when someone simply tries to resell the code.
// This file may be redistributed by any means PROVIDING it is not sold for
// profit without the authors written consent, and providing that this notice
// and the authors name is included.
// This file is provided "as is" with no expressed or implied warranty. The
// author accepts no liability if it causes any damage to you or your computer
// whatsoever.
//
////////////////////////////////////////////////////////////////////////////////
// This file was generated by WTL Dialog wizard
// dialog\ColorSetupDlg.h : Declaration of the CColorSetupDlg
#pragma once
#include "../resource.h" // main symbols
#include <atlddx.h>
#include <atldlgs.h>
#include "ColorButton.h"
// CColorSetupDlg
class CColorSetupDlg :
public CDialogImpl<CColorSetupDlg>,
public CSettings<CColorSetupDlg>
{
CColorButton m_WindowsText;
CColorButton m_WindowsBack;
CColorButton m_CommandText;
CColorButton m_CommandBack;
CColorButton m_NotifyText;
CColorButton m_NotifyBack;
CColorButton m_ReflectText;
CColorButton m_ReflectBack;
COLORREF m_clDefTextColor;
COLORREF m_clDefBackColor;
CBrush m_WindowsBrush;
CBrush m_CommandBrush;
CBrush m_NotifyBrush;
CBrush m_ReflectBrush;
public:
CColorSetupDlg();
~CColorSetupDlg();
enum { IDD = IDD_COLORSETUPDLG };
COLORREF m_clWindowsText;
COLORREF m_clWindowsBack;
COLORREF m_clCommandText;
COLORREF m_clCommandBack;
COLORREF m_clNotifyText;
COLORREF m_clNotifyBack;
COLORREF m_clReflectText;
COLORREF m_clReflectBack;
BEGIN_MSG_MAP(CColorSetupDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnCtrlColor)
COMMAND_HANDLER(IDOK, BN_CLICKED, OnClickedOK)
COMMAND_HANDLER(IDCANCEL, BN_CLICKED, OnClickedCancel)
COMMAND_HANDLER(IDC_BUTTON_RESET, BN_CLICKED, OnButtonReset)
COMMAND_HANDLER(IDC_BUTTON_IMPORT, BN_CLICKED, OnImport)
COMMAND_HANDLER(IDC_BUTTON_EXPORT, BN_CLICKED, OnExport)
NOTIFY_RANGE_CODE_HANDLER(IDC_BUTTON_WINDOWS_TEXT_COLOR, IDC_BUTTON_WINDOWS_BACK_COLOR, CPN_SELCHANGE, OnWindowColorChange)
NOTIFY_RANGE_CODE_HANDLER(IDC_BUTTON_COMMAND_TEXT_COLOR, IDC_BUTTON_COMMAND_BACK_COLOR, CPN_SELCHANGE, OnCommandColorChange)
NOTIFY_RANGE_CODE_HANDLER(IDC_BUTTON_NOTIFY_TEXT_COLOR, IDC_BUTTON_NOTIFY_BACK_COLOR, CPN_SELCHANGE, OnNotifyColorChange)
NOTIFY_RANGE_CODE_HANDLER(IDC_BUTTON_REFLECT_TEXT_COLOR, IDC_BUTTON_REFLECT_BACK_COLOR, CPN_SELCHANGE, OnReflectColorChange)
REFLECT_NOTIFICATIONS()
END_MSG_MAP()
BEGIN_SETTINGS_MAP()
SETTINGS_VARIABLE_OPT(m_clWindowsText)
SETTINGS_VARIABLE_OPT(m_clWindowsBack)
SETTINGS_VARIABLE_OPT(m_clCommandText)
SETTINGS_VARIABLE_OPT(m_clCommandBack)
SETTINGS_VARIABLE_OPT(m_clNotifyText)
SETTINGS_VARIABLE_OPT(m_clNotifyBack)
SETTINGS_VARIABLE_OPT(m_clReflectText)
SETTINGS_VARIABLE_OPT(m_clReflectBack)
END_SETTINGS_MAP()
// Handler prototypes:
// LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
// LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
// LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnClickedOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnClickedCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnCtrlColor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnWindowColorChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnCommandColorChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnNotifyColorChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnReflectColorChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnButtonReset(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnImport(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnExport(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
};