From: <sag...@us...> - 2010-05-08 16:57:54
|
Revision: 589 http://modplug.svn.sourceforge.net/modplug/?rev=589&view=rev Author: saga-games Date: 2010-05-08 16:57:45 +0000 (Sat, 08 May 2010) Log Message: ----------- [Fix] General Tab: The background colour of the tabs in the channel configuration is now also correct when using WinXP Luna or Vista/Win7 Aero. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/View_gen.h Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 15:35:40 UTC (rev 588) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2010-05-08 16:57:45 UTC (rev 589) @@ -23,6 +23,7 @@ ON_WM_HSCROLL() ON_WM_VSCROLL() ON_WM_DESTROY() + ON_WM_CTLCOLOR() // -> CODE#0015 // -> DESC="channels management dlg" @@ -1483,3 +1484,27 @@ AfxMessageBox("Not yet implemented."); } + +typedef HRESULT (__stdcall * ETDT)(HWND, DWORD); + +HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor) +//------------------------------------------------------------------- +{ + static bool bUxInited = false; + static ETDT m_ETDT = nullptr; + + if(!bUxInited) + { + HMODULE uxlib = LoadLibrary("uxtheme.dll"); + if(uxlib) + m_ETDT = (ETDT)GetProcAddress(uxlib, "EnableThemeDialogTexture"); + bUxInited = true; + } + switch(nCtlColor) + { + case CTLCOLOR_DLG: + if(m_ETDT) + m_ETDT(*pWnd, ETDT_ENABLETAB); + } + return CFormView::OnCtlColor(pDC, pWnd, nCtlColor); +} Modified: trunk/OpenMPT/mptrack/View_gen.h =================================================================== --- trunk/OpenMPT/mptrack/View_gen.h 2010-05-08 15:35:40 UTC (rev 588) +++ trunk/OpenMPT/mptrack/View_gen.h 2010-05-08 16:57:45 UTC (rev 589) @@ -68,7 +68,9 @@ virtual void UpdateView(DWORD dwHintMask=0, CObject *pObj=NULL); virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); virtual LRESULT OnModViewMsg(WPARAM, LPARAM); -// -> CODE#0015 + virtual HBRUSH OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor); + + // -> CODE#0015 // -> DESC="channels management dlg" virtual void OnDraw(CDC* pDC); // -! NEW_FEATURE#0015 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |