infoBox.h 714 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NULLSOFT_ML_INFOBOX_HEADER
  2. #define NULLSOFT_ML_INFOBOX_HEADER
  3. #include <windows.h>
  4. #define CAPTION_LENGTH 64
  5. class MLInfoBox
  6. {
  7. public:
  8. MLInfoBox(void);
  9. ~MLInfoBox(void);
  10. public:
  11. void SetColors(COLORREF bodyBG, COLORREF headerFG, COLORREF headerBG);
  12. void Init(HWND hwnd);
  13. protected:
  14. static LRESULT CALLBACK newWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
  15. void SetSize(int cx, int cy);
  16. private:
  17. HWND m_hwnd;
  18. WNDPROC oldWndProc;
  19. wchar_t headerText[CAPTION_LENGTH];
  20. BOOL drawHeader;
  21. COLORREF headerBG;
  22. COLORREF headerFG;
  23. COLORREF bodyBG;
  24. HFONT headerFont;
  25. HBRUSH headerBrush;
  26. HBRUSH bodyBrush;
  27. RECT rcBody;
  28. RECT rcHeader;
  29. };
  30. #endif // NULLSOFT_ML_INFOBOX_HEADER