EditColorDlg.h
资源名称:gloop.zip [点击查看]
上传用户:shxiangxiu
上传日期:2007-01-03
资源大小:1101k
文件大小:3k
源码类别:
OpenGL
开发平台:
Visual C++
- /////////////////////////////////////////////////////////////////////////////
- // EditColorDlg.h : Header file; Defines the class definitions
- //
- // glOOP (OpenGL Object Oriented Programming library)
- // Copyright (c) Craig Fahrnbach 1997, 1998
- //
- // OpenGL is a registered trademark of Silicon Graphics
- //
- //
- // This program is provided for educational and personal use only and
- // is provided without guarantee or warrantee expressed or implied.
- //
- // Commercial use is strickly prohibited without written permission
- // from ImageWare Development.
- //
- // This program is -not- in the public domain.
- //
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // CEditColorDlg dialog
- class CEditColorDlg : public CDialog
- {
- // Construction
- public:
- CEditColorDlg(C3dColorList* pList, C3dColor* pColor,
- CWnd* pParent = NULL); // modified constructor
- // Dialog Data
- //{{AFX_DATA(CEditColorDlg)
- enum { IDD = IDD_EDIT_COLOR_DIALOG };
- CSliderCtrl m_wndGradientSlider;
- CComboBox m_wndColorComboBox;
- float m_fBlu;
- float m_fGrn;
- float m_fRed;
- float m_fAlpha;
- //}}AFX_DATA
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CEditColorDlg)
- public:
- virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- //Attributes
- public:
- C3dColor m_Color;
- protected:
- CMyColorPaletteWnd m_wndColorCube;
- CWnd m_wndGradient;
- CWnd m_wndSelColor;
- C3dColor m_ColorRef;
- C3dColorList* m_pList;
- int m_iSliderMaxRange;
- int m_iInitColorSliderPos;
- float m_fRedPlus;
- float m_fRedMinus;
- float m_fGrnPlus;
- float m_fGrnMinus;
- float m_fBluPlus;
- float m_fBluMinus;
- // Implementation
- protected:
- void PaintSelColorWnd();
- void PosnGradientSlider();
- void PaintGradientWnd();
- void UpDateRGBValues();
- // Generated message map functions
- //{{AFX_MSG(CEditColorDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg void OnDropdownColorCombo();
- afx_msg void OnSelchangeColorCombo();
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnPaint();
- afx_msg void OnKillfocusRed();
- afx_msg void OnKillfocusGrn();
- afx_msg void OnKillfocusBlu();
- afx_msg void OnKillfocusAlpha();
- afx_msg void OnDestroy();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- // User defined messages
- long OnColorPaletteLButtonDown(WPARAM wParam, LPARAM lParam);
- };