WIN LIBRARY
A Programming Language Manual



gs_shell
( lib: Win, file: gslib_win.cpp )
int gs_shell( filename, workdir, cmdline )

IN
str filename path to a file
str workdir start directory (optional)
str cmdline command line parameters (optional)
OUT
int 1=success, 0=fail

Execute the file filename or opens it in the default viewer associated with the file's extension.
The default web browser is used for .html, text viewer for .txt, etc.
Starting folder workdir and command line cmdline parameters are optional.


 C/C++ source code


gs_launch
( lib: Win, file: gslib_win.cpp )
int gs_launch( exefile, workdir, cmdline )

IN
str exefile path to an executable file
str workdir start directory (optional)
str cmdline command line parameters (optional)
OUT
int 1=success, 0=fail

Launch an executable (.exe) file.
Starting folder workdir and command line cmdline parameters are optional.


 C/C++ source code


gs_commandline
( lib: Win, file: gslib_win.cpp )
str gs_commandline( )

OUT
str command line

Returns the command line the console or the embedding application was launched with.
The command line will begin with the executable file's name that may use quotes.
The GS9 console command line will continue with the name of the program file, since that is the first parameter.


 C/C++ source code


gs_messagebox
( lib: Win, file: gslib_win.cpp )
int gs_messagebox( text, title, type=MB_OK )

IN
str text some text message
str title box title (optional)
int type=MB_OK buttons and icon flags (optional)
OUT
int selected button id

Pops an Windows message box with the specified parameters.
The type can be a binary combination of button and icon options.
MB_OK, MB_OKCANCEL, MB_YESNO, MB_YESNOCANCEL, MB_RETRYCANCEL, MB_ABORTRETRYIGNORE for specifying the box's buttons.
MB_ICONEXCLAMATION, MB_ICONQUESTION, MB_ICONERROR for specifying the box's icon
MB_SYSTEMMODAL for blocking other applications until this box is closed
It returns a response generating by chooseing one of the box's buttons.
IDOK, IDCANCEL, IDYES, IDNO, IDABORT, IDRETRY, IDIGNORE




 C/C++ source code


gs_messagebeep
( lib: Win, file: gslib_win.cpp )
int gs_messagebeep( type=-1 )

IN
int type=-1 sound (optional)
OUT
int 1=success, 0=fail

Generate an Windows message beep with the specidied parameters.
The type can be one of the following:
MB_ICONEXCLAMATION, MB_ICONQUESTION, MB_ICONERROR for specifying the box's icon.




 C/C++ source code


MB_OK
( lib: Win, file: gslib_win.cpp )
MB_OK

Used by gs_messagebox to specify dialog buttons.


MB_OKCANCEL
( lib: Win, file: gslib_win.cpp )
MB_OKCANCEL

Used by gs_messagebox to specify dialog buttons.


MB_RETRYCANCEL
( lib: Win, file: gslib_win.cpp )
MB_RETRYCANCEL

Used by gs_messagebox to specify dialog buttons.


MB_YESNO
( lib: Win, file: gslib_win.cpp )
MB_YESNO

Used by gs_messagebox to specify dialog buttons.


MB_YESNOCANCEL
( lib: Win, file: gslib_win.cpp )
MB_YESNOCANCEL

Used by gs_messagebox to specify dialog buttons.


MB_ABORTRETRYIGNORE
( lib: Win, file: gslib_win.cpp )
MB_ABORTRETRYIGNORE

Used by gs_messagebox to specify dialog buttons.


MB_ICONEXCLAMATION
( lib: Win, file: gslib_win.cpp )
MB_ICONEXCLAMATION

Used by gs_messagebox or gs_messagebeep to specify icon or sound.


MB_ICONQUESTION
( lib: Win, file: gslib_win.cpp )
MB_ICONQUESTION

Used by gs_messagebox or gs_messagebeep to specify icon or sound.


MB_ICONERROR
( lib: Win, file: gslib_win.cpp )
MB_ICONERROR

Used by gs_messagebox or gs_messagebeep to specify icon or sound.


MB_SYSTEMMODAL
( lib: Win, file: gslib_win.cpp )
MB_SYSTEMMODAL

Used by gs_messagebox for blocking message boxes.


IDOK
( lib: Win, file: gslib_win.cpp )
IDOK

Returned by gs_messagebox depending on the dialog response.


IDCANCEL
( lib: Win, file: gslib_win.cpp )
IDCANCEL

Returned by gs_messagebox depending on the dialog response.


IDYES
( lib: Win, file: gslib_win.cpp )
IDYES

Returned by gs_messagebox depending on the dialog response.


IDNO
( lib: Win, file: gslib_win.cpp )
IDNO

Returned by gs_messagebox depending on the dialog response.


IDABORT
( lib: Win, file: gslib_win.cpp )
IDABORT

Returned by gs_messagebox depending on the dialog response.


IDRETRY
( lib: Win, file: gslib_win.cpp )
IDRETRY

Returned by gs_messagebox depending on the dialog response.


IDIGNORE
( lib: Win, file: gslib_win.cpp )
IDIGNORE

Returned by gs_messagebox depending on the dialog response.