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 General Discussion » CExtToolControlBar and ActiveX. Collapse All
Subject Author Date
Ionut Ceausu Jan 26, 2005 - 9:53 AM

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> Sorry for the double post...</o:p>


<o:p></o:p> 


I try to create an ActiveX using sample from http://www.microsoft.com/mind/0497/mfc.asp. At this sample I added a CExtControlBar where I display a BMP, and I want to add a toolbar CExtToolControlBar. All is ok until I want to drag the toolbar. When I drag it, I receive an assertion (D:\Prof-UIS\Src\ExtToolControlBar.cpp Line 441) and after that an access violation. The toolbar is created with the following code:<o:p></o:p>


….inside OnCreate from CFrameWnd derived class.<o:p></o:p>


 <o:p></o:p>


            m_wnd123ToolBar.Create(_T("Test"), this, IDR_TOOLBAR1);<o:p></o:p>


            m_wnd123ToolBar.LoadToolBar(IDR_TOOLBAR1);<o:p></o:p>


            m_wnd123ToolBar.EnableDocking(CBRS_ALIGN_ANY);<o:p></o:p>


<o:p> </o:p>


            DockControlBar(&m_wnd123ToolBar,AFX_IDW_DOCKBAR_LEFT);<o:p></o:p>


<o:p> </o:p>


m_wnd123ToolBar is defined  as <o:p></o:p>


protected:<o:p></o:p>


CExtToolControlBar m_wnd123ToolBar;<o:p></o:p>


