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 » Blank CExtToolControlBar? Collapse All
Subject Author Date
Chris Mason Jul 2, 2008 - 3:14 AM

Hi, this is probably a simple problem but for the life of me I can’t work out what’s going on.


We have a CExtScrollWnd derived class which is the parent to a CExtToolControlBar derived class. The CExtScrollWnd derived class is then inserted as a page into a CExtPageContainerWnd. The CExtScrollWnd is needed in order to be able to scroll the toolbar vertically. However, while the scrollbar is displayed as required, the toolbar is blank, all that is displayed is a blank background.


 


CRuntimeClass *p_Runtime = RUNTIME_CLASS(CAppToolBarContainerWnd);
        CAppToolBarContainerWnd *pAppWnd = STATIC_DOWNCAST(CAppToolBarContainerWnd, p_Runtime->CreateObject());

        if (!pAppWnd->Create(NULL,"", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN| WS_CLIPSIBLINGS| WS_VSCROLL,
            CRect(0,0,0,0), &m_wndAppPageContainer, NULL))
        {
            TRACE0( "Failed to create app container window" );
            return false;
        }
        
        CRuntimeClass *pRTC = RUNTIME_CLASS( CAppToolControlBar);
        CAppToolControlBar *pBar = STATIC_DOWNCAST(CAppToolControlBar, pRTC->CreateObject());        

        if (!pBar->Create(cGroupName, pAppWnd, NULL))
        {
            TRACE0( "Failed to create resizable bar" );
            return false;
        }            

        m_wndAppPageContainer.PageInsert(pAppWnd->GetSafeHwnd(),-1, cGroupName);   

 

Technical Support Jul 2, 2008 - 11:20 AM

Unfortunately there is no source code for your scrollable container class in our message. The following sample implements and demonstrates a well working scrollable container:

TestScrollDialog.zip

It scrolls a child dialog window if the size of the dialog is less than its initial size. You can follow a similar approach.