EditColorsDlg.h
上传用户:shxiangxiu
上传日期:2007-01-03
资源大小:1101k
文件大小:2k
源码类别:

OpenGL

开发平台:

Visual C++

  1. /////////////////////////////////////////////////////////////////////////////
  2. // EditColorsDlg.h : Header file; Defines the class definitions
  3. //
  4. // glOOP (OpenGL Object Oriented Programming library)
  5. // Copyright (c) Craig Fahrnbach 1997, 1998
  6. //
  7. // OpenGL is a registered trademark of Silicon Graphics
  8. //
  9. //
  10. // This program is provided for educational and personal use only and
  11. // is provided without guarantee or warrantee expressed or implied.
  12. //
  13. // Commercial use is strickly prohibited without written permission
  14. // from ImageWare Development.
  15. //
  16. // This program is -not- in the public domain.
  17. //
  18. /////////////////////////////////////////////////////////////////////////////
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CEditColorsDlg dialog
  21. class AFX_EXT_CLASS CEditColorsDlg : public CDialog
  22. {
  23. // Construction
  24. public:
  25. CEditColorsDlg(C3dColorList* pColorList, CWnd* pParent = NULL);   // standard constructor
  26. // Dialog Data
  27. //{{AFX_DATA(CEditColorsDlg)
  28. enum { IDD = IDD_EDIT_COLORS_DIALOG };
  29. CListBox m_ListBox;
  30. float m_fRed;
  31. float m_fGrn;
  32. float m_fBlu;
  33. CString m_szColorName;
  34. float m_fAlpha;
  35. //}}AFX_DATA
  36. // Overrides
  37. // ClassWizard generated virtual function overrides
  38. //{{AFX_VIRTUAL(CEditColorsDlg)
  39. protected:
  40. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  41. //}}AFX_VIRTUAL
  42. //Attributes
  43. protected:
  44. CWnd m_wndButtonColor;
  45. C3dColor* m_pListSelColor;// Pointer to last selected color
  46. HPALETTE m_hPalette; // Handle to a palette
  47. C3dColorList* m_pList; // Save the list pointer
  48. // passed at initialization
  49. // Implementation
  50. public:
  51. void ResetDlg(C3dColorList* pColorList);
  52. protected:
  53. void SaveDialogData(C3dColor* pColor);
  54. void LoadDialogData(C3dColor* pColor);
  55. void PaintButtonWnd();
  56. // Generated message map functions
  57. //{{AFX_MSG(CEditColorsDlg)
  58. virtual BOOL OnInitDialog();
  59. virtual void OnOK();
  60. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  61. afx_msg void OnSelchangeColorList();
  62. afx_msg void OnNew();
  63. afx_msg void OnButtonColor();
  64. afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
  65. afx_msg void OnKillfocusRed();
  66. afx_msg void OnKillfocusGrn();
  67. afx_msg void OnKillfocusBlu();
  68. afx_msg void OnKillfocusAlpha();
  69. //}}AFX_MSG
  70. DECLARE_MESSAGE_MAP()
  71. };