Professional UI Solutions
Site Map   /  Register


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 » CExtTabWnd flicker onsize. Collapse All
Subject Author Date
Dirk lindner Jan 5, 2009 - 6:28 AM

I use a CExtTabWnd within a CExtResizableDialog.
If i resize the Dialog it looks like:

Any idea ?

#define TOOLBARHEIGHT        31
#define TABHEIGHT            25

void CObjPropDlg::OnSize(UINT nType, int cx, int cy)
    CExtResizableDialog::OnSize(nType, cx, cy);

void CObjPropDlg::SetWindowLayout(int cx, int cy)
    if( !m_ctlTitle.GetSafeHwnd() )    

    CRect rcWindowRect;

    int tabh = TABH;

        tabh = 0;



                    16 + tabh + TOOLBARHEIGHT,
                    cx -16,
                    rcWindowRect.bottom - 32 - tabh - TOOLBARHEIGHT

Technical Support Jan 6, 2009 - 12:22 PM

If you want flicker free controls on your dialog, then it should have the WS_CLIPSIBLINGS|WS_CLIPCHIDREN styles. Moving dialog controls one by one is not the best approach of implementing layout of dialog controls. You can add dialog anchors to its controls instead:

The control anchoring is good feature for most of dialog controls but not for control bars sticking to dialog borders like status bar or non-re-dockable toolbar. Toolbars can reposition themselves automatically if you invoke the CWnd::RepositionBars(0,0xFFFF,0); both in the OnInitDialog() and OnSize() methods.