Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Maximize Dialog

trainstroker
Beginner
707 Views
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?).
0 Kudos
4 Replies
anthonyrichards
New Contributor III
707 Views
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.
0 Kudos
trainstroker
Beginner
707 Views
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)
0 Kudos
Robert_van_Amerongen
New Contributor III
707 Views
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
0 Kudos
anthonyrichards
New Contributor III
707 Views
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.
0 Kudos
Reply