Problem with minitoolbar Assert |
Post Reply |
Author | |
Aaron Koolen
Groupie Joined: 22 July 2009 Status: Offline Points: 32 |
Post Options
Thanks(0)
Posted: 23 July 2009 at 9:22pm |
Hi all. New to the Toolkit and struggling a bit with a MinitToolbar problem.
I have a CXTPCommandBarsSiteBase<CWnd> derived class and I use the CommandBars from this to host my CXTPMiniToolbar. Inside my derived class I have a CRichEdit and I pop up the MiniToolbar when the user right clicks. Unfortunately when I call TrackMiniBar, the application ASSERTS in wincore.cpp, line 883 while checking the window handle of the parent window. Here is the callstack. CWnd::AssertValid() line 883 + 67 bytes AfxAssertValidObject(const CObject * 0x0537b3a8 {NoteDashboardWidget}, const char * 0x5f8d06e0 THIS_FILE, int 738) line 108 CCmdUI::DoUpdate(CCmdTarget * 0x0537b3a8 {NoteDashboardWidget}, int 1) line 740 CXTPCommandBar::OnUpdateCmdUI() line 734 CXTPCommandBar::OnIdleUpdateCmdUI(unsigned int 1, unsigned int 1) line 595 CXTPPopupBar::Popup(CXTPControlPopup * 0x00000000 {CXTPControlPopup}, int 0) line 1072 + 20 bytes CXTPPopupBar::Popup(int 810, int 249, const tagRECT * 0x0012fafc {top=0 bottom=0 left=0 right=0}) line 1101 + 20 bytes CXTPMiniToolBar::TrackMiniBar(unsigned int 0, int 810, int 249) line 182 + 40 bytes RichStringEditView::OnLButtonUp(unsigned int 0, CPoint {x=810 y=264}) line 290 + 30 bytes CWnd::OnWndMsg(unsigned int 514, unsigned int 0, long 589893, long * 0x0012fcc4) line 1964 CWnd::WindowProc(unsigned int 514, unsigned int 0, long 589893) line 1585 + 30 bytes AfxCallWndProc(CWnd * 0x0537b480 {RichStringEditView hWnd=???}, HWND__ * 0x00260d3e, unsigned int 514, unsigned int 0, long 589893) line 215 + 26 bytes AfxWndProc(HWND__ * 0x00260d3e, unsigned int 514, unsigned int 0, long 589893) line 368 AfxWndProcBase(HWND__ * 0x00260d3e, unsigned int 514, unsigned int 0, long 589893) line 220 + 21 bytes USER32! 7e418734() USER32! 7e418816() USER32! 7e4189cd() USER32! 7e418a10() CWinThread::PumpMessage() line 846 CWinThread::Run() line 480 + 11 bytes CWinApp::Run() line 400 AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, unsigned short * 0x0002099e, int 1) line 49 + 11 bytes wWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, unsigned short * 0x0002099e, int 1) line 30 wWinMainCRTStartup() line 330 + 55 bytes KERNEL32! 7c817077() I can't for the life of me figure out what's wrong. The minitoolbar appears OK, with the controls enabled/initialised OK, but something's going screwy somewhere. Is this a threading issue at all, or some other thing I need to be aware of with mini toolbars? I am using the toolbar class I have elsewhere and it's working fine when it's the RichEdit is inside a CXTPFrameWnd. Any help appreciated. Aaron |
|
Product: Xtreme ToolkitPro v13.3.0 (MFC)
Platform: Windows XP (32bit) - SP 3 Language: Visual C++ 6 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
trace shows something wrong with NoteDashboardWidget. Is it custom control on toolbar ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron Koolen
Groupie Joined: 22 July 2009 Status: Offline Points: 32 |
Post Options
Thanks(0)
|
Hi Oleg. NoteDashboardWidget is my CXTPCommandBarsSiteBase <CWnd> derived class that I use as the anchor for the command bars. Inside that I have the CRichEdit control. When I select or right click on the CRichEdit, I call TrackMiniBar. The code where the asserts are happening is this:
And this line ASSERT(this == &CWnd::wndNoTopMost); seems to be where the assert happens but my IDE isn't being too helpful and placing the breakpoint inbetween that line and the next one (ISWindow) call. I've tried copying that code into my own area before calling TrackMiniBar and nothing is asserted. So I'm obviously missing something and assume I'm not setting things up correctly for the mini toolbar. What is the normal procedure for setting up and using a minitoolbar? Are there any restrictions or requirements? I should add that the code for the NoteDashboardWidget is in an external DLL to the main application. Thanks. |
|
Product: Xtreme ToolkitPro v13.3.0 (MFC)
Platform: Windows XP (32bit) - SP 3 Language: Visual C++ 6 |
|
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 |