Microsoft KB Archive/42983

= BACKPAT Sets Pattern Used by Subsequent CLS, or ToolBox Erase =

Article ID: 42983

Article Last Modified on 1/9/2003

-

APPLIES TO


 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q42983



SUMMARY
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 &quot;Inside Macintosh, Volume I&quot; described below).

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



MORE INFORMATION
There are two equivalent ways to invoke BACKPAT; we recommend the first method for better program readability:

Method 1
CALL BACKPAT (VARPTR(pattern%(0))) The BACKPAT routine that is built into QuickBASIC is explained in &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference&quot; on Page 393. The CALL BACKPAT statement actually invokes the BACKPAT ROM toolbox trap described below in Method 2.

Method 2
TOOLBOX &quot;I&quot; TrapNo% = &HA87C TOOLBOX &quot;P&quot;, 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 &quot;Type Mismatch&quot; error).

Programming Notes
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 &quot;Inside Macintosh, Volume 1&quot; by Apple Computer (published by Addison-Wesley).

Additional query words: MQuickB

Keywords: KB42983

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.