rdthomps@vela.acs.oakland.edu (Robert D. Thompson) (06/15/91)
In article <1991Jun13.183807.24270@hyper.hyper.com> bonneau@hyper.UUCP (Paul Bonneau,,) writes: >In article <1991Jun11.172122.24210@linus.mitre.org> dsb@mbunix.mitre.org writes: >>Given that I can get the rect of the client area of a variable sized parent >>window. >> >>Is it possible to create a modeless dialog box and RfitS the dialog box to the >>parentUs client area ? I would like to do this before I call DialogBox() or >>immediately afterwards. >> >>Is it possible to change the size of a dialog box from an .rc file at all ? >> >A dialog box is really just a popup window. So you can >change its size no problem--MoveWindow() or SetWindowPos() >work just fine. The WM_INITDIALOG case is a good time to do >this. [ more comments about modal dialog boxes ] >cheers - Paul Bonneau. 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. ??? Thanks for any help. Regards |(8> --- Robert
bonneau@hyper.hyper.com (Paul Bonneau) (06/17/91)
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.