Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!news.duq.edu!newsgate.duke.edu!news.mathworks.com!howland.erols.net!blackbush.xlink.net!ins.net!heeg.de!hmm
From: hmm@heeg.de (Hans-Martin Mosner)
Subject: Re: [VW]  Maximizing a window programmatically?
Message-ID: <E1s3A6.J5I@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <329F65C5.32D2@str.daimler-benz.com>
Date: Mon, 2 Dec 1996 08:51:42 GMT
Lines: 31

Volker Wurst (V.Wurst@str.daimler-benz.com) wrote:
: Hi,
: is there any possibility to maximize a window programmatically (e.g. by
: emulating the click in the maximize-box of a (MS Windows) window)?
: Setting the windowSize with something like 'window displayBox: Screen
: default bounds' is not acceptable, because toggling the Maximize-Button
: wouldn't change the size and the user would have no chance to resize the
: window anymore (because the window borders aren't visible)

: BTW, is there somewhere an "official" way to get the height of the
: Windows title bar? 

You need DLL&C-Connect to access the Windows API functions for both of these.

The first thing is quite easy; use the ShowWindow function with the Smalltalk
window's windowKey value and the constant 3 (don't know it's mnemonic name...)

For the second, there must be an API somewhere, but I don't know how
it's called.

Your best bet is to ask a knowledgeable Windows programmer how to
do the things that you want, using the Windows API only (i.e., no
Microsoft Foundation Classes etc.). Then you can use these functions
from VisualWorks.

Hans-Martin
--
+--- Hans-Martin Mosner ---- Senior Smalltalk Guru :-) ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
