home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / repease / demo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-07  |  3.7 KB  |  97 lines

  1. #define IDM_EDITOR      101
  2. #define IDM_EXECUTER    102
  3. #define IDM_OPTIONS     103
  4. #define IDM_EXIT        104
  5.  
  6. #define IDC_X           500
  7. #define IDC_Y           501
  8. #define IDC_WIDTH       502
  9. #define IDC_HEIGHT      503
  10. #define IDC_STATUS_LINE 505
  11. #define IDC_MENU        506
  12. #define IDC_VER_BAR     507
  13. #define IDC_HOR_BAR     508
  14. #define IDC_FILE_BOX    509
  15.  
  16.  
  17.  
  18. /*****************************************************************************
  19.     Prototypes
  20. ******************************************************************************/
  21. BOOL    FAR PASCAL _export DemoForms(HWND,unsigned,WPARAM,LPARAM);
  22. BOOL    FAR PASCAL _export DemoOptions(HWND,unsigned,WPARAM,LPARAM);
  23. BOOL    InitApplication(HANDLE);
  24. BOOL    InitInstance(HANDLE,int);
  25. BOOL    GetNumVal(HWND,int,int *);
  26. int     Bitmap2DIB(void);
  27. int     CallEditor(void);
  28. int     ExtractField(char *,int *,int,char *);
  29. int     FAR PASCAL _export DemoFileField(HWND,unsigned,WPARAM,LPARAM);
  30. int     GetFormFiles(char *);
  31. int     GetFormSelection(char *,int);
  32. int     PASCAL WinMain(HANDLE,HANDLE,LPSTR,int);
  33. int     PrepareFile(void);
  34. int     PrintRecords(struct StrField huge *,int);
  35. int     ReadFields(int);
  36. int     RunReport(void);
  37. int     FAR PASCAL _export UserFieldSelection(HWND,struct StrField huge *,int);
  38. int     FAR PASCAL _export VerifyField(struct StrField huge *,int);
  39. int     FAR PASCAL _export DrawPicture(HDC,int,int,int,RECT far *);
  40. long    FAR PASCAL _export DemoWndProc(HWND,UINT,WPARAM,LPARAM);
  41. void    StringTrim(LPSTR);
  42. void    RightTrim(LPSTR);
  43. void    LeftTrim(LPSTR);
  44. int     OurPrintf(LPSTR,...);
  45.  
  46. /*****************************************************************************
  47.     Constants used in the demo program.
  48. ******************************************************************************/
  49. #define TRUE        1
  50. #define FALSE       0
  51.  
  52. #define MAX_FORMS   100
  53. #define MAX_FILES   2
  54. #define MAX_FIELDS  15
  55.  
  56. #define ITEM_WIDTH  40
  57.  
  58.  
  59. /******************************************************************************
  60.                       Global Variables for the Demo program
  61. ******************************************************************************/
  62. HANDLE hInst,hPrevInst;             // Stores the current and previous instances 
  63.  
  64. HWND  hDemoWin;                     // demo program window 
  65.  
  66. struct StrForm FormParm;            // parameter structure used to call form routine 
  67.                                     // see FORM.H file 
  68. struct StrRep  RepParm;             // parameter structure used to call the RepInit routine 
  69.  
  70. char FormName[MAX_FORMS+2][NAME_WIDTH+2]; // list of avialable form names 
  71. char FormFile[MAX_FORMS+2][13];     // list of avialable form files 
  72. int  TotalForms,NewReport;
  73.  
  74.  
  75. BOOL  GetSortField;
  76.  
  77. struct StrDataFile {                // data file definitions 
  78.        char name[13];               // file names 
  79.        int  TotalFields;
  80.        } DataFile[MAX_FILES];    
  81.  
  82. struct StrDataField {               // data field definitions 
  83.        char ShortName[15];          // data field name 
  84.        char FullName[35];           // field name with file prefix 
  85.        int  width;                  // display width of the field 
  86.        int  type;                   // field type, see form.h file  
  87.        int  DecPlaces;              // decimal places for numeric/floating fields 
  88.        } DataField[MAX_FILES][MAX_FIELDS];
  89.  
  90. // fields to display a bitmap
  91.  
  92. HBITMAP  hLogoBM;                   // customer logo bitmap
  93. HANDLE   hInfo,hImage;              // handle to the device independent bitmap
  94. LPSTR    pImage;                    // pointer to the image data
  95. LPBITMAPINFOHEADER pInfo;           // pointer to the image header data
  96.  
  97.