Resizing CPropertySheets.
Philip T. Carey -- ptcarey@netcom.com Thursday, January 04, 1996 What is the best way to alter the default initial size for mnodeless CPropertySheets? The documentation indicates that it uses the largest page size to set the window size, but this is not happening for me. I would like to use the largest page size as a guide for my own resizing via MoveWindow (or SetWindowPos or...), but I have not (yet?) identified a time (i.e. message) at which the first property page window handle is valid so that I may obtain its size for this purpose. In fact, the situation seems to be a catch-22, by the time I can get a valid handle, the page has already been resized UP by its owning sheet, I want exactly the opposite! I can think of some workarounds, i.e. using the size of a control within a page as the basis for resizing everything explicitly, but that seems like a heavy-handed solution, I was hoping that someone knew of a better way. TIA - PC
Rick Esterling -- rick@eco.twg.com Tuesday, January 09, 1996 On 4 Jan 96 at 18:42, Philip T. Carey wrote: > The documentation indicates that it uses the largest page size > to set the window size, but this is not happening for me. I can't find this right now, but I seem to recall having read once that propsheet objects use size of the the *first* page to determine the size of the propsheet, not the largest. I understood this to mean whichever page was added to the propsheet object with AddPage() first was the page that determined the overall size of the propsheet "dialog" regardless of the sizes of the pages that are added subsequently to the first. Sorry I can't find a reference in the documentation for you, but it's worth testing anyway. [Moderator's note: For a modal property sheet, it uses the dimensions of the largest sheet(s). That is, it takes the tallest page and the widest page and uses those dimensions. I know this from experimenting. The problem Phil is having is with a modeless property sheet, which appears to be different. I need to switch my sample app to modeless to see what happens.] Later, Rick ------------------------------------------------------------- Rick Esterling The Wollongong Group, Inc. Senior Software Engineer McLean, VA http://widget.eco.twg.com:1080 http://www.twg.com
| Вернуться в корень Архива |