CXTTipWindow::CreateShadow() bug |
Post Reply |
Author | |
VolkerE
Newbie Joined: 09 February 2006 Location: Germany Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 04 January 2011 at 3:42am |
To correctly modify the window class style in lines 109 and 114, GetClassLong() must be called instead of GetWindowLong() (which returns 0 instead of the current style).
But even after fixing this: this implemention will cause an assertion in the debug build each time a tip window with m_dwTipStyle == (TWS_XT_ALPHASHADOW | TWS_XT_DROPSHADOW) has been displayed. Next time a tip window is created the following assertion in AfxRegisterWndClass() will fail: // see if the class already exists WNDCLASS wndcls; if (::AfxCtxGetClassInfo(hInst, lpszName, &wndcls)) { // already registered, assert everything is good ASSERT(wndcls.style == nClassStyle); |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Thanks a lot. Please also change Create method as
BOOL CXTPTipWindow::Create(CWnd* pParentWnd) { // register the wnd class. XTPDrawHelpers()->RegisterWndClass(0, _T("XTPTipWindow"), CS_SAVEBITS | CS_HREDRAW | CS_VREDRAW); // call the base class for creation. if (!CWnd::CreateEx(0, _T("XTPTipWindow"), _T(""), WS_POPUP, 0, 0, 0, 0, pParentWnd->m_hWnd, 0, NULL)) { ...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
VolkerE
Newbie Joined: 09 February 2006 Location: Germany Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Hi Oleg,
thank you for the quick response. Works fine now... Regards, Volker |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |