Article View: comp.windows.ms.programmer
Article #2044Re: handling WM_GETMINMAXINFO
From: Darren J. Merrill
Date: Thu, 11 Apr 1991 16:53
Date: Thu, 11 Apr 1991 16:53
26 lines
1477 bytes
1477 bytes
In article <36190003@hpcvra.cv.hp.com.> tedb@hpcvra.cv.hp.com. (Ted Beers) writes:
>/ hpcvra.cv.hp.com:comp.windows.ms.programmer / merrill@cs.arizona.edu (Darren J. Merrill) / 1:56 pm Apr 9, 1991 /
(...my stuff deleted...)
>Please post the solution to this problem. I am also interested, and so
>are many others, I suspect.
>
>Ted W. Beers
>Hewlett-Packard
My problem was that I was casting lParam to a pointer to a POINT, ie -
(POINT *)lParam. But lParam is a FAR pointer!! So, you can just use
the symbolic constant given in windows.h LPPOINT (far pointer to tag_point
structure) to cast lParam and bingo - it works.
Sample code:
case WM_GETMINMAXINFO:
// to set the minimum size of the window:
((LPPOINT)lParam)[3].x = my_minimum_x;
((LPPOINT)lParam)[3].y = my_minimum_y;
// that's it
return 0;
Thanks again to everyone that mailed me and posted replies. I guess I'm
too used to Unix.
Darren Merrill
merrill@cs.arizona.edu
Technical Details
Message-ID:
<1377@caslon.cs.arizona.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!noao!arizona!merrillReferences:
<1360@caslon.cs.arizona.edu> <36190003@hpcvra.cv.hp.com.>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!noao!arizona!merrill From: merrill@cs.arizona.edu (Darren J. Merrill) Newsgroups: comp.windows.ms.programmer Subject: Re: handling WM_GETMINMAXINFO Keywords: windows messages (setting min and max of a window) Message-ID: <1377@caslon.cs.arizona.edu> Date: 11 Apr 91 16:53:49 GMT References: <1360@caslon.cs.arizona.edu> <36190003@hpcvra.cv.hp.com.> Organization: U of Arizona CS Dept, Tucson Lines: 26