Thanks. That's what I needed.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
Several things here:
First, you have to process the OnNcHitTest message. If you get back a
resizing option you
don't support, such as HTLEFT or HTRIGHT, change it to HTNOWHERE [I think
that's the
code]; if it is for a diagonal sizing, just change it to the correct
vertical sizing only,
e.g.,
UINT CMyDialog::OnNcHitTest(...)
{
UINT where = CDialog::OnNcHitTest(...);
switch(where)
{
case HTCLIENT:
case HTCAPTION:
... others to be left alone...
return where;
case HTLEFT:
case HTRIGHT:
return HTNOWHERE;
case HTTOPLEFT:
case HTTOPRIGHT:
return HTTOP;
case HTBOTTOMLEFT:
case HTBOTTOMRIGHT:
return HTBOTTOM;
default:
ASSERT(FALSE); // you missed a case!
return where;
}
Then you have to handle WM_GETMINMAXINFO (OnGetMinMaxInfo) and set the
mintrack and
maxtrack values, and for the width values these will be identical to the
actual width, so
this will handle non-mouse-resizing as well (including maximizing)
joe
On Fri, 4 Aug 2006 16:23:05 -0500, "Drew" <drew.nospam.myers@esrd.com>
wrote:
Is there a way to not allow vertical stretching of a dialog while
allowing horizontal stretching without getting a flicker?
Preferably, not even allowing the cursor to switch to the
sizing cursor.
Thanks,
Drew
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm