Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtDockDynTabBar problem Collapse All
Subject Author Date
Offer Har Nov 23, 2006 - 10:15 AM

Hi,

I have docking bars that i want to destroy when they are closed.
I override the NcButtons_HandleClick function, and if it’s time to kill my dialog, i call Destroy on the bar, and not call the default CExtControlBar::NcButtons_HandleClick.

This all works fine until i get to the tabbed scenario (AGAIN...)
What happens is that the NcButtons_HandleClickis called of each docked dialog, i destroy them all, but then it crashes in CExtDockDynTabBar,
in the funtion _RepositionTabbedChilds line 185:
ASSERT( hDWP != NULL );

This is the stack:

    ProfUIS262md.dll!CExtDockDynTabBar::_RepositionTabbedChilds(bool bLockChilds=true) Line 185 + 0x19    C++
    ProfUIS262md.dll!CExtDynTabControlBar::OnRepositionSingleChild(int cx=-1, int cy=-1, bool bRedraw=true) Line 1184    C++
    ProfUIS262md.dll!CExtDynTabControlBar::UpdateBarVisibility(CExtControlBar * pBar=0x0797d620) Line 1963 + 0x16    C++
    ProfUIS262md.dll!CExtControlBar::_UpdateVisibilityInRow() Line 20287    C++
    ProfUIS262md.dll!CExtControlBar::_UpdateVisibilityInChain() Line 20170 + 0x10    C++
    ProfUIS262md.dll!CExtControlBar::OnShowWindow(int bShow=0, unsigned int nStatus=0) Line 20078 + 0x10    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=24, unsigned int wParam=0, long lParam=0, long * pResult=0x0012f49c) Line 2031    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e    C++
    mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 503 + 0x14    C++
    ProfUIS262md.dll!CExtControlBar::WindowProc(unsigned int message=24, unsigned int wParam=0, long lParam=0) Line 8435    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x0797d620, HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a    C++
    mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 389    C++
    mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00371c84, unsigned int nMsg=24, unsigned int wParam=0, long lParam=0) Line 209 + 0x15    C++
    user32.dll!77d48734()     
    user32.dll!77d48816()     
    user32.dll!77d618f4()     
    user32.dll!77d4b4c0()     
    user32.dll!77d4b50c()     
    ntdll.dll!7c90eae3()     
    user32.dll!77d4daf6()     
    mfc71d.dll!CWnd::DestroyWindow() Line 988 + 0xd    C++
    mfc71d.dll!CControlBar::DestroyWindow() Line 597    C++
    ProfUIS262md.dll!CExtControlBar::DestroyWindow() Line 8022    C++
    CCC.exe!CPropertiesDocBarsManager::RemoveBar(CBaseDockBar * pBar=0x0797d620) Line 98    C++

Technical Support Nov 27, 2006 - 1:37 PM

Please make a search for the KillBar word in this forum. The results will show how to use a KillBar() function in your code.

Offer Har Nov 27, 2006 - 1:54 PM

I’m sorry, but this solution is not working.
I still get a crash in my application.
Please find below the stack.

    ntdll.dll!7c901230()     
