home *** CD-ROM | disk | FTP | other *** search
-
- IMPORTANT NOTICE!
-
- Please read and follow these instructions before attempting to use
- TVColorDialog in your applications.
- ******************************************************************
-
- To use TVColorDialog, some minor modifications will be needed in the Turbo
- Vision source code. TVColorDialog will not compile without these changes. If
- you don't have access to the Turbo Vision source code, or don't want to edit
- the source and re-compile, then TVColorDialog isn't for you. The changes
- necessary are rather minor though, and I have never experienced any problems
- with the changes after rebuilding the library. So if your still interested,
- read on.
-
- The only file that needs to be changed is APP.H in the Turbo Vision include
- directory. Follow these simple instructions...
-
- (1) Change to the Turbo Vision include directory. This is usually named
- C:\BORLANDC\TVISION\INCLUDE
-
- (2) Start BC, or your favorite text editor, and load the file APP.H
-
- (3) Move down to line 25. It's a blank line in the TBackground class
- declaration. Just below the line that reads...
-
- virtual TPalette& getPalette() const;
-
- (4) Add the following two inline functions...
-
- inline char setPattern(char newPattern)
- {
- char oldPattern = pattern;
- pattern = newPattern;
- return oldPattern;
- };
-
- inline char getPattern(void)
- {
- return pattern;
- };
-
- These two functions will give your applications "public" access to the
- private member variable "pattern". The pattern character is the character used
- for the background pattern in Turbo Vision applications.
-
-
-
-
- Page 1
-
-
- (5) Now, move down to line 95, into the declaration for TDeskTop. This line
- reads "private:", and causes the following member variable "TBackground
- *background;" to be a "private" member of TDeskTop. Delete line 95. This
- makes "background" a public member of TDeskTop and gives your program
- access to TApplication's background.
-
- (6) Save the file as APP.H
-
- (7) Rebuild TV.LIB...
-
- (A) Change to the Turbo Vision source directory. This is usually named
- C:\BORLANDC\TVISION\SOURCE
- (B) Open the make file named "MAKEFILE."
- (C) Move to line 12, it reads "BCROOT = ..\..", and make sure this path is
- the correct path to your BORLANDC directory. I had to change mine to
- read "BCROOT = E:\BC". Save the file.
- (B) Type "make" and press <ENTER>.
-
- That's all the modifications necessary. After TV.LIB has been rebuilt, you
- can change the desktop's background pattern character by using the setPattern
- function which you added in step 4 above, and get the current pattern character
- with the getPattern function...
-
- Example:
-
- To set the desktop pattern character to ascii 197 ┼
-
- deskTop->background->setPattern(197);
-
-
- To get the current pattern character into a variable
-
- char currentPattern = deskTop->background->getPattern();
-
-
- Page 2
-