BCX System variables

BCX recognizes the following declarations as static char system variables pre-set to the values indicated in the comments.

👉 It is the programmer's responsibility not to alter the contents of these 16 string system variables.

BCX_CONSOLE global handle

Purpose:

BCX translates BCX_CONSOLE to "hConsole" which is a global handle, used for decades by most of the BCX console runtime code. BCX not only does the text translation, it also emits the relevant C \ C++ code that declares and initializes hConsole, so you don't have to.

Typically, when using a console mode function, a handle would be declared, and then retrieved and then, finally, used as in the following code.

DIM hOut AS HANDLE
hOut = GetStdHandle(STD_OUTPUT_HANDLE)
SetConsoleDisplayMode(hOut, CONSOLE_FULLSCREEN_MODE, NULL)
DELAY(3) ' wait three seconds 
SetConsoleDisplayMode(hOut, CONSOLE_WINDOWED_MODE, NULL)
PAUSE

Using BCX_CONSOLE, the code is simplified to the following

SetConsoleDisplayMode(BCX_CONSOLE, CONSOLE_FULLSCREEN_MODE, NULL)
DELAY(3) ' wait three seconds 
SetConsoleDisplayMode(BCX_CONSOLE, CONSOLE_WINDOWED_MODE, NULL)
PAUSE

CONWIN keyword

Purpose:

BCX automatically transforms CONWIN to GetConsoleWindow() which is a WinAPI function that returns a window handle of the active console window. Now you can:

CENTER(CONWIN),

HIDE(CONWIN),

SHOW(CONWIN)

and more.

LReturn system variable

Purpose:

LReturn is used by the CMDHANDLER and MSGHANDLER macro functions.

👉 LReturn is case sensitive.