Newsgroups: comp.windows.ms.programmer Path: utzoo!utgpu!watserv1!watmath!hyper.hyper.com!bonneau From: bonneau@hyper.hyper.com (Paul Bonneau) Subject: Re: How to Size/Move A Modeless Dialog??(WAS: Help with Dialog Boxes) Message-ID: <1991Jun17.160038.15021@hyper.hyper.com> Reply-To: bonneau@hyper.UUCP (Paul Bonneau,,) Organization: HyperCube Inc. References: <1991Jun11.172122.24210@linus.mitre.org> <1991Jun13.183807.24270@hyper.hyper.com> <7252@vela.acs.oakland.edu> Date: Mon, 17 Jun 1991 16:00:38 GMT In article <7252@vela.acs.oakland.edu> rdthomps@vela.acs.oakland.edu (Robert D. Thompson) writes: > >Paul, > > I could be wrong, but I think the request was for modeless > dialog boxes. I have had problems moving modeless dialog > boxes also. > > Do you have any comments on moveing modeless dialog boxes? > > I think the problem may lie in the way messages are dispatched > for modeless dialogs. > This is very strange. The *real* difference between modal and modeless is that there is a message loop inside the routine DialogBox() (modal) but not for CreateDialog() (modeless). So, you are right about the mechanism of dispatching the messages. Messages for a modeless dialog come from the applications message pump. This is why the call to IsDialogMessage() is so important. It provides the hook to the dialog manager to translate user input, like tabs say, into the appropriate action in the dialog. But to get back to the question, as far as the dialog itself goes, there *should* be no reason one can't resize the window during initialization. We have a couple of dialogs that do this (they have a variable number of PushButtons and size themselves accordingly--almost sounds like an X widget set ;-) All I can think of is make sure IsDialogMessage() is getting called with the window handle of any modeless dialog present (another thing to note is that you have to call it once for each modeless dialog if your app supports multiple simultaneous dialogs). cheers - Paul.