Hello,
This is my first question posted on this forum.
I encounter an debug exception in MFC code after I change the skin of my application. The application has lots of existing MFC components and I added a ribbon bar and docking pane manager to an MDI MainFrame.
The call stack leads to MFC code CControlBar::OnCtlColor with comments "force black text on gray background all the time". Inside CWnd::GrayCtlColor exists a verify assertion that fails:
VERIFY(::GetObject(hbrGray, sizeof(LOGBRUSH), (LPVOID)&logbrush));
The call stack after the skin change:
CWnd::GrayCtlColor(HDC__ * hDC, HWND__ * hWnd, unsigned int nCtlColor, HBRUSH__ * hbrGray, unsigned long clrText) Line 4356 CControlBar::OnCtlColor(CDC * pDC, CWnd * pWnd, unsigned int nCtlColor) Line 686 CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2341 CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2087 CControlBar::WindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 506 CWnd::OnNTCtlColor(unsigned __int64 wParam, __int64 lParam) Line 1528 CWnd::OnWndMsg(unsigned int message, unsigned __int64 wParam, __int64 lParam, __int64 * pResult) Line 2383 CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2087 CControlBar::WindowProc(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 506 AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 257 AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 420 [External Code] CXTPSkinManagerDetoursApiHook::OnHookDefDlgProcW(HWND__ * hWnd, unsigned int Msg, unsigned __int64 wParam, __int64 lParam) Line 1133 ... ... ... CXTPSkinManager::OnSkinChanged(int bPrevState, int bNewState) Line 1118
I am posting this question because I do not see any of our own code involved. Do you have any idea what I might be doing wrong, or how I can continue to investigate (if it is a serious issue)?
MFC version 10 (of toolkit v100 of Visual Studio 2010) ToolKit Pro MFC: 19.3.0
Kind regards, Peter
|