Other Window Commands in GLLs

Everything that has to do with OpenW, LoadForm, OCX, Sleep, GetEvent, MENU(), etc is not allowed. However, for easy access, the following GFA-BASIC statements and functions are implemented to be used in Gfa Editor Extensions.

ExtensionImplementation

Dlg(id) - Obtains the window handle of the dialog with number id (0 .. 31)

DlgItem(id,idc) - Obtains the window handle of the child control idc in dialogbox id.

c$ = _Win$(h) - Returns a string with the window text of the window with handle h.

_Win$(h) = c$ - Sets the window text of window h with the contents of string c$.

MoveW id, x, y - SetWindowPos(Dlg(id),0,x,y,0,0,SWP_NOZORDER | SWP_NOSIZE)

SizeW id, w, h - SetWindowPos(Dlg(id),0,0,0,w,h,SWP_NOZORDER | SWP_NOMOVE)

CloseW id - DestroyWindow(Dlg(id))

ClearW id - InvalidateRect(Dlg(id),0,1) + UpdateWindow(Dlg(id))

ShowW id,swf - ShowWindow(Dlg(id), swf)

EnableW id - EnableWindow(Dlg(id), 1)

DisableW id - EnableWindow(Dlg(id), 0)

Enabled?(id) - IsWindowEnabled(Dlg(id))

SetCheck id, n, f - SendMessage(Dlg(id,n), BM_SETCHECK,f,0)

Check?(id, n) - f = SendMessage( Dlg(id,n), BM_GETCHECK,0,0)

Zoomed?(id) - IsZoomed(Dlg(id))

Visible?(id) - IsWindowVisible(Dlg(id))

Iconic?(id) - IsIconic(Dlg(id))

Except for Dialog#, ShowDialog, and CloseDialog, all functions take either a dialog number (between 0 and 31) or a window handle.

{Created by Sjouke Hamstra; Last updated: 12/05/14 by James Gaite}