<o:p> </o:p>


            I put the code for initializing the Prof-UIS library in the InitInstance (<o:p></o:p>


BOOL C_Your_ActiveX_App::InitInstance()
{
   if( ! ::AfxOleInit() )
   {
      ASSERT( FALSE );
      return FALSE;
    } // if( ! ::AfxOleInit() )
    CExt_ProfUIS_ModuleState::InitExtension
          (  AfxGetStaticModuleState()  );<o:p></o:p>


)<o:p></o:p>


Configuratuion is Win2k SP4, ProfUIS 2.27 trial, Visual Studio Enterprise SP5 Platform SDK November 2001.<o:p></o:p>


<o:p> </o:p>


            Could you tell me what I do wrong?<o:p></o:p>


<o:p> </o:p>


Bellow is the stack when it crash.<o:p></o:p>


<o:p> </o:p>


_CrtDbgReport(int 2, const char * 0x01e994e8, int 441, const char * 0x00000000, const char * 0x00000000) line 353<o:p></o:p>


AfxAssertFailedLine(const char * 0x01e994e8, int 441) line 39 + 20 bytes<o:p></o:p>


PROFUIS227MD! 01d7a70d()<o:p></o:p>


PROFUIS227MD! 01d7c1ab()<o:p></o:p>


PROFUIS227MD! 01d8c8f5()<o:p></o:p>


CControlBar::OnPaint() line 596<o:p></o:p>


CWnd::OnWndMsg(unsigned int 15, unsigned int 0, long 0, long * 0x0012a11c) line 1825<o:p></o:p>


CWnd::WindowProc(unsigned int 15, unsigned int 0, long 0) line 1585 + 30 bytes<o:p></o:p>


CControlBar::WindowProc(unsigned int 15, unsigned int 0, long 0) line 480 + 20 bytes<o:p></o:p>


PROFUIS227MD! 01b53e83()<o:p></o:p>


PROFUIS227MD! 01d92784()<o:p></o:p>


AfxCallWndProc(CWnd * 0x01f287ec {CWnd hWnd=0x000c1370}, HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 215 + 26 bytes<o:p></o:p>


AfxWndProc(HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 368<o:p></o:p>


AfxWndProcDllStatic(HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 57 + 21 bytes<o:p></o:p>


USER32! 77e3a420()<o:p></o:p>


USER32! 77e14750()<o:p></o:p>


USER32! 77e155b0()<o:p></o:p>


NTDLL! 77f9ff57()<o:p></o:p>


USER32! 77e1a7ba()<o:p></o:p>


USER32! 77e441d4()<o:p></o:p>


USER32! 77e34110()<o:p></o:p>


USER32! 77e344ac()<o:p></o:p>


USER32! 77e3399f()<o:p></o:p>


USER32! 77e34237()<o:p></o:p>


USER32! 77e333d0()<o:p></o:p>


__crtMessageBoxA(const char * 0x0012a938, const char * 0x102579a0 `string’, unsigned int 73746) line 65<o:p></o:p>


CrtMessageWindow(int 2, const char * 0x01e994e8, const char * 0x0012ba6c, const char * 0x00000000, const char * 0x0012da90) line 520 + 22 bytes<o:p></o:p>


_CrtDbgReport(int 2, const char * 0x01e994e8, int 441, const char * 0x00000000, const char * 0x00000000) line 419 + 76 bytes<o:p></o:p>


AfxAssertFailedLine(const char * 0x01e994e8, int 441) line 39 + 20 bytes<o:p></o:p>


PROFUIS227MD! 01d7a70d()<o:p></o:p>


PROFUIS227MD! 01d7c1ab()<o:p></o:p>


PROFUIS227MD! 01d8c8f5()<o:p></o:p>


CControlBar::OnPaint() line 596<o:p></o:p>


CWnd::OnWndMsg(unsigned int 15, unsigned int 0, long 0, long * 0x0012ef84) line 1825<o:p></o:p>


CWnd::WindowProc(unsigned int 15, unsigned int 0, long 0) line 1585 + 30 bytes<o:p></o:p>


CControlBar::WindowProc(unsigned int 15, unsigned int 0, long 0) line 480 + 20 bytes<o:p></o:p>


PROFUIS227MD! 01b53e83()<o:p></o:p>


PROFUIS227MD! 01d92784()<o:p></o:p>


AfxCallWndProc(CWnd * 0x01f287ec {CWnd hWnd=0x000c1370}, HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 215 + 26 bytes<o:p></o:p>


AfxWndProc(HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 368<o:p></o:p>


AfxWndProcDllStatic(HWND__ * 0x000c1370, unsigned int 15, unsigned int 0, long 0) line 57 + 21 bytes<o:p></o:p>


USER32! 77e3a420()<o:p></o:p>


USER32! 77e14750()<o:p></o:p>


USER32! 77e155b0()<o:p></o:p>


NTDLL! 77f9ff57()<o:p></o:p>


PROFUIS227MD! 01b6b91f()<o:p></o:p>


PROFUIS227MD! 01b6b4b9()<o:p></o:p>


PROFUIS227MD! 01b62b19()<o:p></o:p>


PROFUIS227MD! 01b651a5()<o:p></o:p>


PROFUIS227MD! 01b652fc()<o:p></o:p>


PROFUIS227MD! 01b5dbad()<o:p></o:p>


PROFUIS227MD! 01d8a748()<o:p></o:p>


PROFUIS227MD! 01b56a13()<o:p></o:p>


PROFUIS227MD! 01d8e1f5()<o:p></o:p>


PROFUIS227MD! 01b5d18c()<o:p></o:p>


PROFUIS227MD! 01b57657()<o:p></o:p>


PROFUIS227MD! 01d8d9cf()<o:p></o:p>


CWnd::OnWndMsg(unsigned int 513, unsigned int 1, long -327667, long * 0x0012fc70) line 1964<o:p></o:p>


CWnd::WindowProc(unsigned int 513, unsigned int 1, long -327667) line 1585 + 30 bytes<o:p></o:p>


CControlBar::WindowProc(unsigned int 513, unsigned int 1, long -327667) line 480 + 20 bytes<o:p></o:p>


PROFUIS227MD! 01b53e83()<o:p></o:p>


PROFUIS227MD! 01d92784()<o:p></o:p>


AfxCallWndProc(CWnd * 0x01f287ec {CWnd hWnd=0x000c1370}, HWND__ * 0x000c1370, unsigned int 513, unsigned int 1, long -327667) line 215 + 26 bytes<o:p></o:p>


AfxWndProc(HWND__ * 0x000c1370, unsigned int 513, unsigned int 1, long -327667) line 368<o:p></o:p>


AfxWndProcDllStatic(HWND__ * 0x000c1370, unsigned int 513, unsigned int 1, long -327667) line 57 + 21 bytes<o:p></o:p>


USER32! 77e3a420()<o:p></o:p>


USER32! 77e14605()<o:p></o:p>


USER32! 77e15b77()<o:p></o:p>

Technical Support Jan 26, 2005 - 1:26 PM

Dear Lonut,

Prof-UIS toolbars can be used inside ActiveX controls and we already helped our customers to implements this feature. We believe the problem hides somewhere in the code that initializes the library. Could you send us a project which demostrates the problem so that we can quickly help you?