CONTI32.LIB is a performant
software meant for easily solving those programming
problems whose solutions in C, C++ and API interface
require advanced programming knowledge or classes and objects which do
not always fit.
The library has gradualy
developed, including a set of functions and global variables which
proved to be useful in fast and performant solving of most of the problems
raised by windows manipulation.
The library was written
in low level C, intimate to WINDOWS (full 32 bits) and
DOS systems in order to provide a high performance
of the executable files which where written in
C or C++.
The resulting programs are "stand alone", so, they
do not need other components to be able to run under other WINDOWS full
32 bits platforms.
The library provides a simple,flexible and
easy to use interface, similar to BASIC,without decreasing the power of
C language and WINDOWS API (Win32) interface.
So, the WINDOWS full 32 bits applications programmers
may focus on their programs, being released by those system problems solved
by CONTI32.LIB.
Using CONTI32.LIB, WINDOWS full 32 bits programming
becomes accessible even to those who do not know WINDOWS API (Win32) or
OWL libraries.
#include "conti.h"
#include "global.h"
// Main function of CONTI-WINDOWS application.
void MyMain (void)// It's existence
is compulsory in main program.
{ // It writes the text in
the default window to
// coordinates: line=15,
column=30 with bright
// white(15) on blue(1).
FastPRINTXY (15, 30, 15, 1, " Hello world ! ");
GetAny (); //
It waits a character from keybord or a mouse click.
FreeWinObj (); // It
releases the WINDOWS memory from CONTI objects.
// Quit the program.
}
// Except MyMain () any CONTI-WINDOWS program
(main module) has to
// contain these two functions: MYBUFFER
() and WinMain ().
void MYBUFFER ( void )
{ }
int WINAPI WinMain (HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszcmdline, int ncmdshow)
{ return WinMainX (hInstance, hPrevInstance, lpszcmdline,ncmdshow);
}
hello.c
conti.lib
cards.rc
cards.rc file is: cards.h file is:
#include <windows.h>
#define IDD_XNAME 1000
#include "cards.h"
#define IDD_XLIST 1001
rcinclude cards.dlg
#define IDD_XSCH 1002
hand CURSOR hand.cur
#define IDD_XOK 1003
hand1 CURSOR hand1.cur
#define IDD_XCANCEL 1004
ceas CURSOR ceas.cur
bec CURSOR bec.cur
lupa CURSOR lupa.cur
semnasc CURSOR semnasc.cur
fata CURSOR fata.cur
fata1 CURSOR fata1.cur
aplicon ICON "test.ico"
cards.dlg file is:
Director DIALOG 95, 30, 130, 120
STYLE WS_POPUP | WS_DLGFRAME
{
CTEXT "Select DIRECTORY NAME", -1, 0, 8, 128, 12
EDITTEXT, IDD_XNAME, 5, 20, 120, 12, ES_AUTOHSCROLL
LISTBOX IDD_XLIST, 5, 46, 70, 70, WS_TABSTOP | WS_VSCROLL
|
LBS_SORT
DEFPUSHBUTTON "Change", IDD_XSCH, 88, 50, 33, 16, WS_GROUP
PUSHBUTTON "Ok", IDD_XOK, 88, 70, 20, 16, WS_GROUP
PUSHBUTTON "Cancel", IDD_XCANCEL, 88, 90, 33, 16, WS_GROUP
}
Files CARDS.RC, CARDS.H represent the minimum of windows resources of cursor, icon and dialog type (HAND.CUR, HAND1.CUR, CEAS.CUR, BEC.CUR, LUPA.CUR, SEMNASC.CUR, FATA.CUR, FATA1.CUR, TEST.ICO, CARDS.DLG) for a proper running of any CONTI - WINDOWS full 32 bits application.
- string variables manipulation, generated as dynamic memory;
- keyboard and mouse control;
- text and image display;
- files and directories manipulation;
- file selection;
- editing;
- menus;
- buttons;
- lists of buttons;
- desktop;
- clipboard;
- set of colours;
- time, mouse and other events and processing control;
- multimedia.
How can I view samples ?
E-mail :
mgavota@altern.org
mgavota@yahoo.com
URL :
http://mgavota.tripod.com
http://www.tbns.net/mgavota
Download file
CONTI.ZIP (only English versions)
from Winsite:
http://www.winsite.com/
search conti16.zip, conti32.zip
Phone:
#(401) 424.67.81
#(401) 423.08.46
C:\BC45\BIN, C:\BC45\LIB, C:\BC45\INCLUDE.
Any project contains the next lines:
* main module's name .C (executable file has the
same name)
* the names of other applications' modules .C (.OBJ,
.LIB), if they exist
* cards.rc
* conti.lib
To compile CONTI-Windows full 32 bits applications you always have to choose the Win32 model.
1. Quick alphabetical reference for CONTI32 library functions.
2. Quick alphabetical reference for CONTI32 global constants
and variables.
3. How to use CONTI32.LIB applications projects.
1. QUICK ALPHABETICAL REFERENCE
FOR CONTI32 LIBRARY FUNCTIONS
void ActivateMouseJob (char *Status)
Activates areas on screen and actionns controled by mouse.See
CONTROL.C.
void ActivatePrintClock (void)
Activates current clock's display. See CONTROL.C,TESTPUSH.C, PUZZLE.C.
void ActivatePush (int NbPush)
Activates a button. See PUSH.C, TESTPUSH.C
void ActivatePushList (int NbList)
Activates a list of buttons. See TESTPUSH.C.
void ActivateTimeJob (void)
Activates time intervals and actions associated to them. See
CONTROL.C.
char * AddStr ( char *dest, char *AddStr )
Concatenates two dynamic character strings. See STRING.C.
void barw(int Col1, int Lin1, int Col2, int Lin2, int Pattern, int
BackColor)
Draws a rectangle (box). See DISP.C.
void BLOAD ( char *BmpFileName )
Loads a bitmap file (.BMP) and displays it in the active window.
See DISP.C.
void BSAVE ( char *BmpFileName )
Saves the image existing in a window, in a bitmap file (.BMP).
char * Cards ( int DirFiles, char *FileSpec, char *ChoiceName )
Launches a selection dialog for files and directories. See TESTPUSH.C,
CONTROL.C, PAINT.C.
int ChangeDir (char *DirName)
Changes the current directory.
void ChooseColo (int InkPap)
Launches a selection dialog for colours. See PAINT.C, PUZZLE.C.
void CLSFOND ( int BackColor )
Fills the window in a chosen background colour. See DISP.C.
void COLOUR ( void )
Launches a selection dialog for setting background and foreground
colours.
void CONTIDSK (char *FileNameDsk)
Runs a desktop file (.dsk). See DESKTOP.C.
void CONTIMEN ( char *FileNameAdr, int ItemLen, int Lin, int Col,
char *Buffer )
Launches a menu. See CREMAC.C, PAINT.C.
void CONTIPUSH (void)
Controls button events. See TESTPUSH.C, PUSH.C.
void CONTIRUT ( char *FileNameAdr, int ItemLen, int Lin, int Col,
char *Buffer )
Edits contents of a character buffer.
void CopyFileToFile ( char *SourceFileName, char *DestFileName)
Copies a source file in a target file. See FILES.C.
void COPYREC ( char *FileName, int FileNb, long RecordFrom, long
NextRecNb, long RecordAfter )
Copies one or more records from a file to another file. See
FILES.C.
char * CreateStr ( char *DefaultContent )
Creates a dynamic character string. See STRING.C.
void DeactivateMouseJob (void)
Deactivares areas and actions controled by mouse. See CONTROL.C.
void DeactivatePrintClock (void)
Deactivates current clock display. See CONTROL.C.
void DeactivatePush (int PushNb)
Deactivates a button previous defined and activated. See PUSH.C,
TESTPUSH.C.
void DeactivatePushList (int ListNb)
Deactivates alist of buttons previous defined and activated.
See TESTPUSH.C.
void DeactivateTimeJob(void)
Deactivates time events (actions). See CONTROL.C.
void DefineMouseJob ( int MouseForm1, int Lin1, int Col1, int LLin1,
int CCol1, char *Job1, int MouseForm2, int Lin2, int Col2, int LLin2, int
CCol2, char *Job2, int MouseForm3, int Lin3, int Col3, int LLin3, int CCol3,
char *Job3, char *Status )
Defines areas on screen and actions controled by mouse. See
CONTROL.C.
void DefinePrintClock ( int Lin1, int Col1, int Ink, int Pap )
Defines system clock display. See CONTROL.C, TESTPUSH.C.
void DefinePush ( int PushNb, int Lin, int Col, int Type, char *PushBuffer
)
Defines a button. See PUSH.C, TESTPUSH.C.
void DefinePushList ( int ListNb, char *FileNameDat, long RecBegin,
int Action, int PushNbBegin, int Lin, int Col, int ItemLen, int NbItems,
int Type, int Move )
Defines a list of buttons. See TESTPUSH.C.
void DefineTimeJob ( int t1, char *Job1, int t2, char *Job2, int
t3, char *Job3 )
Defines time intervals and their associated actions. Vezi CONTROL.C.
void DELETE1 ( int FileNb, int BufferSize, long Record )
Deletes (removes) a record from a file. See FILES.C.
void DelLines ( int Lin1, int Lin2, int Col1, int Col2, NULL, NULL,
int BackColor )
Fills an area in a window in a chosen background color. See
DISP.C, PUZZLE.C.
int DisplayImage ( char *BmpFileName, int Lin1, int Col1, int Lin2,
int Col2, int HPix )
Displays a bitmap file in a rectangle 3D area. See DISP.C, TESTPUSH.C.
void DISPLAYSCREEN ( int NrBuffer, int LinPix, int ColPix, int LinsPix,
int ColsPix )
Displays content of a bitmap image buffer in a specified area
of the
window.
char *Drives ( char *DriveBuffer )
Reads the name of available drives.
void EDIT (char *FileNameAdr, char *FileNameDat, long Record)
Edits a random file. See TESTPUSH.C, CREMAC.C.
void ellipsew ( int Col1, int Lin1, int Col2, int Lin2, int Pattern,
int BackColor )
Draws an ellipse. See DISP.C.
intPASCAL EndDlg (void)
Launches a quiting dialog (Yes / No). See PUZZLE.C, PAINT.C.
void FastPRINTXY ( int Lin, int Col, int ForeTextColor, int BackTextColor,
char *str )
Displays fast a character string. See DISP.C.
int FileExists (char *FileName)
Checks existence of a file. See TESTPUSH.C, CREMAC.C.
long FIND (int FileNb, int BufferSize, char *Str, long RecordBegin)
Searches a character string in a file. See FILES.C.
void FONT ( int type )
Changes the displaing font. See DISP.C.
void FreeWinObj (void)
Releases Windows memory ocupied by CONTI objects. It's a function
launched
in MyMain (...) before it's end. See any example.
void GetAny (void)
Gathers and treats mouse and keyboard Windows events. See GETANY.C,
PUSH.C, PUZZLE.C.
char * GetDir ( char *dir )
Reads the current directory. See TESTPUSH.C.
char * GetDrive ( int *DriveNb, char *DriveName )
Reads name and number of current drive.
int GetMouseCol (void)
Read column position of mouse. See PAINT.C.
int GetMouseLin (void)
Reads line position of mouse. See PAINT.C.
char * GetTXTFromClip ( char *Buffer )
Reads a text from Windows clipboard. See COLORCLP.C.
void INSERT (int FileNb, int BufferSize, int InsNb, long AfterRecord)
Insert a "blank" record in a file. See FILES.C.
int Instr ( char *str, char *StringToSearch )
Searches existence of a character substring in a character string.
See STRING.C.
char * Lcase ( char *str )
Returns a "lower-case" character string.
char * Left ( char *str, size_t NbOfCharacters )
Returns a character substring consisting of the first "n" characters
from a character string. See STRING.C.
void linew ( int Col1, int Lin1, int Col2, int Lin2, int Pattern,
int Color )
Draws a line with a specified color and pattern. See PAINT.C.
void LOADIMAGE ( char *BmpFileName, int Lin, int Col )
Loads a bitmap file and displays it starting from specified
coordinates in the window. See PAINT.C.
char * Ltrim ( char *str )
Removes leading blanks from a character string. See STRING.C.
char * MakeStrCentr ( char *str, int Len )
Centrate a character string in a specified number of characters.
See STRING.C.
char * MakeStrLen (char *str, int Len )
Changes a character string dimension. See STRING.C.
char * Mid ( char *str, size_t Begin, size_t NbOfCharacters )
Extracts characters from a string in a substring. See STRING.C.
void MouseLeft (void)
Tests if the left button of the mouse was pushed. See PUSH.C.
int MouseRight (void)
Tests if the right button of the mouse was pushed. See PUSH.C.
int MsgBoxDN (char *Text)
Launches a "Yes / No" dialog. See DISP.C, TESTPUSH.C.
intL MsgBoxDNOKXY ( int Lin, int Col, int Type, char *Text)
Launches a dialog (displayed at specified coordinates in window)
containing one or two buttons.
void MsgBoxOK ( char *text )
Launches an information dialog ( "OK" dialog). See DISP.C, TESTPUSH.C.
void MsgNotExists ( char *FileName )
Launches an information dialog ("File ... not exists!").
void MYBUFFER (void)
This function have to be placed in main module of any CONTI-Windows
application. By it's help, programmer may control (when running CONTIRUT(...)
or EDIT(...) ) contents of XBUFFER or may set the active window (WinName)
name. See examples before.
int OpenIfMidiExists ( char *MidiFileName )
Opens a MIDI file. See CONTROL.C, PUZZLE.C.
void PlayMidi (void)
Plays a MIDI file.
void PlayMidiControl (void)
Launches an internal control of MIDI file execution. See CONTROL.C,
PUZZLE.C.
void PrintHiPush ( int PushNb )
Displays a selected button.
void PrintLowPush ( int PushNb)
Displays a deactivated button.
void PrintNormalPush ( int PushNb)
Normal displays a button. See PUSH.C, PUZZLE.C.
int PushExists (void)
Checks existence of activated button.
void PutTXTIntoClip (char *text)
Writes a text in Windows clipboard. See COLORCLP.C.
void QREST (int Lin, int Col, int Lins, int Cols, char *NbBuffer)
Restores an area of window image. See DISP.C.
void QSAVE (int Lin, int Col, int Lins, int Cols, char *BufferNb)
Saves an area of window image. See DISP.C.
void RestoreAllPush (void)
Refreshes buttons. See TESTPUSH.C.
void RestorePushList ( int ListNb )
Refreshes a list of buttons. See TESTPUSH.C.
void RESTSCR ( char *BufferNb )
Restores window image from a bitmap file. See DISP.C.
char * Right ( char *str, size_t NbOfCharacters)
Returns a character substring consisting of the last "n" characters
from a character string. See STRING.C.
char * Rtrim ( char *str )
Removes trailing blanks from a character string. See STRING.C.
void RunRes ( char *FileNameRes )
Runs a resource file. See CONTROL.C.
void SAVESCR ( char *BufferNb )
Saves window image in a memory buffer. See DISP.C.
void SAVESCREEN ( int BufferNb, int LinPix, int ColPix, int LinsPix,
int ColsPix )
Saves an area of window image. See DISP.C.
int SetCurentDrive ( int DriveNb )
Changes the current drive.
void StopMidi (void)
Stops execution of a MIDI file.
char * StoreStr ( char *dest, char *source )
Stores a character string in another character string.
char * String ( int Len, char Character )
Generates a specified length character string replicating the
same character. See STRING.C.
char * StripWhiteSpace ( char *str )
Removes all blanks from a character string. See STRING.C.
void SubstStr ( char *dest, int begin, char *str )
Replaces a character substring in a character string. See STRING.C.
char * Trim ( char *str )
Removes leading and training blanks from a character string.
See STRING.C.
char * Ucase ( char *str )
Returns an "upper-case" character string.
void WWAIT (void)
Displays message "Press any key to CONTInue...".
void XBARGRF ( int Lin1, int Col1, int Lin2, int Col2, int Pattern,
int FillColor )
Displays a bar. See DISP.C, PUZZLE.C.
void XBARIMG ( int Lin1, int Col1, int Lin2, int Col2, char *BmpFileName
)
Displays a bar containing a bitmap image. See DISP.C.
void XBARIMGBOX ( int Lin1, int Col1, int Lin2, int Col2, char *BmpFileName
)
Displays a 3D bar containing a bitmap image. See DISP.C, CONTROL.C.
void XBOX ( int Lin1, int Col1, int Lin2, int Col2, int Type )
Displays a 3D bar. See DISP.C, TESTPUSH.C.
void XDELAY ( float delay )
Determines a controled delay. See DISP.C.
char * XGET ( int FileNb, long Record, char *Buffer )
Reads a record from a random file. See FILES.C.
char * XINPUT ( char *StrInput )
Reads a character string from keyboard. See CREMAC.C, PAINT.C,
PUZZLE.C.
int XOPEN ( char *FileName, int BufferSize )
Oppens a random file. See FILES.C, PUZZLE.C.
void XPUT ( int FileNb, long Record, char *Buffer )
Writes a record in a random file. See FILES.C.
void XSOUND ( int frecv, float time )
Determines a "beep" sound in speacker. See PUZZLE.C.
2. QUICK ALPHABETICAL REFERENCE
FOR CONTI32 GLOBAL CONSTANTS AND VARIABLES
char *BUFF
Contains characters for the selected menu item.
char *ContiMsg
Message file's name for CONTIRUT (...), CONTIMEN (...) and EDIT
(...).
LISTPUSHMAX (it'a a constant)
Maximum number alocated for lists of buttons. (Default=3).
struct ListPush[LISTPUSHMAX]
Array of structures for lists of buttons.
struct MouseJob
Structure used to control mouse actions.
int OkTimpScurs
Command switch used to measure passed time.
char *PushBuffer[PUSHMAX]
Array containing texts displayed in buttons.
int PushCol[PUSHMAX], PushLin[PUSHMAX]
Array containing text coordinates (column-PushCol and line-PushLin)
for each button.
int PushInkNorm, PushPapNorm
Color of ink (PushInkNorm) and paper (PushPapNorm) for normal
buttons. (default PushInkNorm=0, PushPapNorm=7).
int PushInkHi, PushPapHi
Color of ink (PushInkHi) and paper (PushPapHi) for selected
buttons. (default PushInkHi=4, PushPapHi=7).
int PushInk1, PushPap1
Color of ink (PushInk1) and paper (PushPap1) for "highlighted"
letters of buttons (default PushInk1=4, PushPap1=7).
char *PushMsg
Message file's name for buttons.
int PushShadow
Buttons' height measured in Pixels (default=5).
int PushStatus[PUSHMAX]
Buttons' status array.
char *PushRun[PUSHMAX]
Buttons' actions automate run array.
PUSHMAX (it's a constant)
Maximum number of buttons. (Default=70).
struct PrintClock
Structure which defines current clock's display.
struct TimeJob
Structure to control actions by time.
struct time tscurs
"Time" structure to control time passed.
int XBUFF
Number of characters of XBUFFER system buffer.
char *XBUFFER
Contains system buffer CONTIRUT (...) is working with.
int XECART
Distance between items for a menu's items or, for a "pop-up"
form's items (which doesn't use an address file (.adr)). (Default=3).
int XEDT
Switch to point out editing in CONTIRUT (...).
char *XEXPR
Buffer which contains the proposed answer to XINPUT (...).
int XLITEM
Number of characters of current item of CONTIRUT (...) or CONTIMEN
(...).
int XLastList
Number of the last accessed list of buttons.
int XL, XC, XLMAX, XCMAX
Current line and column. Maximum of text line and column.
int XL0, XC0
The starting line (XL0) and column (XC0) for a menu or for a
"pop-up" form, without an address file attached to.
int XF
Number associated to functional key or any combinations of pressed
keys.
HWND XHWND
Current window's handler.
int XMIDI
Switch to point out validity of MIDI interface.
int XMIDILOOP
Sets the way of playing (continously or not) for MIDI file.
char *XMidiName
Name of MIDI file to be playing.
int XMOUSE
Switch to point out existence of mouse.
int XJJ
Number of the item selected and launched within a menu.
int XJJSTART
Number of the starting item for CONTIRUT(...) or CONTIMEN (...).
(default=1).
int XINKNORM, XPAPNORM
Colors of ink (XINKNORM) and paper (XPAPNORM) for displaying
text in normal way by CONTIRUT (...) or CONTIMEN (...). (Default XINKNORM=1,
XPAPNORM=7).
int XINKHI, XPAPHI
Colors of ink (XINKHI) and paper (XPAPHI) for displaying with
selected text CONTIRUT (...) or CONTIMEN (...). (Default XINKHI=15, XPAPHI=4).
int XINK1, XPAP1
Colors of ink (XINK1) and paper (XPAP1) for "highlighted" letter
of menu items. Default XINK1=4, XPAP1=7).
char *XP
XP[0] = the most recent key pressed ( received by GetAny ( )
).
int XPIXO, XPIXV
Window's horizontal and vertical number of pixels.
COLORREF XRGBINK, XRGBPAP
RGB colors for ink and (XRGBINK) and paper (XRGBPAP).
int XPUSH
Selected button's number.
int XPUSHSTART
Starting button's number. (Default=1).
int XVER
Windows version's number.
char *WinName
Sets current window's name.
long YNREC
Contains number of the most recent record accessed by EDIT (...).