home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / drgrnd.zip / drgrendr.h < prev    next >
C/C++ Source or Header  |  1993-07-28  |  5KB  |  118 lines

  1. /*********************************************************************
  2.  *                                                                   *
  3.  * MODULE NAME :  drgrendr.h             AUTHOR:  Rick Fishman       *
  4.  * DATE WRITTEN:  07-15-93                                           *
  5.  *                                                                   *
  6.  * DESCRIPTION:                                                      *
  7.  *                                                                   *
  8.  *  Common definitions and function prototypes for DRGRENDR.EXE      *
  9.  *                                                                   *
  10.  * HISTORY:                                                          *
  11.  *                                                                   *
  12.  *  07-15-93 - Coding started.                                       *
  13.  *                                                                   *
  14.  *  Rick Fishman                                                     *
  15.  *  Code Blazers, Inc.                                               *
  16.  *  4113 Apricot                                                     *
  17.  *  Irvine, CA. 92720                                                *
  18.  *  CIS ID: 72251,750                                                *
  19.  *                                                                   *
  20.  *********************************************************************/
  21.  
  22. /*********************************************************************/
  23. /*------------------- APPLICATION DEFINITIONS -----------------------*/
  24. /*********************************************************************/
  25.  
  26. #define ID_DRAGCNR             1
  27. #define ID_DROPCNR             2
  28.  
  29. #define INSTDATA(hwnd) ((PINSTANCE)WinQueryWindowPtr( hwnd, QWL_USER ))
  30. #define ANCHOR(hwnd)   (WinQueryAnchorBlock( hwnd ))
  31. #define HWNDERR(hwnd)  (ERRORIDERROR(WinGetLastError( ANCHOR( hwnd ))))
  32. #define HABERR(hab)    (ERRORIDERROR(WinGetLastError( hab )))
  33.  
  34. #define DEBUG_FILENAME        "drgrendr.dbg"
  35.  
  36. #define BASE_TEMPFILE_NAME    "TEMP"
  37.  
  38. #define UM_WINDOW_CREATED     WM_USER
  39. #define UM_DO_THE_RENDERING   WM_USER + 1
  40.  
  41. #define RECATTR_DRAGGABLE     0x00000001
  42. #define RECATTR_OPENABLE      0x00000002
  43.  
  44. #ifndef CRA_SOURCE            // As of 07/30/93, CRA_SOURCE not in toolkit hdrs
  45. #  define CRA_SOURCE          0x00004000L
  46. #endif
  47.  
  48. #define IDM_EXIT              100
  49.  
  50. /**********************************************************************/
  51. /*---------------------------- STRUCTURES ----------------------------*/
  52. /**********************************************************************/
  53.  
  54. typedef struct _CNRREC               // Container record structure
  55. {
  56.   MINIRECORDCORE mrc;
  57.   ULONG          flAttr;
  58.   char           szTableName[ 100 ];
  59.   char           szRenderedFileName[ CCHMAXPATH ];
  60.   HWND           hwndDisplay;
  61. } CNRREC, *PCNRREC;
  62.  
  63. #define EXTRA_BYTES (sizeof( CNRREC ) - sizeof( MINIRECORDCORE ))
  64.  
  65. typedef struct _ENUMSTRUCT
  66. {
  67.   HDIR hdir;
  68.   FILE *stream;
  69.   char szFileName[ CCHMAXPATH ];
  70. } ENUMSTRUCT, *HENUMTABLES;
  71.  
  72. typedef struct _INSTANCE
  73. {
  74.   PDRAGINFO pSavedDragInfo;
  75.   int       cDragItems;
  76. } INSTANCE, *PINSTANCE;
  77.  
  78. /**********************************************************************/
  79. /*----------------------- FUNCTION PROTOTYPES ------------------------*/
  80. /**********************************************************************/
  81.  
  82. // In drag.c
  83.  
  84. void    dragInit( HWND hwndFrame, PCNRDRAGINIT pcdi );
  85. MRESULT dragOver( HWND hwndFrame, PCNRDRAGINFO pcdi );
  86. void    dragDrop( HWND hwndFrame, PCNRDRAGINFO pcdi );
  87. MRESULT dragMessage( HWND hwndFrame, ULONG msg, MPARAM mp1, MPARAM mp2 );
  88.  
  89. // In drgrendr.c
  90.  
  91. void Msg( PSZ szFormat, ... );
  92.  
  93. // In dbaccess.c
  94.  
  95. HENUMTABLES dbBeginEnumTables( void );
  96. BOOL        dbGetNextTable( HENUMTABLES henum, PSZ szBuffer, INT cbBuf );
  97. void        dbEndEnumTables( HENUMTABLES henum );
  98. BOOL        dbRenderToFile( PSZ pszTableName, PSZ pszFileName );
  99.  
  100. /**********************************************************************/
  101. /*------------------------ GLOBAL VARIABLES --------------------------*/
  102. /**********************************************************************/
  103.  
  104. #ifdef GLOBALS_DEFINED
  105. #   define DATADEF
  106. #else
  107. #   define DATADEF extern
  108. #endif
  109.  
  110. DATADEF char szCurrentPath[ CCHMAXPATH ];
  111.  
  112. DATADEF HPOINTER hptrDragMe;
  113. DATADEF HPOINTER hptrOpenMe;
  114.  
  115. /***************************************************************************
  116.  *                         E N D   O F   S O U R C E                       *
  117.  ***************************************************************************/
  118.