home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / tpw / bwcc.pas < prev    next >
Pascal/Delphi Source File  |  1991-09-08  |  4KB  |  105 lines

  1. {*******************************************************}
  2. {                                                       }
  3. {       Turbo Pascal                                    }
  4. {       Borland Custom Control Interface Unit           }
  5. {                                                       }
  6. {       Copyright (c) 1991 Borland International        }
  7. {                                                       }
  8. {*******************************************************}
  9.  
  10. unit BWCC;
  11.  
  12. interface
  13.  
  14. uses WinTypes;
  15.  
  16. const
  17.   BwccVersion        = $0100;
  18.  
  19. { Our Custom Dialog class }
  20.   BorDlgClass   = 'BorDlg';
  21.  
  22. { Borland dialog window uses this property for instance data
  23.   users should not use a property with this name! }
  24.   BorDlgProp    = 'FB';
  25.  
  26.   IdHelp        = 998;               { Id of help button }
  27.  
  28. { Button style definitions:
  29.   the Borland buttons use Windows button styles for button type: i.e.
  30.   bs_PushButton/bs_DefPushButton }
  31.  
  32.   Button_Class ='BorBtn';            { Our Bitmap Buttons }
  33.   Radio_Class  ='BorRadio';          { Our radio buttons }
  34.   Check_Class  ='BorCheck';          { Our Checkboxes }
  35.  
  36. { Styles }
  37.   bbs_Bitmap:Longint    =  $8000;    { this is a bitmap static }
  38.   bbs_DlgPaint:Longint  =  $4000;    { used at runtime by dialog class }
  39.   bbs_ParentNotify:Longint=$2000;    { Notify parent of TAB keys and focus }
  40.   bbs_OwnerDraw:Longint =  $1000;    { let parent paint via wm_DrawItem }
  41.  
  42. { Messages }
  43.   bbm_SetBits    =  ( BM_SETSTYLE + 10);
  44.  
  45. { Notifications }
  46.   bbn_SetFocus      =  ( bn_DoubleClicked + 10);
  47.   bbn_SetFocusmouse =  ( bn_DoubleClicked + 11);
  48.   bbn_GotaTab       =  ( bn_DoubleClicked + 12);
  49.   bbn_GotaBTab      =  ( bn_DoubleClicked + 13);
  50.  
  51.   Shade_Class = 'BorShade';
  52.  
  53.   bss_Group         =      1;        {  group box              }
  54.   bss_Hdip          =      2;        {  horizontal border      }
  55.   bss_Vdip          =      3;        {  hertical border        }
  56.   bss_Hbump         =      4;        {  horizontal speed bump  }
  57.   bss_Vbump         =      5;        {  vertical speed bump    }
  58.  
  59.   bss_DlgErase      =  $8000;        {  Dialog Window erases for us }
  60.   bss_DlgPaint      =  $4000;        {  Dialog Window paints for us }
  61.  
  62.   Static_Class =   'BorStatic';      {  Our statics }
  63.  
  64. { Function declarations }
  65.  
  66. function DialogBox(Instance: THandle; Templatename: PChar;
  67.   WndParent: HWnd; DialogFunc: TFarProc): Integer;
  68. function DialogBoxParam(Instance: THandle; TemplateName: PChar;
  69.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): Integer;
  70. function CreateDialog(Instance: THandle; TemplateName: PChar;
  71.   WndParent: HWnd; DialogFunc: TFarProc): HWnd;
  72. function CreateDialogParam(Instance: THandle; TemplateName: PChar;
  73.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): HWnd;
  74. function BWCCMessageBox(WndParent: HWnd; Txt, Caption: PChar;
  75.   TextType: Word): Integer;
  76. function BWCCDefDlgProc(Dlg: HWnd; Msg, wParam: Word; lParam:
  77.   LongInt): LongInt;
  78. function BWCCGetPattern: HBrush;
  79. function BWCCGetVersion: Word;
  80. function SpecialLoadDialog(hResMod: THandle; Templatename: PChar;
  81.   DialogFunc: TFarProc): THandle;
  82. function MangleDialog(hDlg: THandle; hResMod: THandle;
  83.   DialogFunc: TFarProc): THandle;
  84. function BWCCDefWindowProc(hWindow: HWnd; Message, wParam: Word;
  85.   lParam: LongInt): LongInt;
  86. function BWCCDefMDIChildProc(hWindow: HWnd; Message, wParam: Word;
  87.   lParam: LongInt): LongInt;
  88.  
  89. implementation
  90.  
  91. function SpecialLoadDialog;             external 'BWCC' index 1;
  92. function DialogBox;                     external 'BWCC' index 2;
  93. function DialogBoxParam;                external 'BWCC' index 3;
  94. function CreateDialog;                  external 'BWCC' index 4;
  95. function CreateDialogParam;             external 'BWCC' index 5;
  96. function BWCCDefDlgProc;                external 'BWCC' index 6;
  97. function BWCCMessageBox;                external 'BWCC' index 9;
  98. function BWCCGetPattern;                external 'BWCC' index 10;
  99. function BWCCGetVersion;                external 'BWCC' index 11;
  100. function MangleDialog;                  external 'BWCC' index 12;
  101. function BWCCDefWindowProc;             external 'BWCC' index 14;
  102. function BWCCDefMDIChildProc;           external 'BWCC' index 15;
  103.  
  104. end.
  105.