MIAMEX 91: Get / Set background color

xcall MIAMEX, MX_SYSBCLR, opcode, sysbclr {,syswinc, systxtc}

(Windows and ATE) MX_SYSBCLR allows you to assign one of the background color numbers (0-15) to reference the default Windows color for dialog box backgrounds (typically gray). The idea would then be to use Tab(-3,BGCOLOR) to use that color as your background color. The advantage of tying this color number to the Windows system background color instead of just setting it to a specific color, is that then it will automatically change when the Windows desktop color scheme is changed. For example, if the user switches to a "Valentine’s Day" scheme, the cool gray Window backgrounds will all change to pinkish ones.  

Parameters

opcode  (Num)

0 to query the current system background color number, or 1 to set it.

sysbclr  (Num)

will return the currently defined system background color number (for opcode 0), or establish it (for opcode 1).

syswinc  (0-7)

applies to one of the background colors in the color palette

systxtc  (0-7)

refers to one of the foreground colors.

You can also set this with SET TERM SYSBCOLOR n.