// JP opened flex table

Click to See Complete Forum and Search --> : FIX:Release gripper gap in floating office 97 style toolbar


Eric Hu
May 5th, 1998, 11:32 PM
When we are use Office 97 style customizable toolbar,

If it docked we will get double gripper in left of window

edge.When the toolbar is floating we can't release gripper gap.

How can we to fix it? Solution is following :

(IE3/4 Common Control , or Non IE3/4 Control all compatiable)


// In Toolbarex.cpp

void CToolBarEx::OnNcCalcSize(BOOL bCalcValidRects,

NCCALCSIZE_PARAMS FAR* lpncsp)

{

CToolBar::OnNcCalcSize(bCalcValidRects, lpncsp);

// adjust non-client area for gripper at left or top



if( m_dwStyle & CBRS_FLOATING ){

// if it is flaoting nothing to do.

}else if( m_dwStyle & CBRS_ORIENT_HORZ ) {

lpncsp->rgrc[0].left += 4;

lpncsp->rgrc[0].right += 4;

} else {

lpncsp->rgrc[0].top += 6;

lpncsp->rgrc[0].bottom += 6;

}

}


// MainFrame.cpp

void CMainFrame::RecalcLayout(BOOL bNotify)

{

// TODO: Add your specialized code here and/or call the base class



CMDIFrameWnd::RecalcLayout(bNotify); // SDI FrameWnd is the same


// call Toolbar function OnNcCalcSize and redraw it

m_wndToolBar.SetWindowPos( NULL, 0, 0, 0, 0,SWP_NOSIZE|

SWP_NOMOVE|SWP_NOZORDER|SWP_NOACTIVATE|

SWP_SHOWWINDOW|SWP_FRAMECHANGED );

}

//JP added flex table