home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / NBSIZE.ZIP / NBSIZE.H < prev    next >
Text File  |  1992-12-13  |  5KB  |  102 lines

  1. /*********************************************************************
  2.  *                                                                   *
  3.  * MODULE NAME :  nbsize.h               AUTHOR:  Rick Fishman       *
  4.  * DATE WRITTEN:  11-28-92                                           *
  5.  *                                                                   *
  6.  * DESCRIPTION:                                                      *
  7.  *                                                                   *
  8.  *  Common definitions and function prototypes for NBSIZE.EXE        *
  9.  *                                                                   *
  10.  * HISTORY:                                                          *
  11.  *                                                                   *
  12.  *  11-28-92 - Source copied from the NBBASE.EXE sample              *
  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_NBWINFRAME           1
  27. #define ID_NB                   10
  28.  
  29. #define IDD_DIALOG              1000
  30. #define MLE_ON_DIALOG           1001
  31. #define PB_UNDO                 1002
  32. #define PB_HELP                 1003
  33. #define PB_DEFAULT              1004
  34.  
  35. #define ID_CLIENTS_FRAME        2000
  36.  
  37. #define MLE_PAGE                3000
  38.  
  39. #define DEBUG_FILENAME          "nbsize.dbg"
  40.  
  41. #define NOTEBOOK_WINCLASS       "NoteBookSample"
  42.  
  43. #define PROGRAM_TITLE           "Notebook Control Sample Program"
  44.  
  45. #define UM_RESIZE               WM_USER  // Msg sent by notebook to all pages
  46.  
  47. typedef HWND FNCREATE( HWND hwndParent, HWND hwndNB, ULONG ulPageID );
  48. typedef FNCREATE *PFNCREATE;
  49.  
  50. #define HABERR( hab )           (ERRORIDERROR( WinGetLastError( hab ) ))
  51.  
  52. #define ANCHOR( hwnd )          (WinQueryAnchorBlock( hwnd ))
  53.  
  54. #define HWNDERR( hwnd )         \
  55.             (ERRORIDERROR( WinGetLastError( WinQueryAnchorBlock( hwnd ) ) ))
  56.  
  57. #define INSTDATA( hwnd )        (WinQueryWindowPtr( hwnd, 0 ))
  58.  
  59. #define PARENT( hwnd )          (WinQueryWindow( hwnd, QW_PARENT ))
  60.  
  61. #define GRANDPARENT( hwnd )   (WinQueryWindow( WinQueryWindow(hwnd, QW_PARENT)))
  62.  
  63. /**********************************************************************/
  64. /*---------------------------- STRUCTURES ----------------------------*/
  65. /**********************************************************************/
  66.  
  67. typedef struct _NBPAGE              // VARIABLES USED FOR A NOTEBOOK PAGE
  68. {
  69.     PFNCREATE pfncreate;            // 'CreateWindow' function pointer
  70.     PSZ      szStatusLineText;      // Text to go on status line
  71.     PSZ      szTabText;             // Text to go on major tab
  72.     ULONG    idFocus;               // ID of the control to get the focus first
  73.     BOOL     fParent;               // Is this a Parent page with minor pages
  74.     USHORT   usTabType;             // BKA_MAJOR or BKA_MINOR
  75.     USHORT   fsPageStyles;          // BKA_ styles for the page
  76.  
  77. } NBPAGE, *PNBPAGE;
  78.  
  79. /**********************************************************************/
  80. /*----------------------- FUNCTION PROTOTYPES ------------------------*/
  81. /**********************************************************************/
  82.  
  83. VOID Msg( PSZ szFormat, ... );
  84.  
  85. FNCREATE CreateDialogPage,
  86.          CreateClientPage,
  87.          CreateMlePage;
  88.  
  89. /**********************************************************************/
  90. /*------------------------ GLOBAL VARIABLES --------------------------*/
  91. /**********************************************************************/
  92.  
  93. #ifdef GLOBALS_DEFINED
  94. #  define DATADEF
  95. #else
  96. #  define DATADEF extern
  97. #endif
  98.  
  99. /****************************************************************************
  100.  *                        E N D   O F   S O U R C E                         *
  101.  ****************************************************************************/
  102.