Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Exception in LoadCommandBars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Exception in LoadCommandBars

 Post Reply Post Reply
Author
Message
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post Topic: Exception in LoadCommandBars
    Posted: 27 September 2005 at 9:22am
Hi.
One of our customers got an exception in our application. I have analyzed the
problem. The exception comes in the function LoadCommandBars.
The user does not know what he exactly have done. But somthing like this: he
creates an customized toolbar, and he drags this toolbar out of the main
window. At the next start of the application the an exception is thrown
When i delete the registry settings of XTT it works again without problems.
Please help!

In the debug version i got an assertion (look at the arrow); pDC is zero!
CSize CXTPOffice2003Theme::DrawCommandBarGripper(CDC* pDC, CXTPCommandBar*
pBar, BOOL bDraw)
{
if (pBar->IsDialogBar())
return DrawDialogBarGripper(pDC, pBar, bDraw);

CRect rc;
pBar->GetClientRect(&rc);

if (pBar->GetPosition() == xtpBarFloating)
{
---> ASSERT(pDC);
CXTPFontDC font(pDC, &m_fontSmCaption);


The DrawCommandBarGripper was called in this function:

CSize CXTPToolBar::CalcDockingLayout(int nLength, DWORD dwMode, int nWidth)
{
CClientDC dc(this);
CXTPFontDC font(&dc, GetPaintManager()->GetCommandBarFont(this));
CXTPControlPopup* pPopupExp = NULL;

CRect rcBorder = GetPaintManager()->GetCommandBarBorders(this);

if (m_dwStyle & CBRS_GRIPPER)
rcBorder.TopLeft() +=
GetPaintManager()->DrawCommandBarGripper(NULL, this, FALSE);

The call stack looks like this:

XTP9700Libud.dll!XTPPaintThemes::CXTPOffice2003Theme::Draw CommandBarGripper(CDC * pDC=0x00000000, CXTPCommandBar * pBar=0x020b8730, int bDraw=0x00000000) Line 436 + 0x1d C++
> XTP9700Libud.dll!CXTPToolBar::CalcDockingLayout(int nLength=0x00000463, unsigned long dwMode=0x0000008a, int nWidth=0x00000000) Line 594 + 0x33 C++
> XTP9700Libud.dll!CXTPDockBar::_AdjustRow(CArray<CXTPToo lBar *,CXTPToolBar *> & arrRow={...}, CPoint pt={...}, int nLength=0x00000463, int bHorz=0x00000002, AFX_SIZEPARENTPARAMS * lpLayout=0x0012e0f8, int & nRemove=0xffffffff)  Line 154 + 0x2b C++
> XTP9700Libud.dll!CXTPDockBar::AdjustRow(CArray<CXTPTool Bar *,CXTPToolBar *> & arrRow={...}, CPoint pt={...}, int nLength=0x00000463, int bHorz=0x00000002, AFX_SIZEPARENTPARAMS * lpLayout=0x0012e0f8)  Line 301 + 0x24 C++
> XTP9700Libud.dll!CXTPDockBar::CalcDynamicLayout(int nLength=0x00000463, unsigned long nMode=0x0000000b, AFX_SIZEPARENTPARAMS *lpLayout=0x0012e5f0)  Line 358 + 0x2c C++
> XTP9700Libud.dll!CXTPDockBar::OnSizeParent(unsigned int __formal=0x00000000, long lParam=0x0012e5f0)  Line 415 C++   mfc71ud.dll!CWnd::OnWndMsg(unsigned int message=0x00000361, unsigned int wParam=0x00000000, long lParam=0x0012e5f0, long * pResult=0x0012e400) Line 2013 + 0x11 C++
> mfc71ud.dll!CWnd::WindowProc(unsigned int message=0x00000361, unsigned int wParam=0x00000000, long lParam=0x0012e5f0)  Line 1745 + 0x1e C++
>  mfc71ud.dll!AfxCallWndProc(CWnd * pWnd=0x0160b0d0, HWND__ * hWnd=0x00050558, unsigned int nMsg=0x00000361, unsigned int wParam=0x00000000, long lParam=0x0012e5f0)  Line 241 + 0x1a C++
> mfc71ud.dll!AfxWndProc(HWND__ * hWnd=0x00050558, unsigned int nMsg=0x00000361, unsigned int wParam=0x00000000, long lParam=0x0012e5f0) Line 389 C++
> mfc71ud.dll!AfxWndProcBase(HWND__ * hWnd=0x00050558, unsigned int nMsg=0x00000361, unsigned int wParam=0x00000000, long lParam=0x0012e5f0) Line 209 + 0x15 C++
> user32.dll!77d43a68()
> user32.dll!77d43b37()
> user32.dll!77d4546b()
> user32.dll!77d454cc()
>  mfc71ud.dll!CWnd::RepositionBars(unsigned int nIDFirst=0x00000000, unsigned int nIDLast=0x0000ffff, unsigned int nIDLeftOver=0x0000e900, unsigned int nFlags=0x00000002, tagRECT * lpRectParam=0x016070a8, const tagRECT * lpRectClient=0x00000000, int bStretch=0x00000001)  Line 2982 C++
> mfc71ud.dll!CFrameWnd::RecalcLayout(int bNotify=0x00000001)  Line 2008 C++
> mfc71ud.dll!CFrameWnd::ShowControlBar(CControlBar * pBar=0x016074e8, int bShow=0x00000000, int bDelay=0x00000000)  Line 1256 C++   > XTP9700Libud.dll!CXTPCommandBars::LoadDockBarsState(const unsigned short * lpszProfileName=0x0058f0fc)  Line 734 C++
> XTP9700Libud.dll!CXTPCommandBars::LoadBarState(const unsigned short * lpszProfileName=0x0058f0fc, int bSilent=0x00000000)  Line 643 C++
>  M210.exe!CXTPFrameWndBase<CFrameWnd>::Lo adCommandBars(const unsigned short * lpszProfileName=0x0058f0fc, int bSilent=0x00000000)  Line 142 + 0x19 C++
>  M210.exe!CMainFrame::OnCreate(tagCREATESTRUCTW *   lpCreateStruct=0x0012f4b0)  Line 365 C++
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.047 seconds.