mycolordlgbar.h
上传用户:cding2008
上传日期:2007-01-03
资源大小:1812k
文件大小:3k
- /////////////////////////////////////////////////////////////////////////////
- // MyColorDlgBar.h : Header file; interface of the CCMyColorDlgBar class
- //
- // ModelMagic 3D and 'glOOP' (OpenGL Object Oriented Programming library)
- // Copyright (c) Craig Fahrnbach 1997, 1999
- //
- // 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.
- //
- /////////////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////////////
- // CMyColorDlgBar dialog
- class CMyColorDlgBar : public CDialogBar
- {
- // Construction
- public:
- CMyColorDlgBar();
- ~CMyColorDlgBar();
- BOOL Create( CWnd* pParentWnd, UINT nIDTemplate, UINT nStyle,
- UINT nID, BOOL bChange);
- BOOL Create( CWnd* pParentWnd, LPCTSTR lpszTemplateName,
- UINT nStyle, UINT nID, BOOL bChange);
- // Attributes
- public:
- CMyColorPaletteWnd* m_pColorWnd; // Color palette window
- CWnd* m_pLButtonWnd; // Left mouse button color window
- // CWnd* m_pRButtonWnd; // Right mouse button color window
- CWnd* m_pColorGradientWnd;// Our color gradient window
- CSliderCtrl* m_pSliderCtrl; // Slider control
- CComboBox* m_pComboBox; // Color combo box
- CSize m_sizeDocked; // Docking dialog size
- CSize m_sizeFloating; // Floating dialog size
- BOOL m_bChangeDockedSize;// Indicates whether to keep
- // a default size for docking
- C3dColor m_Color;
- HFONT m_hFont;
- private:
- C3dColor m_ColorRef;
- int m_iSliderMaxRange;
- int m_iInitColorSliderPos;
- float m_fRedPlus;
- float m_fRedMinus;
- float m_fGrnPlus;
- float m_fGrnMinus;
- float m_fBluPlus;
- float m_fBluMinus;
- // Operations
- public:
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMyColorDlgBar)
- //}}AFX_VIRTUAL
- virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode );
-
- // Implementation
- public:
- private:
- void PaintSelColorWnd(CWnd* pWnd, C3dColor* pColor);
- void PaintRangeWnd(C3dColor* pColor, int iPosn, int iRange);
- void PaintObject(C3dColor* pColor);
- void ResetColorSlider();
- // Generated message map functions
- protected:
- //{{AFX_MSG(CMyColorDlgBar)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
- afx_msg BOOL OnQueryNewPalette();
- afx_msg void OnDestroy();
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void OnPaint();
- afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
- afx_msg void OnDropdown();
- afx_msg void OnSelchange();
- afx_msg void OnParentNotify(UINT message, LPARAM lParam);
- afx_msg void OnTimer(UINT nIDEvent);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- // User defined messages
- long OnColorPaletteLButtonDown(WPARAM wParam, LPARAM lParam);
- long OnColorPaletteRButtonDown(WPARAM wParam, LPARAM lParam);
- };
-
- /////////////////////////////////////////////////////////////////////////////