home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4811 < prev    next >
Encoding:
Text File  |  1993-01-10  |  1.7 KB  |  44 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant
  3. From: jagrant@emr1.emr.ca (John Grant)
  4. Subject: Re: how narrow can I make a window?
  5. Message-ID: <1993Jan11.001133.22005@emr1.emr.ca>
  6. Organization: Energy, Mines, and Resources, Ottawa
  7. References: <1993Jan10.064047.3230@emr1.emr.ca>
  8. Date: Mon, 11 Jan 1993 00:11:33 GMT
  9. Lines: 33
  10.  
  11. In article <1993Jan10.064047.3230@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
  12. [...stuff deleted...]
  13.  
  14. >Anyway, Windows won't let me make it narrows than some minimum width.
  15. >Is there another combination of WS_ styles/window types that will let me
  16. >make this window more narrow than the minimum?  Is it stated anywhere
  17. >in the docs what exactly this minimum is and why it exists?  I can see
  18. >that it shouldn't be smaller than the width of the system menu+
  19. >min box+max box (if present), but since I don't have a caption, minimize
  20. >box or maximize box, it should allow me to make it as narrow as the
  21. >system menu box.
  22.  
  23.     One of the advantages posting questions on the weekend
  24.     is that that you get a chance to answer them yourself before
  25.     too many people see them on Monday.
  26.  
  27.     Yes, I have the answer to my own question.  Just trap
  28.     WM_GETMINMAXINFO and set the min tracking width.  So
  29.     if I want to allow the window to be made narrower, but
  30.     no larger than 20:
  31.         case WM_GETMINMAXINFO:    {
  32.                     MINMAXINFO *mmi;
  33.                     lparam=(MINMAXINFO *)lparam;
  34.                     mmi->ptMinTrackSize.x=20;
  35.                     }
  36.                     break;
  37. John A. Grant                        jagrant@emr1.emr.ca
  38. Airborne Geophysics
  39. Geological Survey of Canada, Ottawa
  40. -- 
  41. John A. Grant                        jagrant@emr1.emr.ca
  42. Airborne Geophysics
  43. Geological Survey of Canada, Ottawa
  44.