BB1 WINDOWS PROGRAMMING
A window is the primary input and output device of any Windows application. It is an
applicationīs only access to the screen. If you write a Microsoft Windows
application program for the BB1, you can create a main window with 320 * 240
dots (1/4 VGA size) by using the CreateWindow function. This function
tells Windows to create a window that has the specified style and belongs to
the specified class.
The CreateWindow function builds a window based on a window class created with the RegisterClass
function or based on a predefined control class. CreateWindow takes several parameters
for window location, window size, window style and so on. The CreateWindow
parameters are:
| Name of the window class |
| Window title |
| Window style |
| Window position and size |
| Parent-window handle |
| Menu handle |
| Instance handle |
| 32 bits of additional data |
If you following the Microsoft Guide to Programming Windows or other books for
Windows programming, you will use the CW_USEDEFAULT value in the windows.h
header file for window position and size. If the CW_USEDEFAULT value the CreateWindow
parameter for window position and size, Windows places the window at a default
position and gives it a default width and height. The default position and
dimensions depend on the system and on how many other applications have been
startet. For the BB1 it is necessary to place an application window with the
width of 320 dots and the height of 240 dots at position x=0 and y=0 (see also
BB1 GENERIC WINDOWS APPLICATION). With this values for the CreateWindow
position and size parameters you get a "full-screen" application window on the BB1 LCD.
CreateWindow is the most complex function in Mircosoft Windows. It is so
complex because this one function can create a wide range of objects. Within each
family of objects, such as scroll bars and buttons, there are a range of options.
These options give you control over what the object looks like, where the text
goes, if lists are sorted, and so on.
With CreateWindow you can use predefined window classes such as button controls,
checkbox controls, radio button controls, static text controls, edit controls,
scrollbar controls and more (see also BB1 WINDOWS CONTROLS).
The button, checkbox, scroll bar, static text, and edit controls are all called "child window
controls". They are child windows because each is related to the parent window and
will only be shown if the parent is visible.
SSV SOFTWARE SYSTEMS PC/104 Products. BB1 FPPC. File:
P27.HTM, Last Update: 10-Aug-1997
Copyright (c) 1996, 1997 WST. All rights reserved.