home *** CD-ROM | disk | FTP | other *** search
- Win++ Version 2.00 README.DOC
-
-
- Win++
-
- Version 2.00
- April 25, 1991
-
-
- This document provides information on the installation and use of Win++. Use
- it as a supplement to the manual. Please read the introduction and "Using
- Win++" in the manual. Then read this file for information specific to your C
- compiler and to this version of Win++.
-
- Copyright (C) Blaise Computing Inc. 1991. All rights reserved.
-
- The PACKING.LST file lists the files supplied and the diskettes where they
- reside.
-
- (You can find your Win++ version number as the three digits following the
- decimal point in your serial number. The serial number is printed on the
- diskette labels.)
-
-
- OUTLINE OF THIS FILE
-
- Installation
- DLL Support Awaits New Linker
- Compiler Versions and Memory Models Supported
- Manual Changes
- BCFile Instead of Streams
- Warnings and Usage Notes
- Troubleshooting
- Bulletin Board
- Rebuilding the Libraries
- Construction Notes (Including .PRJ Files)
- Automatic Update Program
-
-
- INSTALLATION
-
- The installation procedure conforms to the first two chapters in the manual:
- "Quick Start" and "Using Win++", except that the MANINST.BAT file now supports
- three additional categories of files: BAT, DOC, and UTL. Please read these
- chapters for installation instructions. For further details about using the
- AUTOINST.BAT and MANINST.BAT batch files, read the comments in the batch
- files.
-
- Here are the approximate space requirements of each category of Win++ files
- after expansion. The sizes are listed in units of 1K (1024 bytes).
-
- Category Description Size
- -------- -------------------------------- ------
- BAT DOS batch files (.BAT) 8K
- DLL Dynamic-link libraries (.DLL) 400K
- DOC Documentation files 45K
- EXP Example programs 700K
- INC Header (include) files 250K
- LIB Static-link and import libraries 1,410K
- SRC Library source code 650K
- UTL Utility programs 43K
- ------
- Total 3,506K
-
-
- DLL SUPPORT AWAITS NEW LINKER
-
- At the time of this release, the Borland linkers TLINK.EXE and TLINKX.EXE are
- unable to reliably link programs with the Win++ import libraries.
- Consequently it is temporarily impossible to build programs that use the Win++
- dynamic-link libraries (DLLs).
-
- We expect that Borland International will quickly rectify this problem.
- Contact Blaise Computing for the latest advice. If you register your purchase
- with Blaise Computing, we will notify you when a solution is available.
-
-
- COMPILER VERSIONS AND MEMORY MODELS SUPPORTED
-
- This version of Win++ supports Borland C++ version 2.0. For information about
- later versions of Borland C++, check the bulletins enclosed with Win++ or
- contact Blaise Computing.
-
- The only supported memory models are M (medium) and L (large). In the M
- model, you can use only the static-link libraries (that is, the DLL is not
- supported.) In the L model, your application can use either the static-link
- libraries or the dynamic-link libraries (DLLs). (As usual, when building a
- program for use with a DLL, you must link it with an import library that
- corresponds with the DLL.)
-
- The memory-model-specific files are listed on page 17 of the manual.
-
-
- MANUAL CHANGES
-
- Page 18 --In Table 2.3, the directory \wpp\demo\hellodd should be
- \wpp\demo\hellodll.
-
- Page 19 --In Table 2.4, add the following additional categories that are
- supported by MANINST.BAT:
-
- BAT DOS batch files (.BAT)
- DOC Documentation files
- UTL Utility programs
-
- Page 25 -- No project (.PRJ) file is supplied for the HELLODLL example
- program.
-
- Page 26 -- Corrections and additional notes:
-
- - For information about the options specified in the supplied .PRJ files,
- read "Construction Notes" later in this file.
-
- - If you alter a resource (such as .ICO, .BMP, .CUR, or .DLG), remember to
- use the Compile|Build All command in order to force the resource file to
- be recompiled.
-
- - If you are linking with the static-link libraries, then (as the manual
- states) you must define the BC_WPP_LIB symbol in every .CPP file that
- includes the Win++ header files. (The symbol can be defined to be the
- empty string, but must nevertheless be defined.) One simple way to do
- so is via the Options|Compiler|Code Generation|Defines input box.
-
- - You need not define the LDATA symbol (contrary to what the manual
- states).
-
- - The Project Manager does not appear to have a way to specify the /T
- option on the second pass of the RC program (that is, when binding the
- .RES file to the .EXE file).
-
- Page 39 -- The LDATA symbol is no longer defined nor used. The /s option has
- been removed from the definition of LOPTS. Five filenames used in
- definitions are misprinted. Here are the correct definitions (note the
- backslashes):
-
- WLIBDIR=c:\wpp\lib
-
- D_WPP_LIB1=$(WLIBDIR)\$(WPP_LIB1).lib
- D_WPP_LIB2=$(WLIBDIR)\$(WPP_LIB2).lib
-
- D_WPP_IMP1=$(WLIBDIR)\$(WPP_IMP1).lib
- D_WPP_IMP2=$(WLIBDIR)\$(WPP_IMP2).lib
-
- Page 51 -- The following symbols used in the code fragments are misspelled:
-
- ICON_QUESTION should be BC_ICON_QUESTION
- OK_ONLY should be BC_OK_ONLY
- YES_NO should be BC_YES_NO
- YES_REPLY should be BC_YES_REPLY
-
- Page 86 -- The version number is established by the symbol BC_VERSION_NUMBER,
- which is defined in TYPE.H. Its initial value is 200, which represents
- version 2.00.
-
- Page 424 -- Insert the following support function:
-
- WORD BCGetVersionNumber(VOID);
-
- BCGetVersionNumber returns the version number of the Win++ library. In
- the case of a program using the Win++ DLLs, it returns the version
- number of DLL number 1. The version number is discussed further on page
- 86.
-
- Page 434 -- Three additional internal header files were omitted from the list:
- DBLLNKND.H, LISTNODE.H, and SNGLNKND.H. These files declare the internal
- classes BCDoubleLinkNode, BCListNode, and BCSingleLinkNode, respectively,
- which are noted briefly on page 452.
-
- Page 437 -- Here are corrected table entries, including one new entry. In
- each of these the spelling of the class name is corrected. Delete the
- entry for BC_WIN_HASH_LIST (value 93).
-
- Symbol Value Class Name
- -------------------- ----- ------------------
- BC_RESID 7 BCResID
- BC_DISP_OBJ 9 BCDispObject
- BC_SYSMENU 18 BCSystemMenu
- BC_MULTISTRING_EDIT 39 BCMultiStringEdit
- BC_SAVEAS_DIALOG 62 BCSaveAsDialog
- BC_FILE_OBJ 84 BCFile <-- New class
- BC_LIST_OBJ 85 BCList
- BC_SLNK_LIST 87 BCSingleLinkedList
- BC_DLNK_LIST 88 BCDoubleLinkedList
- BC_WIN_LIST 92 BCWindowList
- BC_MDI_FRAME_WINDOW 108 BCMDIFrameWindow
- BC_MDI_CLIENT_WINDOW 109 BCMDIClientWindow
- BC_MDI_CHILD_WINDOW 110 BCMDIChildWindow
-
- Page 444 -- Additional symbol for a dialog box control:
-
- #define IDC_DIRS_LIST 2006
-
- Page 447 -- Two internal functions are missing from the list: BCDLLInit and
- BCLocalInit.
-
- Page 450 -- The BCSetFileLen function is present but does nothing.
-
- Page 455 -- Clarification of TMR: By means of menu choices, you can configure
- the first timer (called the "tester") to operate either as a stand-alone
- timer (receiving timer events directly) or as a window timer (directing its
- timer events to a window, in this case the application's main window). The
- second timer object (called the "counter") is a window timer as stated in
- the manual.
-
-
- BCFILE INSTEAD OF STREAMS
-
- This release of Win++ differs from the manual in an aspect of internal design:
- support for I/O streams has been disabled. Instead, file input and output is
- implemented via a new class called BCFile. BCFile performs file I/O via the
- standard I/O functions such as fopen(). Read the BCFILE.DOC file for full
- documentation about BCFile.
-
- The Load and Save member functions (inherited from BCObject) are available in
- versions that use BCFile instead of streams. Usage is unchanged from the
- manual. Here are the prototypes for BCObject::Load and BCObject::Save:
-
- virtual BOOL Load(BCFile *opFile);
- virtual BOOL Save(BCFile *opFile);
-
- For an example of writing custom Load and Save member functions (using both
- BCFile and streams), see the ADRS example program.
-
- It is to be hoped that future versions of Borland C++ will enable full and
- reliable support of streams in Windows applications. At such time as they may
- do so, here is how you can reenable the stream support in Win++:
-
- 1) Recompile the Win++ libraries and DLLs using the usual makefile (see
- "Rebuilding the Libraries" below). Specify -DUSE_STREAMS on the MAKE
- program command line.
- 2) Change your application program makefiles and project (.PRJ) files to
- define the preprocessor symbol BC_USE_STREAM to be 1.
-
-
- WARNINGS AND USAGE NOTES
-
- PROTECTED-MODE COMPILER AND LINKER REQUIRED -- Because of the large number of
- classes and member functions provided, Win++ applications almost always
- exceed the capacity of the real-mode Borland compilers and linker: BC,
- BCC, and TLINK. Therefore you should use the protected-mode versions:
- BCX, BCCX, and TLINKX.
-
- INCLUDING WINDOWS.H -- There are some minor incompatibilities between Win++
- and Borland's WINDOWS.H file. To resolve these incompatibilities, use the
- WPPHOST.H file described on page 433.
-
- CONSERVING COMPILER SYMBOL SPACE -- If you use WPP.H and if the compiler runs
- out of symbol space, you can conserve some space by defining one of the
- following symbols before including WPP.H. Each symbol prevents the
- inclusion of certain groups of Win++ header files.
-
- #define BC_NO_CONTROLS
- #define BC_NO_DATA_OBJECTS
- #define BC_NO_DIALOGS
- #define BC_NO_LISTS
- #define BC_NO_MDI
- #define BC_NO_OBJECT_GRAPHICS
-
- KEYSTROKE EVENTS -- When writing member functions KeyDown, CharKey, and KeyUp
- for a class derived from BCWindow or descendant, be sure to call the
- DefaultEvent member function. This will ensure that accelerator keys are
- handled.
-
- If the window is active but doesn't have the input focus (for instance, if
- the Activation member function doesn't call SetFocus), then all keystrokes
- are system key events and BCEvent::IsSystemKey will return TRUE.
-
- PREMATURE TERMINATION -- BCApplication::ShutDown is called by the internal
- function BCApplication::Run after the message loop exits. Therefore if
- your program terminates abnormally so that the message loop does not exit,
- then ShutDown will not be called.
-
- ADVANCED MAKEFILE -- The WPP.MAK file provides more features and capacity than
- the WPPEXP.MAK file that builds the example programs. For instructions on
- using WPP.MAK to build your programs, read the comments in the WPP.MAK
- file.
-
- AVOIDING PROJECT MANAGER SEARCHES IN BCX -- Sometimes BCX can halt when the
- Project Manager is checking whether an object file is up to date or
- requires recompilation. You can prevent this check by deleting the .OBJ
- file, by invoking the Compile|Build All command (which forces
- recompilation), and by avoiding the Compile|Make EXE File and Run|Run
- commands (which check all dependencies).
-
- CHILD WINDOW CONTROLS IN MDI CHILD WINDOWS -- When creating a control as a
- child window of a BCMDIChildWindow, create the control after the Create
- member function returns. That is, don't create the control inside
- BCMDIChildWindow::Initialize. (If you want the controls to be created
- before the BCMDIChildWindow is displayed, then use the SetStyle member
- function to clear the BC_STYLE_VISIBLE bit. This prevents the Create
- member function from displaying the BCMDIChildWindow.)
-
- MENU EVENTS IN MDI CHILD WINDOWS -- When a menu event occurs, a BCEvent object
- is passed to a MenuCommand member function. Normally you can obtain the
- BCMenu object for the corresponding menu by calling BCEvent::GetMenu.
- However, in a BCMDIChildWindow the resulting BCMenu object is the MDI child
- window's own menu -- even if the menu event really resulted from the MDI
- child window's system menu. If you need to distinguish which menu caused
- the event, then specify the menu item ID codes differently for the child
- window's own menu and its system menu.
-
-
- TROUBLESHOOTING
-
- Please also read Appendix A in the manual. Here are some additional symptoms
- and explanations to consider when diagnosing problems:
-
- Compilation warnings in library or example programs.
- You should expect to see the warnings that we have listed in the
- WARNINGS.DOC file. If you get any other warnings or error messages,
- investigate further.
-
- BCX halts while checking dependencies.
- Try deleting your .OBJ files or use the Compile|Build All command so that
- recompilation takes place unconditionally. Or try disabling the
- Options|Make|Check auto-dependencies option.
-
- Compiler error: Cannot have a near member in a huge class.
- This can occur in medium model if you forget to define the BC_WPP_LIB
- symbol. You must always define the BC_WPP_LIB symbol (even if the
- definition is empty) in medium model, because in medium model Win++
- supports only static-link libraries (WPP_LBM?.LIB).
-
- Linker error: Undefined symbol.
- In addition to what is discussed on page 416 of the manual, here is an
- additional possibility:
-
- If you are linking modules compiled in C mode with modules compiled in C++
- mode, then perhaps the C++ name mangling is making the external names of
- the C functions unrecognizable. When declaring C functions for use in C++
- code, declare them like this in every source file that references them
- (better still, put the declaration in a header file). This style of
- declaration works correctly in both the C and C++ languages.
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern int my_c_function(void); /* Example declaration. */
- extern int another_c_function(int); /* Another example. */
-
- #ifdef __cplusplus
- }
- #endif
-
- Runtime message: Control does not exist.
- This can occur if there is an error (such as an incorrect ID number) in the
- dialog specification in the .RC file.
-
- Unexplained crash.
- In addition to the suggestions on page 418, try the following: If your
- program is compiled for use with the Win++ DLLs, then try recompiling it
- for use with the static-link libraries. If your program is linked with the
- Win++ static-link libraries, then try recompiling it for use with the DLLs.
- (Either change requires recompiling all of your source files.)
-
-
- REBUILDING THE LIBRARIES
-
- To rebuild the Win++ static-link, dynamic-link, and import libraries, follow
- the instructions listed in the MAKEFILE that is included among the source
- files.
-
-
- BULLETIN BOARD
-
- One way to communicate with Blaise Computing is by telephoning our computer
- bulletin board system (BBS). This simple interactive system provides a forum
- for exchanging messages and files with the Blaise technical staff and other
- users of Blaise products. The BBS also provides the latest bulletins about
- Blaise products.
-
- To access the BBS, use an ordinary modem and dial (415) 540-0760 in the United
- States. The BBS supports speeds of 300, 1,200, and 2,400 bits per second
- (bps). Use eight data bits, no parity bit, and one stop bit. The BBS is
- usually available 24 hours per day, every day of the year.
-
- The messages and menus that greet you are self-explanatory. No password is
- required to sign on initially, but you must invent your own password for use
- when signing on again.
-
-
- CONSTRUCTION NOTES
-
- The libraries were built using the MAKEFILE that is supplied among the source
- files, using each of the following command lines:
- make -B [Large model DLLs]
- make -DMAKE_DLL=0 -B [Large model static-link libraries]
- make -DMAKE_DLL=0 -DMAKE_LARGE=0 -B [Medium model static-link libraries]
-
- The .C and .CPP source files in the libraries were compiled using version 2.0
- of BCCX and the following command-line options:
-
- -c Compile only.
- -m Memory model.
- -O Jump optimization.
- -V Smart virtual tables.
- -w All warnings enabled.
-
-
- Files in the static-link libraries were compiled with the following additional
- options:
-
- -DBC_WPP_LIB Defined symbol.
- -W Windows executable, all functions exportable.
-
-
- Files in the DLLs were compiled with the following additional options:
-
- -DBC_WPP_DLL Defined symbol.
- -WDE Windows DLL, only explicit functions exportable.
-
-
- The assembly-language file was assembled using TASM version 2.5. The DLLs
- were linked with TLINKX version 4.0; their resources were compiled using
- version 3.00 of RC, the Microsoft Resource Compiler. The import libraries
- were built with Turbo ImpLib version 1.0 and TLIB version 3.01. The
- static-link libraries were built with TLIB version 3.01.
-
- Two of the example programs, FIRST and MDIEDIT, are supplied in executable
- form. Each of these was compiled with BCCX version 2.0 using the respective
- makefile's default options:
-
- -c Do not combine link with compile step.
- -DBC_WPP_LIB Defined symbol.
- -I Include file directories.
- -mm Medium memory model.
- -H Precompiled headers.
- -O Jump optimization.
- -V Smart virtual tables.
- -w All warnings enabled.
- -W Windows executable, all functions exportable.
-
- and linked with TLINKX version 4.0, using the following options:
-
- /c Case-sensitive link.
- /C Case-sensitive exports.
- /L Library and object file directories.
- /Tw Windows executable.
-
- The programs' resources were compiled using version 3.00 of RC.
-
- Each of the example programs (except HELLODLL) is supplied with a project
- (.PRJ) file to rebuild the program under the Borland Programmer's Platform
- (also called the Integrated Development Environment or IDE). These .PRJ files
- are configured to build medium-model programs using the static-link libraries
- WPP_LBM?.LIB. The .PRJ files specify the following options in addition to the
- compiler's factory defaults:
-
- Windows executable, all functions exportable.
- Medium memory model.
- Smart virtual tables.
- Far virtual tables disabled.
- Make: Check auto-dependencies.
- Jump optimization enabled.
- Precompiled headers disabled.
- Preprocessor symbol defined: BC_WPP_LIB
-
-
- AUTOMATIC UPDATE PROGRAM
-
- Win++ is eligible for coverage under the Blaise Computing Automatic Update
- Program (AUP). The AUP guarantees that you will be sent the most recent
- version of the covered product(s), as well as entitling you to discounts on
- the purchase of other Blaise Computing products. For more details, please
- consult the enclosed flyer or contact Blaise Computing.
-
-
- (For a list of supplied files and the diskettes where they reside, see the
- PACKING.LST file.)
-
- === End of README.DOC ===
-