1
0

skinneddlg.cpp 883 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include "../winamp/wa_dlg.h"
  2. #include "./skinneddlg.h"
  3. SkinnedDialog::SkinnedDialog(void) : SkinnedWnd(TRUE)
  4. {
  5. }
  6. SkinnedDialog::~SkinnedDialog(void)
  7. {
  8. }
  9. BOOL SkinnedDialog::Attach(HWND hwndDialog)
  10. {
  11. if(!__super::Attach(hwndDialog)) return FALSE;
  12. SetType(SKINNEDWND_TYPE_DIALOG);
  13. return TRUE;
  14. }
  15. HBRUSH SkinnedDialog::OnColorDialog(HDC hdc)
  16. {
  17. if (hdc)
  18. {
  19. SetTextColor(hdc, WADlg_getColor(WADLG_WNDFG));
  20. SetBkColor(hdc, WADlg_getColor(WADLG_WNDBG));
  21. }
  22. return (HBRUSH)MlStockObjects_Get(WNDBCK_BRUSH);
  23. }
  24. LRESULT SkinnedDialog::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
  25. {
  26. switch(uMsg)
  27. {
  28. case WM_NCPAINT:
  29. case WM_NCCALCSIZE:
  30. __super::WindowProc(uMsg, wParam, lParam);
  31. return TRUE;
  32. case WM_CTLCOLORDLG:
  33. if (SWS_USESKINCOLORS & style) return (LRESULT)OnColorDialog((HDC)wParam);
  34. break;
  35. }
  36. return __super::WindowProc(uMsg, wParam, lParam);
  37. }