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