Category : BASIC Source Code
Archive   : PROWINDB.ZIP
Filename : PROWINDB.DOC

 
Output of file : PROWINDB.DOC contained in archive : PROWINDB.ZIP






P r o W i n d o w s (tm) * L I T E *
Version 2.02QB


LEGAL NOTICE_____________________________________________________

This software is distributed under the "ShareWare" concept. You
are hereby granted 30 days to review this product after which you
are required to (a), pay the registration fee as described
elsewhere in these files, or (b), remove all copies of this
software from your possession.

If you are a registered user, then programs you write using
ProWindows *LITE* - Version 2.02 may be used, given away, or sold
without any additional license or fees. You are, however,
specifically required to place the appropriate copyright message
(defined below) in the user documentation. If, and only if, there
is no documentation, you are required to implement the ProWindows
library subroutine copyright() atleast once during the normal
execution of your program. You are also required to leave the
embedded copyright notice intact within the executable file.

This software is protected by both United States copyright law and
international treaty provisions.


Text of Required Notice__________________________________________

This product was created in part with ProWindows *LITE* - The
Professional Window Management System. For more information on
the ProWindows family of products, write to:

Daniel P. Stasinski
Systems Management Consultant
30 North Street
Willits, CA 95490
(707) 459-4358


WARRANTY_________________________________________________________

This product is sold "AS IS" and I specifically disclaim all
warranties, expressed or implied, including but not limited to
implied warranties of merchantability and fitness for a particular
purpose. In no event shall Daniel P. Stasinski be liable for any
loss of profit or any other commercial damage, including but not
limited to special, incidental, consequential or other damages.









