|
|
|
|
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.
Subject |
Author |
Date |
|
tarou iiyama
|
May 31, 2006 - 1:59 AM
|
Hello
A similar order.
Is not there "CWnd::RecalcLayout" in CExtControlBar?
|
|
Technical Support
|
May 31, 2006 - 7:21 AM
|
You can use the RecalcLayout() method only with CFrameWnd class or any other derived from it. The CFrameWnd::RecalcLayout() method can be replaced with the following code which is applicable to any CWnd object: CWnd * pWnd = . . .
pWnd->RepositionBars( 0, 0xFFFF, AFX_IDW_PANE_FIRST );
|
|
tarou iiyama
|
May 31, 2006 - 8:40 PM
|
Hello
I failed in drawing in pWnd-RepositionBars.
I used OnRepositionSingleChild.
However. Because CDialog was not drawn in a float state well, I used the following methods.
---------------------------------------------------------- if( !IsFloating() ){ OnRepositionSingleChild(); return ; } CRect rcClient2; GetClientRect( &rcClient2 );
int dX = m_nSeparatorHeight + 2; int dY = ::GetSystemMetrics( SM_CYSMCAPTION ) + 2 + m_nSeparatorWidth;
rcClient2.right -= dX; rcClient2.bottom -= dY;
CRect rcClient; GetClientRect( &rcClient );
rcClient.top = ::GetSystemMetrics(SM_CXSIZEFRAME); rcClient.left = ::GetSystemMetrics(SM_CYSIZEFRAME); rcClient.bottom = rcClient2.bottom; rcClient.right = rcClient2.right;
if( ! m_bReposSingleChildMode ) return;
// automatic child resizing - only one child is allowed HWND hWndChild = ::GetWindow( m_hWnd, GW_CHILD ); if( hWndChild == NULL ) return; ASSERT( ::IsWindow( hWndChild ) ); ASSERT( ::GetWindow( hWndChild, GW_HWNDNEXT ) == NULL );
CRect rcChild; ::GetWindowRect( hWndChild, &rcChild ); ScreenToClient( &rcChild ); if( rcChild == rcClient ) return;
::MoveWindow( hWndChild, rcClient.left, rcClient.top, rcClient.Width(), rcClient.Height(), TRUE ); ----------------------------------------------------------
Thank You
|
|
Technical Support
|
Jun 1, 2006 - 3:16 AM
|
In the current version both resizable control bars and resizable dialogs are painted correctly in all the sample applications. You can send us a small test project with one resizable control bar and a dialog window inside. Please demostrate with this project the problem you have in your application so we can provide you with detailed information about what’s wrong.
|
|