Microsoft KB Archive/45172

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 14:14, 21 July 2020 by X010 (talk | contribs) (Text replacement - "&" to "&")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 45172

Article Last Modified on 11/21/2006

This article was previously published under Q45172

SUMMARY

When you invoke the BACKPAT ROM routine with a black background pattern, the background inside of a type 1 BUTTON turns black and the BUTTON title appears as black letters on white character-sized blocks.

If you invoke TEXTMODE 3 (Black-Is-Changed mode) in addition to the black BACKPAT, on the Macintosh SE and Macintosh Plus the text defined in the BUTTON is visible as white letters on a black background. However, the text is invisible (black) on a Macintosh II (except while the BUTTON is held down).

This behavior occurs with both the BACKPAT ROM routine CALL that is built into QuickBASIC and also with the ToolBox trap to invoke the BACKPAT ROM routine. This is not a problem in QuickBASIC. This behavior is an aspect of the system and hardware on the Macintosh II.

This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh.

MORE INFORMATION

TEXTMODE 3 is known as the Black-Is-Changed (BIC) mode. In this mode, black pixels in printed text change to white regardless of the background, and white pixels overlay the background.

Running Example 1 or 2 below on a Macintosh II results in the text within the button not being shown in inverse video, making it unreadable. The BUTTON text is invisible on the Macintosh II. The BUTTON text is visible on the Macintosh Plus and Macintosh SE.

Example 1

The following example calls the BACKPAT statement that is built into QuickBASIC:

OPTION BASE 1                       ' START ARRAYS AT 1
WINDOW 2,,(2,41)-(200,200),1
DIM pattern%(4)                     ' ARRAY TO HOLD PATTERN MASK
FOR i%=1 TO 4
pattern%(i%)=&HFFFF                 ' SET ALL BITS ON IN PATTERN MASK
NEXT i%

BACKPAT VARPTR(pattern%(1))      ' QuickBASIC's built-in BACKPAT

TEXTMODE 3                       '    INVERSE TEXT (Black Is Changed)
BUTTON 1,1,"butt",(10,10)-(50,30),1  ' Define BUTTON.
WHILE INKEY$="":WEND
                

Example 2

The following equivalent example calls the ToolBox statement to invoke the BACKPAT ROM trap:

OPTION BASE 1                      ' START ARRAYS AT 1
WINDOW 2,,(2,41)-(200,200),1
DIM pattern%(4)                    ' ARRAY TO HOLD PATTERN MASK
FOR i%=1 TO 4
pattern%(i%)=&HFFFF                ' SET ALL BITS ON IN PATTERN MASK
NEXT i%

ToolBox "i"                        ' INITIALIZE TOOLBOX
TrapNo%=&HA87C                     ' TRAP # FOR BACKPAT TOOLBOX CALL
ToolBox "P", TrapNo%, VARPTR(pattern%(1))   ' PERFORM BACKPAT CALL

TEXTMODE 3                         ' INVERSE TEXT (Black Is Changed)
BUTTON 1,1,"butt",(10,10)-(50,30),1'
WHILE INKEY$="":WEND
                


Additional query words: MQuickB

Keywords: KB45172