Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - NULL-Window Handle after updating to 9.70
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

NULL-Window Handle after updating to 9.70

 Post Reply Post Reply
Author
Message
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Topic: NULL-Window Handle after updating to 9.70
    Posted: 08 July 2005 at 9:31am

Having a a modal dialog with a menubar, I just upgraded the library to 9.70.

Now an assertion appears sometimes(!) inside the following function

void CXTPPopupBar::Animate()
{
 CXTPCommandBar* pParentCommandBar = GetParentCommandBar();

 BOOL bAnimate = pParentCommandBar? pParentCommandBar->m_bAnimatePopup: TRUE;

 if (bAnimate)
 {
  if (IsCustomizeMode() || GetWindow(GW_CHILD))
   bAnimate = FALSE;
 }
 
 ...

The bold function GetWindow(GW_CHILD) asserts with a NULL m_hWnd handle. Although it asserts, it still behaves correctly.

Question: Anything I can do to get rid of that assertion?

Thanks
Uwe

Back to Top
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2005 at 9:34am

Addendum: Seems it was due to the fact I put a breakpoint somewhere in some related code and the created windows seems to confuse things a little bit, once the debugger breaked and then continued.

It did not appear anymore. Sorry for posting.

Back to Top
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2005 at 10:41am

Now it appears again, even without any debug breakpoints occuring before.

This is the call stack when the assertion fails:

  mfc71ud.dll!CWnd::GetWindow(unsigned int nCmd=5)  Line 276 + 0x2b C++
> XTP9700Libud.dll!CXTPPopupBar::Animate()  Line 772 + 0x16 C++
  XTP9700Libud.dll!CXTPPopupBar::Popup(CXTPControl Popup * pControlPopup=0x04ad0548, int bSelectFirst=0)  Line 836 C++
  XTP9700Libud.dll!CXTPControlPopup::OnSetPopup(in t bPopup=1)  Line 181 + 0x3d C++
  XTP9700Libud.dll!CXTPCommandBar::SetPopuped(int nPopuped=1, int bKeyboard=0)  Line 469 + 0x12 C++
  XTP9700Libud.dll!CXTPControlPopup::OnSetSelected (int bSelected=1)  Line 141 C++
  XTP9700Libud.dll!CXTPCommandBar::SetSelected(int nSelected=1, int bKeyboard=0)  Line 419 + 0x33 C++
  XTP9700Libud.dll!CXTPCommandBar::OnMouseMove(uns igned int __formal=0, CPoint point={...})  Line 301 + 0x1b C++
  mfc71ud.dll!CWnd::OnWndMsg(unsigned int message=512, unsigned int wParam=0, long lParam=852012, long * pResult=0x0012dabc)  Line 2164 C++
  XTP9700Libud.dll!CXTPCommandBar::OnWndMsg(unsign ed int message=512, unsigned int wParam=0, long lParam=852012, long * pResult=0x0012dabc)  Line 1865 C++
  mfc71ud.dll!CWnd::WindowProc(unsigned int message=512, unsigned int wParam=0, long lParam=852012)  Line 1745 + 0x1e C++
  mfc71ud.dll!AfxCallWndProc(CWnd * pWnd=0x0012e210, HWND__ * hWnd=0x000f08e0, unsigned int nMsg=512, unsigned int wParam=0, long lParam=852012)  Line 241 + 0x1a C++
  mfc71ud.dll!AfxWndProc(HWND__ * hWnd=0x000f08e0, unsigned int nMsg=512, unsigned int wParam=0, long lParam=852012)  Line 389 C++
  mfc71ud.dll!AfxWndProcBase(HWND__ * hWnd=0x000f08e0, unsigned int nMsg=512, unsigned int wParam=0, long lParam=852012)  Line 209 + 0x15 C++
  
user32.dll!_InternalCallWinProc@20()  + 0x28 
  
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 
  
user32.dll!_DispatchMessageWorker@8()  + 0xdc 
  
user32.dll!_DispatchMessageW@4()  + 0xf 
  
user32.dll!_IsDialogMessageW@8()  + 0xdb 
  mfc71ud.dll!CWnd::IsDialogMessageW(tagMSG * lpMsg=0x001540f0)  Line 200 C++
  mfc71ud.dll!CWnd::PreTranslateInput(tagMSG * lpMsg=0x001540f0)  Line 4512 C++
  mfc71ud.dll!CDialog::PreTranslateMessage(tagMSG * pMsg=0x001540f0)  Line 83 C++
  zlzwfud.dll!Zeta::Windows::Forms::EnhancedDialog ::PreTranslateMessage(tagMSG * pMsg=0x001540f0)  Line 194 C++
  ZpCommonDialogud.dll!CXTPDialogBase<Zeta::Win dows::Forms::Specialized::DialogBase>::PreTranslateMessag e(tagMSG * pMsg=0x001540f0)  Line 141 + 0xf C++
  ZpCommonDialogud.dll!Common::Gui::Dialog::RichGu iDialogBase::PreTranslateMessage(tagMSG * pMsg=0x001540f0)  Line 386 + 0xc C++
  mfc71ud.dll!CWnd::WalkPreTranslateTree(HWND__ * hWndStop=0x001b075e, tagMSG * pMsg=0x001540f0)  Line 3129 + 0x12 C++
  mfc71ud.dll!AfxInternalPreTranslateMessage(tagMS G * pMsg=0x001540f0)  Line 238 + 0x12 C++
  mfc71ud.dll!CWinThread::PreTranslateMessage(tagM SG * pMsg=0x001540f0)  Line 795 + 0x9 C++
  mfc71ud.dll!AfxPreTranslateMessage(tagMSG * pMsg=0x001540f0)  Line 257 + 0xf C++
  mfc71ud.dll!AfxInternalPumpMessage()  Line 183 + 0x18 C++
  mfc71ud.dll!CWinThread::PumpMessage()  Line 916 C++
  mfc71ud.dll!AfxPumpMessage()  Line 195 + 0xb C++
  mfc71ud.dll!CWnd::RunModalLoop(unsigned long dwFlags=4)  Line 4566 + 0x5 C++
  mfc71ud.dll!CDialog::DoModal()  Line 527 + 0xc C++
  zlzwfud.dll!Zeta::Windows::Forms::EnhancedDialog ::DoModal()  Line 97 + 0x8 C++
  zlzwfud.dll!Zeta::Windows::Forms::Specialized::D ialogBase::ShowModal()  Line 69 + 0x8 C++
  ProducerUD.exe!Framework::ProducerMainWindow::On AssetmanagementImages()  Line 2334 + 0x15 C++
  mfc71ud.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x04a8b918, unsigned int nID=32772, int nCode=0, void (void)* pfn=0x00406348, void * pExtra=0x00000000, unsigned int nSig=53, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 89 C++
  mfc71ud.dll!CCmdTarget::OnCmdMsg(unsigned int nID=32772, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 396 + 0x27 C++
  mfc71ud.dll!CFrameWnd::OnCmdMsg(unsigned int nID=32772, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 897 + 0x18 C++
  mfc71ud.dll!CWnd::OnCommand(unsigned int wParam=32772, long lParam=0)  Line 2550 C++
  mfc71ud.dll!CFrameWnd::OnCommand(unsigned int wParam=32772, long lParam=0)  Line 320 C++
  mfc71ud.dll!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=32772, long lParam=0, long * pResult=0x0012e9b8)  Line 1759 + 0x1c C++
  ProducerUD.exe!CXTPFrameWndBase<CFrameWnd> ::OnWndMsg(unsigned int message=273, unsigned int wParam=32772, long lParam=0, long * pResult=0x0012e9b8)  Line 201 C++
  mfc71ud.dll!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 1745 + 0x1e C++
  ProducerUD.exe!Framework::ProducerMainWindow::Wi ndowProc(unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 471 + 0x14 C++
  mfc71ud.dll!AfxCallWndProc(CWnd * pWnd=0x04a8b918, HWND__ * hWnd=0x001b075e, unsigned int nMsg=273, unsigned int wParam=32772, long lParam=0)  Line 241 + 0x1a C++
  mfc71ud.dll!AfxWndProc(HWND__ * hWnd=0x001b075e, unsigned int nMsg=273, unsigned int wParam=32772, long lParam=0)  Line 389 C++
  mfc71ud.dll!AfxWndProcBase(HWND__ * hWnd=0x001b075e, unsigned int nMsg=273, unsigned int wParam=32772, long lParam=0)  Line 209 + 0x15 C++
  
user32.dll!_InternalCallWinProc@20()  + 0x28 
  
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 
  
user32.dll!_CallWindowProcAorW@24()  + 0x51 
  
user32.dll!_CallWindowProcW@20()  + 0x1b 
  XTP9700Libud.dll!CXTPHookManager::HookWndProc(HW ND__ * hWnd=0x001b075e, unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 158 + 0x1c C++
  
user32.dll!_InternalCallWinProc@20()  + 0x28 
  
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 
  
user32.dll!_CallWindowProcAorW@24()  + 0x51 
  
user32.dll!_CallWindowProcW@20()  + 0x1b 
  ZpCommonCoreud.dll!Common::Gui::SubclassWindow:: WindowProc(unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 152 + 0x5c C++
  ZpCommonCoreud.dll!Common::Gui::HookWndProc(HWND __ * hwnd=0x001b075e, unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 230 + 0x19 C++
  
user32.dll!_InternalCallWinProc@20()  + 0x28 
  
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 
  
user32.dll!_DispatchClientMessage@20()  + 0x4d 
  
user32.dll!___fnDWORD@4()  + 0x24 
  
ntdll.dll!_KiUserCallbackDispatcher@12()  + 0x13 
  
user32.dll!_NtUserMessageCall@28()  + 0xc 
  
user32.dll!_SendMessageW@16()  + 0x49 
  mfc71ud.dll!CWnd::SendMessageW(unsigned int message=273, unsigned int wParam=32772, long lParam=0)  Line 44 + 0x42 C++
  XTP9700Libud.dll!CXTPControl::OnExecute()  Line 315 C++
  XTP9700Libud.dll!CXTPControl::ClickToolBarButton (CRect rcActiveRect={...})  Line 262 + 0x10 C++
  XTP9700Libud.dll!CXTPControlButton::OnClick(int bKeyboard=0, CPoint pt={...})  Line 73 C++
  XTP9700Libud.dll!CXTPCommandBar::OnLButtonDown(u nsigned int nFlags=1, CPoint point={...})  Line 349 + 0x1a C++
  XTP9700Libud.dll!CXTPToolBar::OnLButtonDown(unsi gned int nFlags=1, CPoint point={...})  Line 864 C++
  mfc71ud.dll!CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=786782, long * pResult=0x0012fc48)  Line 2164 C++
  XTP9700Libud.dll!CXTPCommandBar::OnWndMsg(unsign ed int message=513, unsigned int wParam=1, long lParam=786782, long * pResult=0x0012fc48)  Line 1865 C++
  mfc71ud.dll!CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=786782)  Line 1745 + 0x1e C++
  mfc71ud.dll!AfxCallWndProc(CWnd * pWnd=0x04aadfa0, HWND__ * hWnd=0x000e0918, unsigned int nMsg=513, unsigned int wParam=1, long lParam=786782)  Line 241 + 0x1a C++
  mfc71ud.dll!AfxWndProc(HWND__ * hWnd=0x000e0918, unsigned int nMsg=513, unsigned int wParam=1, long lParam=786782)  Line 389 C++
  mfc71ud.dll!AfxWndProcBase(HWND__ * hWnd=0x000e0918, unsigned int nMsg=513, unsigned int wParam=1, long lParam=786782)  Line 209 + 0x15 C++
  
user32.dll!_InternalCallWinProc@20()  + 0x28 
  
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 
  
user32.dll!_DispatchMessageWorker@8()  + 0xdc 
  
user32.dll!_DispatchMessageW@4()  + 0xf 
  mfc71ud.dll!AfxInternalPumpMessage()  Line 188 C++
  mfc71ud.dll!CWinThread::PumpMessage()  Line 916 C++
  mfc71ud.dll!CWinThread::Run()  Line 637 + 0xb C++
  mfc71ud.dll!CWinApp::Run()  Line 701 C++
  zlzud.dll!Zeta::Application::Run()  Line 788 C++
  mfc71ud.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020e94, int nCmdShow=1)  Line 49 + 0xb C++
  ProducerUD.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020e94, int nCmdShow=1)  Line 25 C++
  ProducerUD.exe!wWinMainCRTStartup()  Line 390 + 0x39 C
  
kernel32.dll!_BaseProcessStart@4()  + 0x23 

Maybe someone at Codejock can check whether this is an issue with the new library.

Thanks
Uwe

Back to Top
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 3:30am

Additional information:

The error occurs when clicking a main menu item (the popup submenu appears) and then moving the the mouse coursor over the other main menu items.

After the assertion, a shadow remains on top of all other windows:

As far as I can tell, this did not happen before version 9.70. And it only appears in menus inside dialog boxes.

Uwe

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 4:36am

Hi

Strange, m_hWnd can't be NULL in Animate member. :(

 

Can you reproduce it with DialogSample?



Edited by oleg
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Uwe Keim View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Uwe Keim Quote  Post ReplyReply Direct Link To This Post Posted: 09 July 2005 at 4:53am

Thanks for your feedback.

I just tried and unfortunately could not reproduce it with the DialogSample. Although I based my code on that sample, I will try and see what I do different than the sample.

Thanks
Uwe

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.