Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!umd5!terminus.umd.edu!billy From: billy@terminus.umd.edu (Billy Taylor) Newsgroups: comp.windows.ms.programmer Subject: RE: handling WM_GETMINMAXINFO Message-ID: <8394@umd5.umd.edu> Date: 10 Apr 91 15:36:00 GMT Sender: news@umd5.umd.edu Organization: University of Maryland DOSIP-CSC Lines: 56 >>>Hi, excuse me for this stupid, trivial question, but here's my >>>problem. I want to specify the lower limit on my window size, and >>>I know you can do this by processing the WM_GETMINMAXINFO message. >>>Now, the documentation says that the lParam for this msg is a pointer >>>to an array of 5 "points". Does this mean an array of POINT structs? >>>I've tried to dereference it with this is mind, but the values do not >>>look correct (the default values that are supposed to be there). >>>Could someone send me a code frag that shows the correct way to set >>>a value (or Point) in this array. Email is fine. >>> >>>Darren Merrill >>>merrill@cs.arizona.edu Yes, Darren, lParam is an array of point structures. I access lParam below like a pointer to point structures. With hMainWnd the HWND to the main application window, and rect of type RECT, I use the segment below to to set the maximum size of the child window (this is obviously in the child window's window proc) to the current size of the client area of the main application window. ChildWindowProc (.......) : : : switch (msg) { : other cases : : case WM_GETMINMAXINFO: /* get the size of the main window client area */ GetClientRect (hMainWnd, &rect); /* use that to compute the size of a maximized window */ ((LPPOINT) lParam + 1) -> x = rect.right - rect.left; ((LPPOINT) lParam + 1) -> y = rect.bottom - rect.top; break; : : other cases : } zim-zam, billy. ----------------------------------------------------------------------------- Billy E. Taylor, Jr. | (301) 403-4611 | War is Over, Comp Sci Ctr, U of MD | billy@terminus.umd edu | If you want it -- j&y College Pk, MD 20742 | Disclaimer: I don't know, maybe it's me... -- zim-zam, billy.