[comp.windows.ms.programmer] Windows of Fixed Size

thomas@ssd.kodak.com (Thomas B. Kinsman (37681)) (06/13/91)

In article <...> press@venice.sedd.trw.com (Barry Press) writes:
>In article <...> memetral@athena.mit.edu (Max E. Metral) writes:
>>Hello Again folks.  This time, I'm trying to create an application that
>>stays as an Icon, like Screen Peace.  I tried using
>There are two things to do.  1. pass the right SW_ code to ShowWindow.
>2. thing is that you have to field WM_QUERYOPEN...
>Barry Press                                 Internet: press@venice.sedd.trw.com

Barry,
   (Don't you hate seeing things that you wrote, over and over again...  :-))
   Just wanted to say thanks for the solution on how to keep a window iconic.
I was thinking that it would be along the lines of processing WM_GETMINMAXINFO.
Just goes to show all the nuances to Windows.

   Closely related problem:  How do you write an application that is the same
size, except when iconified?  Is it just processing WM_GETMINMAXINFO, or is
there more to it?
   WM_GETMINMAXINFO is sent when WINDOWS wants to know the maximized size of
the window, the minimum or maximum tracking size of the window, or the maximized
position of the window.
   Setting all the values of sizes the same doesn't work.  The result was that
when you iconify it, WINDOWS thinks that you have an icon the size of your
original window.  In fact, it *seems* that your ICON receives a WM_PAINT, and
it paints the usual client-information!  What happens probably isn't that easy,
but that seems to be the idea.
   What else am I missing?  Thanks in advance.
-- 
----
thomas@ssd.kodak.com	Voice: 716/477-9379(w)		Fax: 716/722-5008
Thomas B. Kinsman, Eastman Kodak Co., Flr 3, Bldg 65, RL, Roch., NY 14650-1805
"Knowledge is what's left when you throw the books away."	- A. Einstein

press@venice.SEDD.TRW.COM (Barry Press) (06/13/91)

In article <1991Jun12.215651.1313@ssd.kodak.com> thomas@ssd.kodak.com (Thomas B. Kinsman (37681)) writes:
>   Closely related problem:  How do you write an application that is the same
>size, except when iconified?  Is it just processing WM_GETMINMAXINFO, or is
>there more to it?

What I do is cheat (?!).  You can do this:

1.	Give the right sizes when you call CreateWindow.
2.	Intercept WM_SIZE and change values to what you want.

-- 
Barry Press                                 Internet: press@venice.sedd.trw.com

jerry@polygen.uucp (Jerry Shekhel) (06/17/91)

<1125@venice.SEDD.TRW.COM> press@venice.sedd.trw.com (Barry Press) writes:
>
>>
>>Closely related problem:  How do you write an application that is the same
>>size, except when iconified?  Is it just processing WM_GETMINMAXINFO, or is
>>there more to it?
>>
>
>What I do is cheat (?!).  You can do this:
>
>1.	Give the right sizes when you call CreateWindow.
>2.	Intercept WM_SIZE and change values to what you want.
>

I just create my window without the sizing border or maximize button.  Does
this not work for you?

>
>Barry Press                                 Internet: press@venice.sedd.trw.com
>
--
+-------------------+----------------------+---------------------------------+
| JERRY J. SHEKHEL  | POLYGEN CORPORATION  | When I was young, I had to walk |
| Drummers do it... | Waltham, MA USA      | to school and back every day -- |
|    ... In rhythm! | (617) 890-2175       | 20 miles, uphill both ways.     |
+-------------------+----------------------+---------------------------------+
|           ...! [ princeton mit-eddie bu sunne ] !polygen!jerry             |
|                            jerry@polygen.com                               |
+----------------------------------------------------------------------------+