(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 1




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Table of Contents________________________________________________
Table of Contents
Table of Contents
Table of Contents


Section 1.
Requirements & Support ......................... 3
ProWindows(tm) *PLUS* Information ................ 4

Section 2.
Method of Operation .............................. 5
Error Handling ................................... 6
Important Notices ................................ 7
Global Variables ................................. 8
Data Structures .................................. 9


Section 3.
attr ............................................. 10
clearwindow ...................................... 11
copyright ........................................ 12
popwindow ........................................ 13
removewindow ..................................... 15
titlewindow ...................................... 16
wprint ........................................... 17
wcprint .......................................... 17
cwprint .......................................... 17
cwcprint ......................................... 17

Section 4.
Tricks of the Trade .............................. 18



























(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 2




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


General Requirements_____________________________________________
General Requirements
General Requirements
General Requirements

Hardware - IBM PC, PC/XT, AT, or Compatible Computer
Mono, CGA, and EGA (in CGA mode)
1 Disk Drive
512K RAM minimum
DOS 2.1 or higher


Pro. Version Required Software Version

1.00TC Borland Turbo C 1.5 or higher
1.00QB Microsoft QuickBASIC 4.0 or higher



SOFTWARE SUPPORT ________________________________________________
SOFTWARE SUPPORT
SOFTWARE SUPPORT
SOFTWARE SUPPORT

Users of ProWindows(tm) are offered almost unlimited support. If
you need assistance, just mail a letter to the below address and I
will respond as fast as humanly possible.

If you discover a bug (I hope there are none), report it
immediately and it will be corrected and made available with the
next update.


Daniel P. Stasinski
Systems Management Consultant
30 North Street
Willits, CA 95490
(707) 459-4358
























(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 3




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


FOR THE SERIOUS PROGRAMMERS______________________________________
FOR THE SERIOUS PROGRAMMERS
FOR THE SERIOUS PROGRAMMERS
FOR THE SERIOUS PROGRAMMERS

For QuickBASIC - NOW Available
QuickBASIC
QuickBASIC
QuickBASIC
For Turbo C NOW Available
Turbo C
Turbo C
Turbo C

ProWindows *PLUS* and ProDesigner
ProWindows *PLUS* ProDesigner
ProWindows *PLUS* ProDesigner
ProWindows *PLUS* ProDesigner
only $37.95 (plus $2.50 S/H) for the dual package


ProWindows *PLUS* is the ultimate professional Software
Software
Software
Software
Development System. It adds dozens of new, and many enhancements
Development System
Development System
Development System
to the existing ProWindows *LITE* routines.

NEW *PLUS* routines include:

GridMouse - Mouse programming will never be easier.
PopHelp - Instant Full Color Help Screens.
PopMenu - vertical or horizontal menus.
PopList - vertical or horizontal scrolling menus.
PullMenu - pull down (QB style) menus.
GridMenu - X-Y grid list with scrolling.
PopCalander - instant calanders with date highlight.
PopCalc - pop up calculator with tape and paste.
Validate - multi-answer validator.
Query - Single line entry editor.
GetColor - Custom color coordinator.
ParseCom - Dos command line parser.
SetEvent - Recursive Multiple User Event Processor.
Fast File Access Routines
Bit-Level Math Routines

and much much more...........

When using ProDesigner, creating all type of menu's, entry
ProDesigner
ProDesigner
ProDesigner
screens, and help screens is a snap. You use the ProDesigner easy
ProDesigner
ProDesigner
ProDesigner
to use Menu Editor to create or modify each of your menus. Then
Menu Editor
Menu Editor
Menu Editor
you use the Help Editor to create FULL COLOR, single or multi
Help Editor FULL COLOR,
Help Editor FULL COLOR,
Help Editor FULL COLOR,
page, help screens which can correspond to ANY menu selections, or
can be made to appear instantly anywhere in your program.

ProDesigner can also generate most of the support source code for
ProDesigner
ProDesigner
ProDesigner
each of these functions.



***** NOTICE *****
***** NOTICE *****
***** NOTICE *****
***** NOTICE *****

Registered users of ProWindows *LITE* - Version 3.02 will recieve
Registered users of ProWindows *LITE* - Version 3.02 will recieve
Registered users of ProWindows *LITE* - Version 3.02 will recieve
Registered users of ProWindows *LITE* - Version 3.02 will recieve
a $10.00 discount towards the purchase of ProWindows *PLUS* and
a $10.00 discount towards the purchase of ProWindows *PLUS* and
a $10.00 discount towards the purchase of ProWindows *PLUS* and
a $10.00 discount towards the purchase of ProWindows *PLUS* and
ProDesigner.
ProDesigner.
ProDesigner.
ProDesigner.






(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 4




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Method of Operation______________________________________________
Method of Operation
Method of Operation
Method of Operation

ProWindows *LITE* is more than just a windowing module, in a way,
it is more like a special operating system. Both of these
packages are based upon the PRO-WLS (Professional Window Logic
PRO-WLS
PRO-WLS
PRO-WLS
System) unit. The PRO-WLS unit manages every subroutine used to
PRO-WLS
PRO-WLS
PRO-WLS
create, print to, clear, and finally, remove a window.

When you call the PopWindow subroutine, many important procedures
PopWindow
PopWindow
PopWindow
take place. First, PRO-WLS saves the portion of the current
PRO-WLS
PRO-WLS
PRO-WLS
screen you are about to place the window over. Then, using a
proprietary compression algorithm, the old screen is squeezed to
sometimes less that 80% it's original size. This is intended to
save you plenty of memory space. Also, your compressed screen is
stored in 'far' memory so you will save that valuable 'string
space'.

After compression, every parameter you gave PopWindow is placed
PopWindow
PopWindow
PopWindow
onto the window stack. The window stack is used to tell the other
ProWindows subroutines where and how they can place text within
the intended screen. In addition, it also holds vital information
as to how your old screen is to be decompressed and re-displayed
when you call the RemoveWindow subroutine. This version comes
RemoveWindow
RemoveWindow
RemoveWindow
with a default stack that can hold up to 30. You may modify this
by adjusting a few variables in the include file.

All this happens in about 1/10th of a second.

When you call the RemoveWindow subroutine, the exact opposite
RemoveWindow
RemoveWindow
RemoveWindow
happens. The PRO-WLS unit locates your old screen, decompresses
PRO-WLS
PRO-WLS
PRO-WLS
it, and places it back on your current screen, and at the correct
location too.

Nothing could be easier.






















(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 5




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


ERROR HANDLING___________________________________________________
ERROR HANDLING
ERROR HANDLING
ERROR HANDLING

ProWindows *LITE*, by design, is a very delicate system. It's
error handling procedures were designed so that in the event of a
major error, the program terminates, rather than possibly lock up
your entire system. As you may realize, this forces you to write
programs with special attention to accuracy.

When a fatal occurs, the following error messages are displayed:

"No window to remove." occurs if you try to delete an nonexistent
window.

"Too many windows." will be displayed if you attempt to create
more windows than you have subscripted.

"Not a supported video mode.". ProWindows *PLUS* - Version 1.00
supports only the following modes:

BW80 80 x 25 b/w text
CO80 80 x 25 16 color text
MONO 80 x 25 mono text

All other video modes will cause an error. Future versions may
support additional video modes.

"Invalid copyright.". The entire "ProWindows" line of products is
copyrighted material. The only time you will ever get this error
is if you have altered the internal copyright notices. This, by
the way, is a very serious crime. Please do not ever degrade
yourself, and risk criminal prosecution, by modifying the
copyright. Violators will be turned over to the FBI without
warning.























(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 6




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Important Notes__________________________________________________
Important Notes
Important Notes
Important Notes

You must include the files PROWINDB.INC with programs that
PROWINDB.INC
PROWINDB.INC
PROWINDB.INC
implement any ProWindows subroutine. This may be accomplished by
ProWindows
ProWindows
ProWindows
placing the following command on the very first line of the main
code of your program:

REM $INCLUDE: 'PROWINDB.INC'
REM $INCLUDE: 'PROWINDB.INC'
REM $INCLUDE: 'PROWINDB.INC'
REM $INCLUDE: 'PROWINDB.INC'


Failure to implement this may cause your system to instantly lock.


-----------------------------------------------------------------

ALL numeric variables to be passed to any ProWindows subroutine,
MUST be an INTEGER variable. Use DIM variable AS INTEGER, DEFINT
DIM variable AS INTEGER, DEFINT
DIM variable AS INTEGER, DEFINT
DIM variable AS INTEGER, DEFINT
A-Z, or place a "%" symbol after the variable name.
A-Z %
A-Z %
A-Z %






































(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 7




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


GLOBAL VARIABLES_________________________________________________
GLOBAL VARIABLES
GLOBAL VARIABLES
GLOBAL VARIABLES

-----------------------------------------------------------------
CREATEMODE%
CREATEMODE%
CREATEMODE%
CREATEMODE%
-----------------------------------------------------------------

Name: CREATEMODE% - display window reference number flag
Name: CREATEMODE%
Name: CREATEMODE%
Name: CREATEMODE%

Usage: CREATEMODE% = 0 or 1
Usage:
Usage:
Usage:

Desc: CREATEMODE% controls whether ProWindows will
Desc: CREATEMODE%
Desc: CREATEMODE%
Desc: CREATEMODE%
display the current window reference number and the
amount of memory being used by the WLS at the lower
right portion of the screen.

-----------------------------------------------------------------
SCRN%() - array
SCRN%()
SCRN%()
SCRN%()
-----------------------------------------------------------------

Name: SCRN%() - window storage area
Name: SCRN%()
Name: SCRN%()
Name: SCRN%()

Desc: SCRN%() is an INTEGER array that is used as the
Desc: SCRN%()
Desc: SCRN%()
Desc: SCRN%()
storage area for all of your saved windows. An
average window uses about 400 cells of this array.
To compute your maximum subscript, multiply 400
times the number of windows. To be safe, add 10%.
This array is allocated from the far heap so you
are left with your existing string space.


-----------------------------------------------------------------
SNOW%
SNOW%
SNOW%
SNOW%
-----------------------------------------------------------------

Name: SNOW% - snow suppression flag
Name: SNOW%
Name: SNOW%
Name: SNOW%

Usage: SNOW% = 0 or 1
Usage:
Usage:
Usage:

Desc: SNOW% controls whether ProWindows will use snow
Desc: SNOW%
Desc: SNOW%
Desc: SNOW%
suppression or not. This is best kept as an option
for your application program user to decide.


-----------------------------------------------------------------
WI%
WI%
WI%
WI%
-----------------------------------------------------------------

Name: WI% - index to current window
Name: WI%
Name: WI%
Name: WI%

Desc: WI% contains an integer value corresponding to the
Desc: WI%
Desc: WI%
Desc: WI%
current window number being displayed.

The program must never modify the contents of this
variable.


(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 8




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Data Structures__________________________________________________
Data Structures
Data Structures
Data Structures

There is only one data type in use by ProWindows *PLUS*.

TYPE wcb
row AS INTEGER
col AS INTEGER
rows AS INTEGER
cols AS INTEGER
attr AS INTEGER
border AS INTEGER
shadow AS INTEGER
zoom AS INTEGER
ptr AS INTEGER
abytes AS INTEGER
cbytes AS INTEGER
END TYPE

The wcb data type is used by every ProWindows *PLUS* subroutine to
coordinate saving, printing to, and removing windows.

The first eight elements contain the information just as you
called PopWindow.
PopWindow
PopWindow
PopWindow

data is a pointer to a subscript in scrn%() where your old window
data scrn%()
data scrn%()
data scrn%()
is stored. abytes and cbytes contain specific information as to
abytes cbytes
abytes cbytes
abytes cbytes
the proper methods of decompressing your old screen.

Your routines must not modify the contents of any variable in this
structure. Doing so will cause unexpected results.


























(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 9




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


ATTR% - Function
ATTR% - Function
ATTR% - Function
ATTR% - Function


Action:
Action:
Action:
Action:

Calculates and returns an integer value corresponding to supplied
Foreground and Background colors.


Syntax:
Syntax:
Syntax:
Syntax:

ATTR%(foreground%, background%)


Remarks:
Remarks:
Remarks:
Remarks:

Returns an unsigned integer ranging 0 to 255. Valid Foreground
ranges are 0 to 31. Valid Background ranges are 0 to 7. Always
pass only INTEGER values. All other data types may cause a system
lockup.

This subroutine is used with most ProWindows *PLUS* routines.


See Also:
See Also:
See Also:
See Also:

QuickBASIC's COLOR statement.


Example:
Example:
Example:
Example:

Fore% = 15
Back% = 1
MyKolor% = ATTR%(Fore%, Back%)
PRINT "Method 1 -> "; MyKolor%

MyKolor% = ATTR%(10, 2)
PRINT "Method 2 -> "; MyKolor%

PRINT "Method 3 -> "; ATTR%(7, 0)


Output:
Output:
Output:
Output:

Method 1 -> 31
Method 2 ->
Method 3 -> 7









(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 10




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


ClearWindow - SUB
ClearWindow - SUB
ClearWindow - SUB
ClearWindow - SUB


Action:
Action:
Action:
Action:

Clears everything within the borders of the current window being
displayed.


Syntax:
Syntax:
Syntax:
Syntax:

CALL ClearWindow


Remarks:
Remarks:
Remarks:
Remarks:

Does not remove any titles or text on window borders.


See Also:
See Also:
See Also:
See Also:

RemoveWindow


Example:
Example:
Example:
Example:

CALL PopWindow( 5, 30, 10, 30, attr%(14 ,4), 1, 1, 1)
CALL TitleWindow(2, "My Pretty Window Title")
CALL TitleWindow(5, "Press ANY KEY to Continue")
wprint( 3, 3, "Some Text");
wprint( 7, 5, "More Text");

WHILE INKEY% = "": WEND

CALL ClearWindow
wprint( 4, 2, "This Text");
wprint( 8, 9, "That Text");

WHILE INKEY% = "": WEND

CALL RemoveWindow















(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 11




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Copyright - SUB
Copyright - SUB
Copyright - SUB
Copyright - SUB


Action:
Action:
Action:
Action:

Displays the ProWindows copyright notice.
ProWindows
ProWindows
ProWindows


Syntax:
Syntax:
Syntax:
Syntax:

CALL Copyright(row%, col%)


Remarks:
Remarks:
Remarks:
Remarks:

This routine displays the ProWindows *LITE* copyright message at
the supplied coordinates. The message is displayed in a window 8
rows deep and 43 columns wide.

Note: In version 2.01 ONLY, it is required that you call this
ONLY
ONLY
ONLY
function within 30 seconds after creating your first pop up
window. Failure to do so will cause it to pop up automaticly.

Note: Version 3.00 and *PLUS* users are not required to display
Note: Version 3.00 and *PLUS* users are not required to display
Note: Version 3.00 and *PLUS* users are not required to display
Note: Version 3.00 and *PLUS* users are not required to display
the ProWindows copyright message, and have the option to disable
the ProWindows copyright message, and have the option to disable
the ProWindows copyright message, and have the option to disable
the ProWindows copyright message, and have the option to disable
it along with the 3 second delay.
it along with the 3 second delay.
it along with the 3 second delay.
it along with the 3 second delay.

Note: copyright creates a window that must be later removed.
copyright
copyright
copyright

Example:
Example:
Example:
Example:

NiceThingToDo:

CALL PopWindow( 5, 5, 15, 70, attr%(14 ,4), 1, 1, 1)

CALL TitleWindow(2, "My Pretty Startup Screen")
CALL TitleWindow(5, "Press ANY KEY to Continue")
Copyright(8, 19)

WHILE INKEY% = "": WEND

CALL RemoveWindow 'once for the notice
CALL RemoveWindow 'again for the window













(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 12




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


PopWindow - SUB
PopWindow - SUB
PopWindow - SUB
PopWindow - SUB


Action:
Action:
Action:
Action:

Displays a "pop up" window at the coordinates, and to the
specifications supplied.


Syntax:
Syntax:
Syntax:
Syntax:

CALL PopWindow (Row%, Col%, Rows%, Cols%,
Attribute%, Border%, Shadow%, Zoom%)


Remarks:
Remarks:
Remarks:
Remarks:

Each displayed window starts at coordinates Row% & Col%, and is
Row% Col%
Row% Col%
Row% Col%
Rows% deep and Cols% wide. Attribute% determines the window's
Rows% Cols% Attribute%
Rows% Cols% Attribute%
Rows% Cols% Attribute%
color (generally ATTR% is used is creating colors). ProWindows
*PLUS* has:

273 Border% styles,
Border%
Border%
Border%

0 - No Border
1 - Single line box
2 - Double line box
3 - Single Horizontal - Double Vertical
4 - Double Horizontal - Single Vertical
5 to 16 - (Version 3.02 & *PLUS* only) See Demo
1000 + ASCII value - ASCII Character
(Version 3.02 & *PLUS* only) See Demo

5 Shadow% styles,
Shadow%
Shadow%
Shadow%

0 - No Shadow
1 - Bottom Left
2 - Bottom Right (Version 3.02 & *PLUS* only)
3 - Top Left (Version 3.02 & *PLUS* only)
4 - Top Right (Version 3.02 & *PLUS* only)

9 Zoom% styles,
Zoom%
Zoom%
Zoom%

0 - No Zoom (Instant)
1 - Grow from Center
2 - Grow Down and Left (Version 3.02 & *PLUS* only)
3 - Grow Down (Version 3.02 & *PLUS* only)
4 - Grow Down and Right (Version 3.02 & *PLUS* only)
5 - Grow Left (Version 3.02 & *PLUS* only)
6 - Grow Right (Version 3.02 & *PLUS* only)
7 - Grow Up and Left (Version 3.02 & *PLUS* only)
8 - Grow Up (Version 3.02 & *PLUS* only)
9 - Grow Up and Right (Version 3.02 & *PLUS* only)



(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 13




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Prior to displaying each window, the current portion of screen
which the window will occupy is automatically saved.

Warning:
Warning:
Warning:
Warning:

DO NOT EVER USE COLOR 8,0 or ATTR%(8,0). This particular
COLOR 8,0 ATTR%(8,0)
COLOR 8,0 ATTR%(8,0)
COLOR 8,0 ATTR%(8,0)
attribute generates a code that will completely corrupt the screen
compression routine and will cause your computer to lock up.
Since those two in combination create black on black, you should
never have a reason to use them.


See Also:
See Also:
See Also:
See Also:

ATTR, RemoveWindow,


Example:
Example:
Example:
Example:

DrawTheWindow:

' draw a window at row 5, column 30
' make it 10 rows deep and 30 columns wide
' color it YELLOW (14) on a RED (4) background
' Border style 1
' Shadow style 1
' Zoom style 1

CALL PopWindow( 5, 10, 15, 70, attr%(14 ,4), 1, 1, 2)

' wait 5 seconds

SLEEP 5

' remove the window

CALL RemoveWindow



















(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 14




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


RemoveWindow - SUB
RemoveWindow - SUB
RemoveWindow - SUB
RemoveWindow - SUB


Action:
Action:
Action:
Action:

Removes current window being displayed and restores the screen
back to its original contents.


Syntax:
Syntax:
Syntax:
Syntax:

CALL RemoveWindow


Remarks:
Remarks:
Remarks:
Remarks:

Displays an error message and END's if you try to remove a window
and there are none on the stack.


See Also:
See Also:
See Also:
See Also:

PopWindow


Example:
Example:
Example:
Example:

CALL PopWindow( 5, 30, 10, 30, attr%(14 ,4), 1, 1, 1)
CALL TitleWindow(5, "Press ANY KEY to Continue")

WHILE INKEY% = "": WEND

CALL RemoveWindow























(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 15




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


TitleWindow - SUB
TitleWindow - SUB
TitleWindow - SUB
TitleWindow - SUB


Action:
Action:
Action:
Action:

Places specified text at any of eight border locations.


Syntax:
Syntax:
Syntax:
Syntax:

CALL TitleWindow(position%, title$)


Remarks:
Remarks:
Remarks:
Remarks:

A title is placed on the last displayed window. Foreground and
background colors are set to the default for that particular
window. Multiple calls are allowed, so you may places text at all
six locations if you desire.

The six border positions are set by passing an INTEGER to
Position%. Positions permitted are:

1 - Top Left.
2 - Top Center.
3 - Top Right
4 - Bottom Left.
5 - Bottom Center.
6 - Bottom Right.
7 - Left and Vertical (Version 3.02 & *PLUS* only)
8 - Right and Vertical (Version 3.02 & *PLUS* only)


Example:
Example:
Example:
Example:


TitleTheWindow:

CALL PopWindow( 5, 30, 10, 30, attr%(14 ,4), 1, 1, 1)

CALL TitleWindow (2, "My Pretty Window Title")
CALL TitleWindow (5, "Press ANY KEY to Continue")

WHILE INKEY% = "": WEND

CALL RemoveWindow











(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 16




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


WPRINT - SUB
WPRINT - SUB
WPRINT - SUB
WPRINT - SUB
CWPRINT - SUB
CWPRINT - SUB
CWPRINT - SUB
CWPRINT - SUB
WCPRINT - SUB
WCPRINT - SUB
WCPRINT - SUB
WCPRINT - SUB
CWCPRINT - SUB
CWCPRINT - SUB
CWCPRINT - SUB
CWCPRINT - SUB


Action:
Action:
Action:
Action:

Places text at the specified position relative to the inner
coordinates of the current window.


Syntax:
Syntax:
Syntax:
Syntax:

CALL wprint(Row%, Col%, Text$)
CALL cwprint(Row%, Col%, Attribute%, Text$)
CALL wcprint(Row%, Text$)
CALL cwcprint(Row%, Attribute%, Text$)


Remarks:
Remarks:
Remarks:
Remarks:

wprint assumes that the text is to be displayed in the default
wprint
wprint
wprint
colors for that window. cwprint allows you to specify exact
cwprint
cwprint
cwprint
colors.

wcprint and cwcprint are the same except that the text is
wcprint cwcprint
wcprint cwcprint
wcprint cwcprint
automatically centered within the current window so you need not
specify a column.


Example:
Example:
Example:
Example:


FourPrintInTheWindows:

CALL PopWindow( 5, 5, 8, 40, attr%(14 ,4), 1, 1, 1)

CALL wprint(3, 5, "Default Color Text")
CALL cwprint(4, 5, attr(15, 1), "Different Color Text")
CALL wcprint(5, "Default Color Centered Text")
CALL cwcprint(6, attr(15,5), "Different Color Centered Text")

WHILE INKEY% = "": WEND

CALL RemoveWindow










(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 17




ProWindows *LITE* - Ver. 2.02QB
Window Logic System - Documentation


Tricks of the Trade______________________________________________

Well it's not actually a trick, it is a feature of QuickBASIC that
is not well known and deserves attention.

Whenever you create your own SUB or FUNCTION in QuickBASIC,
SUB FUNCTION
SUB FUNCTION
SUB FUNCTION
an appropriate DECLARE SUB or DECLARE FUNCTION statement is
DECLARE SUB DECLARE FUNCTION
DECLARE SUB DECLARE FUNCTION
DECLARE SUB DECLARE FUNCTION
automatically generated and placed at the head of the program
source code. This statement serves two distinct purposes, one as
a matter of safety and another of pure convenience .

FOR YOUR SAFETY, every time you call a declared function,
FOR YOUR SAFETY
FOR YOUR SAFETY
FOR YOUR SAFETY
QuickBASIC checks that every passed parameter is of the correct
type. Attempting to pass a STRING variable to a routine that
requests an INTEGER could be disastrous if unchecked. If each
routine is DECLARE'd, your errors will be caught before the damage
is done.

FOR YOUR CONVENIENCE, all DECLARE'd routines can be called without
FOR YOUR CONVENIENCE
FOR YOUR CONVENIENCE
FOR YOUR CONVENIENCE
the need of using the CALL statement. In addition, you can get
CALL
CALL
CALL
rid of all those parentheses too. As a few examples:

The ProWindows Subroutine:

CALL PopWindow( 5, 5, 15, 70, attr(7, 0), 1, 1, 0)
CALL TitleWindow( 5, "This is a Title")
CALL RemoveWindow

become:

PopWindow 5, 5, 15, 70, attr(7, 0), 1, 1, 0
TitleWindow 5, "This is a Title"
RemoveWindow


Simple nostalgic reasoning force me to keep the parentheses and
CALL's on all routines that require arguments. For those without
arguments, I don't prefix it with a CALL.

As for you, do what is comfortable for you. Just do it
consistently.















(c) Copyright 1988-1989 Daniel P. Stasinski
Page - 18




  3 Responses to “Category : BASIC Source Code
Archive   : PROWINDB.ZIP
Filename : PROWINDB.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/