![]() |
Caption Bar in the Mainframe of an MDI |
Post Reply
|
| Author | |
estebann10
Newbie
Joined: 03 June 2006 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Caption Bar in the Mainframe of an MDIPosted: 03 June 2006 at 7:28am |
|
Hi !! I'm trying to create a Caption Bar in the Mainframe of my MDI application. Samples show how to procede with a SDI, but not with a MDI. I'm trying to split the Mainframe but i'm getting mad... Could you please give me some help on this little problem ? Thanks for advance... |
|
![]() |
|
estebann10
Newbie
Joined: 03 June 2006 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 June 2006 at 12:43pm |
|
Any Idea ??
|
|
![]() |
|
g_j_a_i_n
Groupie
Joined: 27 August 2005 Status: Offline Points: 94 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 August 2006 at 12:50am |
Any ideas? Even I need help... |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 August 2006 at 8:04am |
|
Hi,
1. Add detrived class from CXTCaption
2. Catch
ON_MESSAGE(WM_SIZEPARENT, OnSizeParent)
and
LRESULT CMyCaption::OnSizeParent(WPARAM, LPARAM lParam)
{ AFX_SIZEPARENTPARAMS* lpLayout = (AFX_SIZEPARENTPARAMS*)lParam; if (GetStyle() & WS_VISIBLE)
{ // align the control bar CRect rect; rect.CopyRect(&lpLayout->rect); CSize sizeAvail = rect.Size(); // maximum size available
CSize size(sizeAvail.cx, 20);
size.cy = min(size.cy, sizeAvail.cy);
lpLayout->sizeTotal.cy += size.cy;
lpLayout->sizeTotal.cx = max(lpLayout->sizeTotal.cx, size.cx); lpLayout->rect.top += size.cy; rect.right = rect.left + size.cx;
rect.bottom = rect.top + size.cy; // only resize the window if doing layout and not just rect query
if (lpLayout->hDWP != NULL) AfxRepositionWindow(lpLayout, m_hWnd, &rect); Redraw();
} return 0; } 3. create caption as child of mainframe.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |