home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
DBDEMO.ZIP
/
DEMOFLS.ZIP
/
DBDEMO.H
< prev
next >
Wrap
Text File
|
1991-07-03
|
4KB
|
123 lines
/************************************************************************/
/* DATABASE PERFORMANCE CONCEPTS AND TECHNIQUE DEMONSTRATION PROGRAM */
/* HEADER FILE */
/* SOURCE - DBDEMO.H */
/* This file contains variable and function declarations used by */
/* the PM driver program */
/************************************************************************/
/* KNB Version 2.00 */
#define INCL_PM
#include <os2.h>
#include "DBDEMO.rch"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define WM_FAILEDVALIDATE (WM_USER+0)
/* Variables to support example code */
EXTERN ULONG hittest;
EXTERN BOOL tf;
EXTERN HWND hAWnd;
EXTERN HWND hPtr;
EXTERN HWND hMenu;
EXTERN POINTL point;
EXTERN PSWP swp;
EXTERN PQMSG pQmsg;
EXTERN USHORT keycode;
EXTERN USHORT charcode;
EXTERN USHORT ControlID;
EXTERN USHORT HelpCmd;
EXTERN USHORT CmdSource;
EXTERN USHORT SysCmd;
EXTERN USHORT FirstValue;
EXTERN USHORT LastValue;
EXTERN SHORT MenuID;
EXTERN SHORT previous_width;
EXTERN SHORT previous_height;
EXTERN SHORT current_width;
EXTERN SHORT current_height;
#define ID_LOGO_TIMER 10
/* these structures are used to add the program name to the task list */
EXTERN HSWITCH hSwitch;
EXTERN SWCNTRL Swctl;
EXTERN HELPINIT hiDBDEMOHelp; /* Help initialization structure */
EXTERN HWND hWndDBDEMOHelp; /* Handle to Help window */
EXTERN CHAR szAppName[20]; /* class name of application */
EXTERN HAB hAB; /* Handle to the Anchor Block */
EXTERN HMQ hMQ; /* Handle to the Message Queue */
EXTERN HWND hWndFrame; /* Handle to the Window Frame */
EXTERN HWND hWndClient; /* Handle to the Client Window */
EXTERN HWND hWndDDOCMENU;
EXTERN HWND hWndSHOWTIME;
EXTERN HWND hWndEDITBOX;
EXTERN HWND hWndMMENU;
EXTERN HWND hWndDOCRDS;
EXTERN HWND hWndDOCPARMS;
typedef struct
{
int num_of_iterations;
char stime_time1[51];
char stime_time2[51];
char stime_htxt1[51];
char stime_htxt2[51];
char stime_htxt3[51];
char stime_dname1[16];
char stime_dname2[16];
} SHOWTIMEStruct;
#define OFFSET_SHOWTIME 0
typedef struct
{
char ebox_heading1[101];
} EDITBOXStruct;
char temp_ebox_heading[101];
PSZ pszDisplayTxt; /* variable to hold text files displayed on edit box */
CHAR szMessage[200] = ""; /* To hold ERROR Message */
#define OFFSET_EDITBOX 1*sizeof(char FAR *)
/* Function prototypes */
INT cwCenter(HWND, HWND);
INT cwSetInitDlgStatus(HWND);
INT cwFreeDlgMemory(HWND);
void lmemset(void FAR *, CHAR, INT);
PSZ longstrcpy(PSZ, PSZ);
INT cwRegisterClass(VOID);
HWND cwCreateWindow(HWND, ULONG, PCH, PCH, USHORT, INT, INT, INT, INT, PHWND, ULONG, USHORT);
/* pointer for subclassing edit controls */
EXTERN PFNWP pfnEditWndProc;
/* define and prototypes for numeric validation of edit controls */
INT cwNumericValidate(char *);
MRESULT EXPENTRY UDNumericWndProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY WndProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY INITMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY DDOCMENUMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY SHOWTIMEMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY EDITBOXMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY MMENUMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY DOCRDSMsgProc(HWND, USHORT, MPARAM, MPARAM);
MRESULT EXPENTRY DOCPARMSMsgProc(HWND, USHORT, MPARAM, MPARAM);
//*
//* // my prototypes
//*
INT SetDlgText(unsigned char *);
BOOL PMErrChk(HAB, HWND, PSZ);