- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How would I maximize a dialog through code? I've only ever maximized a window, but a dlg isn't a window (at least I don't think so?).
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A dialog box certainly is a window and has its own handle. If the dialog information is held in a DIALOG type variable (e.g. DLG) and the window handle is obtainable using DLG%hWnd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
type(QWINFO) windowInfo
!Maximize the main window
windowInfo%type = QWIN$MAX
iret = SETWSIZEQQ(dlg%hWnd,windowInfo)
I tried this and it didn't work?? Why wouldn't this work? I'm trying to maximize modal diaogs i've made which I use as use interfaces to collect data from users. (its kind of like a survey)
!Maximize the main window
windowInfo%type = QWIN$MAX
iret = SETWSIZEQQ(dlg%hWnd,windowInfo)
I tried this and it didn't work?? Why wouldn't this work? I'm trying to maximize modal diaogs i've made which I use as use interfaces to collect data from users. (its kind of like a survey)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have played with a regular API window dialog example and found the following: in the dialog procedure there will be, or can be, an WM_INITDIALOG message handled. During the handling ofthat message you can use the API routine MoveWindow to both resize and reposition the window. This thus also facilitates settingthe width and height to itsmaximum. I hope this help you somehow!
Robert
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You mention a 'dialog', then you give an example referring to a QuickWin window. This dialog you are referring to, exactly what commands have you used to create and display it? If it is a standard dialog, then the windows API function ShowWindow(hwnd, SW_HIDE) will send a command to minimize the window that has window handle hWnd.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page