cdesigner
asked on
CDialog + minimum size
Can I set minimum size of dialog window?
WM_GETMINMAXINFO not work
WM_GETMINMAXINFO not work
ASKER
No!
If i resizedeialog with mouse? I need not start size, I need absolutly minimal size for window
If i resizedeialog with mouse? I need not start size, I need absolutly minimal size for window
WM_GETMINMAXINFO should work. Show your code please.
I didn't get
what do you mean by
>minimum size of dialog window?
You can resize a window
using :
(1) SetWindowPos with SWP_SIZE
(2) MoveWindow Call
Use these in OnInitDialog.
what do you mean by
>minimum size of dialog window?
You can resize a window
using :
(1) SetWindowPos with SWP_SIZE
(2) MoveWindow Call
Use these in OnInitDialog.
Hi There
Use of MinMaxInfo is workin for me.
This is how I have done it.
Use two variales nMinWidth & nMinHeight. Initialize them to 0 in the constructor.
In the oncreate of your dialog box set the values to nMinWidth
& nMinHeight
In OnCreate(........)
{
if (CDialog::OnCreate(lpCreat eStruct) == -1)
return -1;
m_minWidth = lpCreateStruct->cx ;
m_minHeight = lpCreateStruct->cy ;
}
in OnGetMinMaxInfo(......) function
{
if (!m_minWidth) // first time
{
CDialog::OnGetMinMaxInfo(l pMMI);
return;
}
lpMMI->ptMinTrackSize.x = m_minWidth;
lpMMI->ptMinTrackSize.y = m_minHeight;
}
This sets the minimum height & width below which you cannot resize
Use of MinMaxInfo is workin for me.
This is how I have done it.
Use two variales nMinWidth & nMinHeight. Initialize them to 0 in the constructor.
In the oncreate of your dialog box set the values to nMinWidth
& nMinHeight
In OnCreate(........)
{
if (CDialog::OnCreate(lpCreat
return -1;
m_minWidth = lpCreateStruct->cx ;
m_minHeight = lpCreateStruct->cy ;
}
in OnGetMinMaxInfo(......) function
{
if (!m_minWidth) // first time
{
CDialog::OnGetMinMaxInfo(l
return;
}
lpMMI->ptMinTrackSize.x = m_minWidth;
lpMMI->ptMinTrackSize.y = m_minHeight;
}
This sets the minimum height & width below which you cannot resize
ASKER
No work
OnGetMaxMinInfo - protected function in
CDialog and it not called anytime.
Once more:
I create Dialog window, And want to set
minimum size this windows - window can
resizing more but no less.
OnGetMaxMinInfo - protected function in
CDialog and it not called anytime.
Once more:
I create Dialog window, And want to set
minimum size this windows - window can
resizing more but no less.
Can U clearly state the question.
ASKER
What? sorry not understand
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No reply of my comments.
{
Hey bhat r u Rohit Bhat from SISL.
}
{
Hey bhat r u Rohit Bhat from SISL.
}
ASKER
Oh , you right, CDialog not have this mesage in message map. you cool ! ;)
thanks
thanks
I am Vighnaraj Bhat
cs.cx = nTheWidthYouWant;
cs.cy = nTheHeightYouWant;