DIALOG SET CLIENT Statement

Purpose | Change the size of a dialog to a specific client area size.
Syntax | DIALOG SET CLIENT hDlg, x&, y&
Remarks | hDlg refers to the handle of the dialog to change. x& and y& specify the new width and height of the dialog client area. x& and y& are specified in dialog units or pixels, depending upon the system used when the dialog was created. The dialog client size may be smaller than total size, depending on the type of borders used. The client area is the part below the dialog caption, and an eventual menu, where controls can be placed.
See also | Dynamic Dialog Tools, DIALOG NEW, DIALOG PIXELS, DIALOG UNITS, DIALOG GET CLIENT, DIALOG GET LOC, DIALOG GET SIZE, DIALOG SET LOC, DIALOG SET SIZE

Example

LOCAL hDlg, hMnu, hSubMenu AS DWORD, h, w AS LONG

DIALOG NEW 0, "My Dialog",,, 400, 300, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDlg

' Retrieve dialog client area

DIALOG GET CLIENT hDlg TO w, h

MENU NEW BAR TO hMnu

MENU NEW POPUP TO hSubMenu

MENU ADD POPUP, hMnu, "&File", hSubMenu, %MF_ENABLED

MENU ADD STRING, hSubMenu, "E&Xit", %IDCANCEL, %MF_ENABLED

MENU ATTACH hMnu, hDlg

' Restore client area to desired size

DIALOG SET CLIENT hDlg, w, h