>    msvcr71d.dll!_CrtDbgBreak() Line 93    C
    msvcr71d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x7c14ebfc, int nLine=207, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...) Line 427    C
    mfc71d.dll!AfxAssertFailedLine(const char * lpszFileName=0x7c14ebfc, int nLine=207) Line 28 + 0x14    C++
    mfc71d.dll!CWnd::GetStyle() Line 207 + 0x29    C++
    mfc71d.dll!CControlBar::IsVisible() Line 853 + 0x13    C++
    mfc71d.dll!CDockBar::GetDockedVisibleCount() Line 98 + 0x14    C++
    mfc71d.dll!CDockBar::OnPaint() Line 606 + 0x20    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=15, unsigned int wParam=0, long lParam=0, long * pResult=0x0012a0dc) Line 2023    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0) Line 1745 + 0x1e    C++
    mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 503 + 0x14    C++
    ProfUIS262md.dll!CExtDockBar::WindowProc(unsigned int message=15, unsigned int wParam=0, long lParam=0) Line 3629    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ad6468, HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 241 + 0x1a    C++
    mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 389    C++
    mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x000d2430, unsigned int nMsg=15, unsigned int wParam=0, long lParam=0) Line 209 + 0x15    C++
    user32.dll!77d48734()     
    user32.dll!77d48816()     
    user32.dll!77d4b4c0()     
    user32.dll!77d4b50c()     
    ntdll.dll!7c90eae3()     
    user32.dll!77d4bf78()     
    mfc71d.dll!CWnd::RedrawWindow(const tagRECT * lpRectUpdate=0x00000000, CRgn * prgnUpdate=0x00000000, unsigned int flags=389) Line 172 + 0x4a    C++
    ProfUIS262md.dll!CExtMiniDockFrameWnd::OnNcActivate(int bActive=1) Line 1209    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=134, unsigned int wParam=1, long lParam=533210, long * pResult=0x0012a500) Line 1899 + 0xd    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=134, unsigned int wParam=1, long lParam=533210) Line 1745 + 0x1e    C++
    ProfUIS262md.dll!CExtMiniDockFrameWnd::WindowProc(unsigned int message=134, unsigned int wParam=1, long lParam=533210) Line 1992 + 0x14    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac45f8, HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 241 + 0x1a    C++
    mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 389    C++
    mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00072526, unsigned int nMsg=134, unsigned int wParam=1, long lParam=533210) Line 209 + 0x15    C++
    user32.dll!77d48734()     
    user32.dll!77d48816()     
    user32.dll!77d4b4c0()     
    user32.dll!77d4b50c()     
    ntdll.dll!7c90eae3()     
    user32.dll!77d548d9()     
    user32.dll!77d56323()     
    user32.dll!77d6aa51()     
    user32.dll!77d48734()     
    user32.dll!77d5418d()     
    kernel32.dll!7c80bde6()     
    user32.dll!77d53fd9()     
    user32.dll!77d6e54f()     
    MSCTF.dll!74724636()     
    user32.dll!77d6e571()     
    user32.dll!77d48734()     
    user32.dll!77d6e54f()     
    user32.dll!77d6e54f()     
    user32.dll!77d48816()     
    user32.dll!77d6e54f()     
    user32.dll!77d6e54f()     
    kernel32.dll!7c830c88()     
    user32.dll!77d4c63f()     
    user32.dll!77d6e54f()     
    user32.dll!77d4e905()     
    user32.dll!77d6e54f()     
    mfc71d.dll!_AfxActivationWndProc(HWND__ * hWnd=0x0012a960, unsigned int nMsg=1223268, unsigned int wParam=2083503115, long lParam=0) Line 449 + 0x1a    C++
    user32.dll!77d6e54f()     
    user32.dll!77d48734()     
    user32.dll!77d48816()     
    user32.dll!77d4b4c0()     
    user32.dll!77d4b50c()     
    ntdll.dll!7c90eae3()     
    user32.dll!77d494be()     
    user32.dll!77d4d4e4()     
    user32.dll!77d4b903()     
    comctl32.dll!773f7344()     
    comctl32.dll!773f7426()     
    comctl32.dll!773f972b()     
    mfc71d.dll!AfxGetMainWnd() Line 36 + 0x11    C++
    mfc71d.dll!CWinThread::ProcessMessageFilter(int code=0, tagMSG * lpMsg=0x0012acec) Line 872 + 0x5    C++
    mfc71d.dll!_AfxMsgFilterHook(int code=2010416948, unsigned int wParam=730106, long lParam=514) Line 817    C++
    0012ac68()    
    user32.dll!77d48816()     
    user32.dll!77d4eaad()     
    user32.dll!77d489cd()     
    user32.dll!77d61b4d()     
    user32.dll!77d48a10()     
    user32.dll!77d5e097()     
    user32.dll!77d5e1d4()     
    user32.dll!77d561c6()     
    user32.dll!77d6a92e()     
    ntdll.dll!7c911bff()     
    ntdll.dll!7c911dac()     
    ntdll.dll!7c949b34()     
    ntdll.dll!7c92a67e()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c9131dc()     
    ntdll.dll!7c913281()     
    ntdll.dll!7c913288()     
    ntdll.dll!7c913288()     
    ntdll.dll!7c916315()     
    ntdll.dll!7c91b686()     
    ntdll.dll!7c91b298()     
    ntdll.dll!7c9106eb()     
    ntdll.dll!7c96e0f0()     
    ntdll.dll!7c96e0d4()     
    user32.dll!77d484fc()     
    user32.dll!77d4ba0e()     
    user32.dll!77d4b96b()     
    user32.dll!77d6a294()     
    ntdll.dll!7c910945()     
    ntdll.dll!7c91094e()     
    ntdll.dll!7c926abe()     
    ntdll.dll!7c91440e()     
    ntdll.dll!7c910970()     
    ntdll.dll!7c914481()     
    ntdll.dll!7c919bd3()     
    ntdll.dll!7c910895()     
    ntdll.dll!7c919a9c()     
    ntdll.dll!7c919b3f()     
    ntdll.dll!7c919aeb()     
    user32.dll!77d95fbb()     
    user32.dll!77d96060()     
    user32.dll!77d80577()     
    user32.dll!77d8052f()     
    msvcr71d.dll!__crtMessageBoxA(const char * lpText=0x0012b420, const char * lpCaption=0x10268444, unsigned int uType=73746) Line 119    C
    msvcr71d.dll!CrtMessageWindow(int nRptType=2, const char * szFile=0x7c14ebfc, const char * szLine=0x0012c464, const char * szModule=0x00000000, const char * szUserMessage=0x0012c484) Line 617 + 0x16    C
    msvcr71d.dll!_CrtDbgReport(int nRptType=2, const char * szFile=0x7c14ebfc, int nLine=207, const char * szModule=0x00000000, const char * szFormat=0x00000000, ...) Line 516 + 0x4c    C
    mfc71d.dll!AfxAssertFailedLine(const char * lpszFileName=0x7c14ebfc, int nLine=207) Line 28 + 0x14    C++
    mfc71d.dll!CWnd::GetStyle() Line 207 + 0x29    C++
    mfc71d.dll!CControlBar::IsVisible() Line 853 + 0x13    C++
    mfc71d.dll!CDockBar::GetDockedVisibleCount() Line 98 + 0x14    C++
    ProfUIS262md.dll!CExtDynControlBar::CalcDynamicLayout(int nLength=-1, unsigned long nMode=10) Line 5818 + 0x1e    C++
    ProfUIS262md.dll!CExtDynTabControlBar::CalcDynamicLayout(int nLength=-1, unsigned long nMode=10) Line 1131 + 0x14    C++
    mfc71d.dll!CDockBar::CalcFixedLayout(int bStretch=1, int bHorz=2) Line 418    C++
    mfc71d.dll!CControlBar::CalcDynamicLayout(int __formal=-1, unsigned long nMode=7) Line 229 + 0x20    C++
    mfc71d.dll!CControlBar::OnSizeParent(unsigned int __formal=0, long lParam=1243896) Line 797    C++
    mfc71d.dll!CDockBar::OnSizeParent(unsigned int wParam=0, long lParam=1243896) Line 567 + 0x10    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=865, unsigned int wParam=0, long lParam=1243896, long * pResult=0x0012f83c) Line 2013 + 0x11    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=865, unsigned int wParam=0, long lParam=1243896) Line 1745 + 0x1e    C++
    mfc71d.dll!CControlBar::WindowProc(unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 503 + 0x14    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac46dc, HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 241 + 0x1a    C++
    mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 389    C++
    mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x0008251c, unsigned int nMsg=865, unsigned int wParam=0, long lParam=1243896) Line 209 + 0x15    C++
    user32.dll!77d48734()     
    user32.dll!77d48816()     
    user32.dll!77d4b4c0()     
    user32.dll!77d4b50c()     
    ntdll.dll!7c90eae3()     
    user32.dll!77d494be()     
    user32.dll!77d4d4e4()     
    user32.dll!77d5f3e3()     
    mfc71d.dll!CWnd::RepositionBars(unsigned int nIDFirst=0, unsigned int nIDLast=65535, unsigned int nIDLeftOver=59648, unsigned int nFlags=2, tagRECT * lpRectParam=0x07ac4668, const tagRECT * lpRectClient=0x0012fb44, int bStretch=1) Line 2982    C++
    mfc71d.dll!CFrameWnd::RecalcLayout(int bNotify=1) Line 2012    C++
    mfc71d.dll!CMiniDockFrameWnd::RecalcLayout(int bNotify=4) Line 824    C++
    ProfUIS262md.dll!CExtMiniDockFrameWnd::RecalcLayout(int bNotify=4) Line 2027    C++
    mfc71d.dll!CFrameWnd::OnIdleUpdateCmdUI() Line 1969    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=867, unsigned int wParam=1, long lParam=0, long * pResult=0x0012fdb0) Line 2023    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=867, unsigned int wParam=1, long lParam=0) Line 1745 + 0x1e    C++
    ProfUIS262md.dll!CExtMiniDockFrameWnd::WindowProc(unsigned int message=867, unsigned int wParam=1, long lParam=0) Line 1992 + 0x14    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x07ac45f8, HWND__ * hWnd=0x00072526, unsigned int nMsg=867, unsigned int wParam=1, long lParam=0) Line 241 + 0x1a    C++

Technical Support Nov 28, 2006 - 8:36 AM

Because you are using a modified version of the control bar, we would you to modify one of our samples so it would reproduce the crash and send it to us.

Offer Har Nov 28, 2006 - 9:51 AM

I have sent you a project re-creating the bug.
Please let me know if it’s enough.
Regards,
Ron.

Offer Har Nov 28, 2006 - 8:49 AM

What modified version am i using?
I just have a CExtControlBar derived classes.

Technical Support Dec 1, 2006 - 8:15 AM

What we actually mean is we do not really know which methods you have overridden in your CExtControlBar-derived class except for those we discussed. So we cannot guess what causes the problem.

Offer Har Dec 1, 2006 - 8:50 AM

Dear Support,

I did not change anything but overriding the CBaseDockBar::NcButtons_HandleClick.
This is what i did there:

    if( pNcAreaButton->IsKindOf(RUNTIME_CLASS(CExtBarNcAreaButtonClose)))
    {
        // We want to destroy the dialog, and not hide it:
        KillBar(this);
        return true;
    }

That’s all.

Please note that there is a new thread i started today regarding this bug plus a fix for it.