Microsoft KB Archive/42983
Article ID: 42983
Article Last Modified on 1/9/2003
- Microsoft QuickBasic Compiler for Macintosh 1.0
This article was previously published under Q42983
The CALL BACKPAT statement sets the background pattern that will be used by a subsequent CLS statement, or a subsequent Macintosh Quickdraw ROM routine that performs an erase operation (such as ScrollRect, a Toolbox ROM routine that is documented in the book "Inside Macintosh, Volume I" described below).
This information applies to Microsoft QuickBASIC Version 1.00 for the Apple Macintosh.
There are two equivalent ways to invoke BACKPAT; we recommend the first method for better program readability:
CALL BACKPAT (VARPTR(pattern%(0)))
The BACKPAT routine that is built into QuickBASIC is explained in "Microsoft QuickBASIC for Apple Macintosh: Language Reference" on Page 393. The CALL BACKPAT statement actually invokes the BACKPAT ROM toolbox trap described below in Method 2.
TOOLBOX "I" TrapNo% = &HA87C TOOLBOX "P", TrapNo%, VARPTR(pattern%(0))
Page 505 describes how to directly invoke the BACKPAT ROM toolbox trap with the ToolBox statement in QuickBASIC (however, this page fails to mention that VARPTR must operate on the passed pattern array or else you receive a "Type Mismatch" error).
The pattern% array must be initialized with a pattern before you can use either method. For articles about using the Pattern Editor program or predefined System patterns, please query in this Knowledge Base on the following keywords:
PATTERN and MACINTOSH and QUICKBASIC
More information about BACKPAT can be found in "Inside Macintosh, Volume 1" by Apple Computer (published by Addison-Wesley).
Additional query words: MQuickB