|
-
March 15th, 2011, 04:07 PM
#1
Stretch a docked CDialogBar.
I'm feeling pretty dumb right now, but I can't seem to get my docked CDialogBar to stretch the length of a window. I want my dialog bar to be docked to the top (the user can't change this). In the dialog bar, I want certain controls to be anchored to the right side of the dialog. So when the window stretches, I want the dialog bar to stretch as well. However my CDialogBar derivative isn't receiving the WM_SIZE message when the frame window is resized.
In my frame's OnCreate method (it's a frame not using doc/view architecture), I have the following code:
Code:
m_bar.Create( this, IDD_DIALOG1, WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_FIXED, IDD_DIALOG1 );
m_bar.EnableDocking( CBRS_ALIGN_TOP );
EnableDocking( CBRS_ALIGN_TOP );
DockControlBar( &m_bar );
Then in my frame's OnSize message handler, I call:
Code:
RepositionBars( IDD_DIALOG1, IDD_DIALOG1, 0 );
I have a CDialogBar derivative that just handles the WM_SIZE message to move child controls, but it's never hit.
What am I doing wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|