Dear Support,
I have an CExtResizableDialog
derived dialog inside an CExtControlBar
derived control-bar.
This is the way I create the dialog inside the control-bar derived class:
m_pDockedControl->Create(IDD, this);
CRect rc;
m_pDockedControl->GetClientRect(rc);
SetInitDesiredSizeFloating(CSize(rc.Width(), rc.Height()));
I later in the code show the control-bar:
m_pMainFrm->ShowControlBar(pBar, bShow, FALSE);
The problem is that the size of the child dialog does not adjust to the size of the control-bar, so all my controls, that use anchors are not displayed properly.
I checked the size of the control-bar and the dialgo in it:
CRect rc;
pBar->GetClientRect(rc);
CRect rc1;
pBar->m_pDockedControl->GetClientRect(rc1);
and saw this for rc:
left 0 long
top 0 long
right 354 long
bottom 399 long
and this for rc1:
left 0 long
top 0 long
right 32767 long
bottom 32767 long
There is clearly something wring here, as the size of the the child must derive from it parent.
Please note that if I resize the control-bar it becomes OK... that means that the child knows its parent, but for some reason it does not resize according to it.
Am I doing something wring? Is this a bug?
Thanks,
Ron.