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

  1. /*********************************************************************
  2.  *                                                                   *
  3.  * MODULE NAME :  drgfiles.h             AUTHOR:  Rick Fishman       *
  4.  * DATE WRITTEN:  07-28-93                                           *
  5.  *                                                                   *
  6.  * DESCRIPTION:                                                      *
  7.  *                                                                   *
  8.  *  Common definitions and function prototypes for DRGFILES.EXE      *
  9.  *                                                                   *
  10.  * HISTORY:                                                          *
  11.  *                                                                   *
  12.  *  07-28-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 DEBUG_FILENAME         "drgfiles.dbg"
  27.  
  28. #define DRGFILES_ICON_FILENAME "drgfiles.ico"
  29.  
  30. #ifndef CRA_SOURCE             // As of 09/03/93, CRA_SOURCE not in toolkit hdrs
  31. #  define CRA_SOURCE           0x00004000L
  32. #endif
  33.  
  34. /*********************************************************************/
  35. /*----------------------- WINDOW DEFINITIONS ------------------------*/
  36. /*********************************************************************/
  37.  
  38. #define ID_RESOURCES           10
  39.  
  40. #define IDM_EXIT               100
  41.  
  42. #define BASE_TEMPFILE_NAME     "TEMP"
  43.  
  44. /*********************************************************************/
  45. /*-------------------------- HELPER MACROS --------------------------*/
  46. /*********************************************************************/
  47.  
  48. #define ANCHOR(hwnd)   (WinQueryAnchorBlock( hwnd ))
  49. #define HWNDERR(hwnd)  (ERRORIDERROR(WinGetLastError( ANCHOR( hwnd ))))
  50. #define HABERR(hab)    (ERRORIDERROR(WinGetLastError( hab )))
  51. #define PARENT(hwnd)   (WinQueryWindow( hwnd, QW_PARENT ))
  52.  
  53. /**********************************************************************/
  54. /*---------------------------- STRUCTURES ----------------------------*/
  55. /**********************************************************************/
  56.  
  57. typedef struct _CNRREC                            // CONTAINER RECORD STRUCTURE
  58. {
  59.   MINIRECORDCORE mrc;
  60.   char           szFileName[ CCHMAXPATH ];        // File that icon represents
  61.   char           szFullFileName[ CCHMAXPATH ];    // Same as above,path included
  62.  
  63. } CNRREC, *PCNRREC;
  64.  
  65. #define EXTRA_BYTES (sizeof( CNRREC ) - sizeof( MINIRECORDCORE ))
  66.  
  67. /**********************************************************************/
  68. /*----------------------- FUNCTION PROTOTYPES ------------------------*/
  69. /**********************************************************************/
  70.  
  71. // In drgfiles.c
  72.  
  73. void    Msg      ( PSZ szFormat, ... );
  74. MRESULT DragError( USHORT usError, USHORT usOperation, HSTR hstrFile );
  75.  
  76. // In srcwin.c
  77.  
  78. HWND srcCreateWindow( HAB hab );
  79.  
  80. // In trgwin.c
  81.  
  82. HWND targCreateWindow( HAB hab );
  83.  
  84. /**********************************************************************/
  85. /*------------------------ GLOBAL VARIABLES --------------------------*/
  86. /**********************************************************************/
  87.  
  88. #ifdef GLOBALS_DEFINED
  89. #   define DATADEF
  90. #else
  91. #   define DATADEF extern
  92. #endif
  93.  
  94. DATADEF char szCurrentPath[ CCHMAXPATH ]; // Current path where pgm was loaded
  95. DATADEF char szTempDir[ CCHMAXPATH ];     // Directory used for temporary files
  96.  
  97. DATADEF HPOINTER hptrCnrRec;     // Icon used in the containers
  98.  
  99. DATADEF HWND hwndDrag;           // Window that can drag and drop
  100. DATADEF HWND hwndDrop;           // Window that can only drop initially
  101.  
  102. /***************************************************************************
  103.  *                         E N D   O F   S O U R C E                       *
  104.  ***************************************************************************/
  105.