Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.9 KiB

  1. #if !defined(AFX_CREDITSTATIC_H__4ABD7701_49F5_11D1_9E3C_00A0245800CF__INCLUDED_)
  2. #define AFX_CREDITSTATIC_H__4ABD7701_49F5_11D1_9E3C_00A0245800CF__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // CreditStatic.h : header file
  7. //
  8. #define DISPLAY_SLOW 0
  9. #define DISPLAY_MEDIUM 1
  10. #define DISPLAY_FAST 2
  11. #define BACKGROUND_COLOR 0
  12. #define TOP_LEVEL_TITLE_COLOR 1
  13. #define TOP_LEVEL_GROUP_COLOR 2
  14. #define GROUP_TITLE_COLOR 3
  15. #define NORMAL_TEXT_COLOR 4
  16. #define TOP_LEVEL_TITLE_HEIGHT 0
  17. #define TOP_LEVEL_GROUP_HEIGHT 1
  18. #define GROUP_TITLE_HEIGHT 2
  19. #define NORMAL_TEXT_HEIGHT 3
  20. #define TOP_LEVEL_TITLE 0 // '\t'
  21. #define TOP_LEVEL_GROUP 1 // '\n'
  22. #define GROUP_TITLE 2 // '\r'
  23. #define DISPLAY_BITMAP 3 // '^'
  24. #define GRADIENT_NONE 0
  25. #define GRADIENT_RIGHT_DARK 1
  26. #define GRADIENT_RIGHT_LIGHT 2
  27. #define GRADIENT_LEFT_DARK 3
  28. #define GRADIENT_LEFT_LIGHT 4
  29. class CCreditStatic : public CStatic
  30. {
  31. protected:
  32. COLORREF m_Colors[5];
  33. short m_TextHeights[4];
  34. TCHAR m_Escapes[4];
  35. // short m_DisplaySpeed[3],
  36. short m_CurrentSpeed;
  37. RECT m_ScrollRect; // rect of Static Text frame
  38. CStringList *m_pArrCredit;
  39. // CString m_szWork;
  40. LPCTSTR m_szWork;
  41. short m_nCounter; // work ints
  42. POSITION m_ArrIndex;
  43. short m_nClip,m_ScrollAmount;
  44. short m_nCurrentFontHeight;
  45. HBITMAP m_BmpMain;
  46. BOOL m_bFirstTurn;
  47. UINT m_Gradient;
  48. short n_MaxWidth;
  49. UINT TimerOn;
  50. // Construction
  51. public:
  52. CCreditStatic();
  53. // Attributes
  54. public:
  55. // Operations
  56. public:
  57. BOOL StartScrolling();
  58. void EndScrolling();
  59. void SetCredits(LPCTSTR credits, TCHAR delimiter = TEXT('|'));
  60. // void SetCredits(UINT nID, TCHAR delimiter = TEXT('|'));
  61. // void SetSpeed(UINT index, int speed = 0);
  62. // void SetColor(UINT index, COLORREF col);
  63. // void SetTextHeight(UINT index, int height);
  64. // void SetEscape(UINT index, char escape);
  65. // void SetGradient(UINT value = GRADIENT_RIGHT_DARK);
  66. // BOOL SetBkImage(UINT nIDResource);
  67. // BOOL SetBkImage(LPCTSTR lpszResourceName);
  68. // void SetTransparent(BOOL bTransparent = TRUE);
  69. // Overrides
  70. // ClassWizard generated virtual function overrides
  71. //{{AFX_VIRTUAL(CCreditStatic)
  72. //}}AFX_VIRTUAL
  73. // Implementation
  74. public:
  75. virtual ~CCreditStatic();
  76. // Generated message map functions
  77. protected:
  78. void MoveCredit(HDC* pDC, RECT& ClientRect, BOOL bCheck);
  79. void FillGradient(HDC *pDC, RECT& m_FillRect);
  80. //{{AFX_MSG(CCreditStatic)
  81. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  82. afx_msg void OnTimer(UINT nIDEvent);
  83. afx_msg void OnDestroy();
  84. //}}AFX_MSG
  85. DECLARE_MESSAGE_MAP()
  86. };
  87. /////////////////////////////////////////////////////////////////////////////
  88. //{{AFX_INSERT_LOCATION}}
  89. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  90. #endif // !defined(AFX_CREDITSTATIC_H__4ABD7701_49F5_11D1_9E3C_00A0245800CF__INCLUDED_)