Article View: comp.os.ms-windows.programmer.misc
Article #2665Re: how narrow can I make a window?
From: John Grant
Date: Mon, 11 Jan 1993 00:11
Date: Mon, 11 Jan 1993 00:11
33 lines
1745 bytes
1745 bytes
In article <1993Jan10.064047.3230@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
[...stuff deleted...]
>Anyway, Windows won't let me make it narrows than some minimum width.
>Is there another combination of WS_ styles/window types that will let me
>make this window more narrow than the minimum? Is it stated anywhere
>in the docs what exactly this minimum is and why it exists? I can see
>that it shouldn't be smaller than the width of the system menu+
>min box+max box (if present), but since I don't have a caption, minimize
>box or maximize box, it should allow me to make it as narrow as the
>system menu box.
One of the advantages posting questions on the weekend
is that that you get a chance to answer them yourself before
too many people see them on Monday.
Yes, I have the answer to my own question. Just trap
WM_GETMINMAXINFO and set the min tracking width. So
if I want to allow the window to be made narrower, but
no larger than 20:
case WM_GETMINMAXINFO: {
MINMAXINFO *mmi;
lparam=(MINMAXINFO *)lparam;
mmi->ptMinTrackSize.x=20;
}
break;
John A. Grant jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
--
John A. Grant jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Technical Details
Message-ID:
<1993Jan11.001133.22005@emr1.emr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrantReferences:
<1993Jan10.064047.3230@emr1.emr.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant From: jagrant@emr1.emr.ca (John Grant) Subject: Re: how narrow can I make a window? Message-ID: <1993Jan11.001133.22005@emr1.emr.ca> Organization: Energy, Mines, and Resources, Ottawa References: <1993Jan10.064047.3230@emr1.emr.ca> Date: Mon, 11 Jan 1993 00:11:33 GMT Lines: 33