Path: news.weeg.uiowa.edu!news.uiowa.edu!hobbes.physics.uiowa.edu!moe.ksu.ksu.edu!zaphod.mps.ohio-state.edu!uwm.edu!msuinfo!caen!batcomputer!ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!urz.unibas.ch!hochstrasse From: hochstrasse@urz.unibas.ch Newsgroups: comp.sys.apple2 Subject: TaskMaster IS Fun!!! Message-ID: <1993May23.162420.42929@urz.unibas.ch> Date: 23 May 93 16:24:20 MET Organization: University of Basel, Switzerland Lines: 47 SET_MIN_GROW PROBLEM RESOLVED!! ******************************* The response to my last question was again overwhelming! Thanks Albert, David, Eric, Jason and Matt! [alphabetical order...] There were really many suggestions, how to define a minimal size for a window, but David Empson from New Zealand found the far most elegant way, which might interest the other programmers as well: According to the GS Tech Note #24 [newest version], you can define the minimal heigth and with of a window in the 'ctlData' field of the EXTENDED CONTROL RECORD of the SIZE BOX. [this works when you set the bit 0 in the flags of the size box control record, i.e. TaskMaster will handle the grow box like a window frame grow box]. You can set the ctlData field with the SetCtlTitle call [ORCA/M lingo]: ~SetCtlTitle #$00CC0044,sizeBoxHandle ;Lo Word = minH = 68 ($44) ;Hi Word = minW =204 ($CC) I converted my minHeigth and minWidth to hex for clarity: The low word contains the minimal heigth and the high word the min width. BTW, the description of the 'SetCtlTitle' call in the TB Manual #1 is somewhat misleading: the first argument of the call need'nt be a pointer. In fact the argument itself is directly transferred to the ctlData field. I tested it and _IT WORKS!!!_ As you can see, this method just takes a single line of code. MEGAKUDOS TO DAVID for finding this one!!! --Urs P.S. *** I M P O R T A N T N O T I C E *** Henrik asked me to mention that the mainframe at his university is down at the time being, so he won't be able to receive or answer to email for a couple of days. Of course, you can send it to me, and I'll transmit it to him, if you like. *** | BRIGHT SOFTWARE | * A P P L E I I F O R E V E R * | | Urs Hochstrasser | Actually in Development: C H E M I X | | Strassburgerallee 79 | Pseudo: CodeBurger (binary sauce) | | 4055 BASEL, SWITZERLAND | InterNET: HOCHSTRASSE@URZ.UNIBAS.CH |