From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Plugins/General/gen_ml/skinneddlg.cpp | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Src/Plugins/General/gen_ml/skinneddlg.cpp (limited to 'Src/Plugins/General/gen_ml/skinneddlg.cpp') diff --git a/Src/Plugins/General/gen_ml/skinneddlg.cpp b/Src/Plugins/General/gen_ml/skinneddlg.cpp new file mode 100644 index 00000000..fbf3968e --- /dev/null +++ b/Src/Plugins/General/gen_ml/skinneddlg.cpp @@ -0,0 +1,45 @@ +#include "../winamp/wa_dlg.h" +#include "./skinneddlg.h" + + +SkinnedDialog::SkinnedDialog(void) : SkinnedWnd(TRUE) +{ +} + +SkinnedDialog::~SkinnedDialog(void) +{ +} + +BOOL SkinnedDialog::Attach(HWND hwndDialog) +{ + if(!__super::Attach(hwndDialog)) return FALSE; + SetType(SKINNEDWND_TYPE_DIALOG); + return TRUE; +} + +HBRUSH SkinnedDialog::OnColorDialog(HDC hdc) +{ + if (hdc) + { + SetTextColor(hdc, WADlg_getColor(WADLG_WNDFG)); + SetBkColor(hdc, WADlg_getColor(WADLG_WNDBG)); + } + return (HBRUSH)MlStockObjects_Get(WNDBCK_BRUSH); +} + + +LRESULT SkinnedDialog::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch(uMsg) + { + case WM_NCPAINT: + case WM_NCCALCSIZE: + __super::WindowProc(uMsg, wParam, lParam); + return TRUE; + + case WM_CTLCOLORDLG: + if (SWS_USESKINCOLORS & style) return (LRESULT)OnColorDialog((HDC)wParam); + break; + } + return __super::WindowProc(uMsg, wParam, lParam); +} \ No newline at end of file -- cgit