home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / DBDEMO.ZIP / DEMOFLS.ZIP / DBDEMO.H < prev    next >
Text File  |  1991-07-03  |  4KB  |  123 lines

  1. /************************************************************************/
  2. /* DATABASE PERFORMANCE CONCEPTS AND TECHNIQUE DEMONSTRATION PROGRAM    */
  3. /* HEADER FILE                                                          */
  4. /* SOURCE - DBDEMO.H                                                    */
  5. /*  This file contains variable and function declarations used  by      */
  6. /*  the PM driver program                                               */
  7. /************************************************************************/
  8. /* KNB Version 2.00 */
  9. #define INCL_PM
  10. #include <os2.h>
  11. #include "DBDEMO.rch"
  12.  
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include <string.h>
  16. #include <ctype.h>
  17. #define WM_FAILEDVALIDATE (WM_USER+0)
  18.  
  19. /* Variables to support example code                                       */
  20. EXTERN ULONG hittest;
  21. EXTERN BOOL  tf;
  22.  
  23. EXTERN HWND hAWnd;
  24. EXTERN HWND hPtr;
  25. EXTERN HWND hMenu;
  26.  
  27. EXTERN POINTL point;
  28. EXTERN PSWP   swp;
  29. EXTERN PQMSG  pQmsg;
  30.  
  31. EXTERN USHORT keycode;
  32. EXTERN USHORT charcode;
  33. EXTERN USHORT ControlID;
  34. EXTERN USHORT HelpCmd;
  35. EXTERN USHORT CmdSource;
  36. EXTERN USHORT SysCmd;
  37. EXTERN USHORT FirstValue;
  38. EXTERN USHORT LastValue;
  39.  
  40. EXTERN SHORT  MenuID;
  41. EXTERN SHORT  previous_width;
  42. EXTERN SHORT  previous_height;
  43. EXTERN SHORT  current_width;
  44. EXTERN SHORT  current_height;
  45.  
  46. #define ID_LOGO_TIMER                            10
  47.  
  48. /* these structures are used to add the program name to the task list      */
  49. EXTERN HSWITCH hSwitch;
  50. EXTERN SWCNTRL Swctl;
  51.  
  52. EXTERN HELPINIT hiDBDEMOHelp;     /* Help initialization structure         */
  53. EXTERN HWND     hWndDBDEMOHelp;   /* Handle to Help window                 */
  54.  
  55. EXTERN CHAR szAppName[20]; /* class name of application                    */
  56.  
  57.  
  58. EXTERN HAB  hAB;         /* Handle to the Anchor Block                     */
  59. EXTERN HMQ  hMQ;         /* Handle to the Message Queue                    */
  60. EXTERN HWND hWndFrame;   /* Handle to the Window Frame                     */
  61. EXTERN HWND hWndClient;  /* Handle to the Client Window                    */
  62. EXTERN HWND hWndDDOCMENU;
  63. EXTERN HWND hWndSHOWTIME;
  64. EXTERN HWND hWndEDITBOX;
  65. EXTERN HWND hWndMMENU;
  66. EXTERN HWND hWndDOCRDS;
  67. EXTERN HWND hWndDOCPARMS;
  68.  
  69.  
  70. typedef struct
  71.          {
  72.           int    num_of_iterations;
  73.           char   stime_time1[51];
  74.           char   stime_time2[51];
  75.           char   stime_htxt1[51];
  76.           char   stime_htxt2[51];
  77.           char   stime_htxt3[51];
  78.           char   stime_dname1[16];
  79.           char   stime_dname2[16];
  80.          } SHOWTIMEStruct;
  81.  
  82. #define OFFSET_SHOWTIME 0
  83.  
  84. typedef struct
  85.          {
  86.           char   ebox_heading1[101];
  87.          } EDITBOXStruct;
  88. char temp_ebox_heading[101];
  89. PSZ pszDisplayTxt;  /* variable to hold text files displayed on edit box */
  90. CHAR  szMessage[200] = "";   /* To hold ERROR Message       */
  91.  
  92. #define OFFSET_EDITBOX 1*sizeof(char FAR *)
  93.  
  94. /* Function prototypes                                                     */
  95. INT cwCenter(HWND, HWND);
  96. INT cwSetInitDlgStatus(HWND);
  97. INT cwFreeDlgMemory(HWND);
  98. void lmemset(void FAR *, CHAR, INT);
  99. PSZ longstrcpy(PSZ, PSZ);
  100. INT cwRegisterClass(VOID);
  101. HWND cwCreateWindow(HWND, ULONG, PCH, PCH, USHORT, INT, INT, INT, INT, PHWND, ULONG, USHORT);
  102.  
  103. /* pointer for subclassing edit controls                                   */
  104. EXTERN PFNWP pfnEditWndProc;
  105.  
  106. /* define and prototypes for numeric validation of edit controls           */
  107. INT cwNumericValidate(char *);
  108. MRESULT EXPENTRY UDNumericWndProc(HWND, USHORT, MPARAM, MPARAM);
  109.  
  110. MRESULT EXPENTRY WndProc(HWND, USHORT, MPARAM, MPARAM);
  111. MRESULT EXPENTRY INITMsgProc(HWND, USHORT, MPARAM, MPARAM);
  112. MRESULT EXPENTRY DDOCMENUMsgProc(HWND, USHORT, MPARAM, MPARAM);
  113. MRESULT EXPENTRY SHOWTIMEMsgProc(HWND, USHORT, MPARAM, MPARAM);
  114. MRESULT EXPENTRY EDITBOXMsgProc(HWND, USHORT, MPARAM, MPARAM);
  115. MRESULT EXPENTRY MMENUMsgProc(HWND, USHORT, MPARAM, MPARAM);
  116. MRESULT EXPENTRY DOCRDSMsgProc(HWND, USHORT, MPARAM, MPARAM);
  117. MRESULT EXPENTRY DOCPARMSMsgProc(HWND, USHORT, MPARAM, MPARAM);
  118. //*
  119. //* // my prototypes
  120. //*
  121. INT SetDlgText(unsigned char *);
  122. BOOL PMErrChk(HAB, HWND, PSZ);
  123.