StyleBar.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #if !defined(AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_)
  2. #define AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // StyleBar.h : header file
  7. //
  8. #include"Resource.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CStyleBar command target
  11. #include <afxtempl.h>
  12. #include <afxcoll.h>
  13. class CStyleBar : public CToolBar
  14. {
  15. // Attributes
  16. public:
  17. void OnCharBold();
  18. // Operations
  19. public:
  20. void IniFont();
  21. void OnCharUnderline();
  22. void OnCharItalic();
  23. static int CALLBACK EnumFontNameProc (ENUMLOGFONT* lpelf,
  24. NEWTEXTMETRIC* lpntm, int nFontType, LPARAM lParam);
  25. BOOL isBoldUp;
  26. BOOL isUnderlineUp;
  27. BOOL isItalicUp;
  28. // Overrides
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CStyleBar)
  31. //}}AFX_VIRTUAL
  32. // Implementation
  33. protected:
  34. void InitTypefaceList (CDC* pDC);
  35. CFont m_font;
  36. CComboBox m_wndFontNames;
  37. CComboBox m_wndFontSizes;
  38. CMap<int,int,ENUMLOGFONT,ENUMLOGFONT>m_FontMap;
  39. // Generated message map functions
  40. //{{AFX_MSG(CStyleBar)
  41. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  42. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  43. //}}AFX_MSG
  44. afx_msg void OnSelectFont ();
  45. afx_msg void OnSelectSize ();
  46. //afx_msg void OnCharBold();
  47. // afx_msg void OnCharItalic();
  48. DECLARE_MESSAGE_MAP()
  49. };
  50. /////////////////////////////////////////////////////////////////////////////
  51. //{{AFX_INSERT_LOCATION}}
  52. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  53. #endif // !defined(AFX_STYLEBAR_H__C85C9099_A154_11D2_8E53_006008A82731__INCLUDED_)