Sage-ST ä

Ctrlbttn

Documentation

ControlCommand CurrentControlID CurrentDialogID DisableControl
EnableControl GetText HideControl IsEnabled
MakeDefault OwnerDrawBMP OwnerDrawBMPData OwnerDrawRes
OwnerDrawRes2 PostLeftButtonClick RedrawControl STRGetText
STROwnerDrawBMP STROwnerDrawBMPData STRSetText STRSetToolTip
SetFocus SetText SetToolTip ShowControl




  function ControlCommand
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer) : ControlMessage; stdcall;

  exports ControlCommand name 'CtrlBttn_ControlCommand';

  //*
  //  ControlCommand - Retrieves a command which has been sent from a control.
  //
  //
  //  This routine will retrieve a command which has been sent from the
  //  control to the ActionProc.
  //
  //  CALLING SEQUENCE -
  //
  //    command := ControlCommand (msgType, msgData)
  //
  //  ENTRY -
  //
  //    msgType : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    command : ControlMessage
  //      The command which has been sent.  Must be one of the Control
  //      Messages defined for the control receiving the command.  The
  //      command Unknown indicates an undefined command has been sent.
  //




  function CurrentDialogID
             (const msgData : pointer) : cardinal; stdcall;

  exports CurrentDialogID name 'CtrlBttn_CurrentDialogID';

  //*
  //  CurrentDialogID - Retrieves the ID of a dialog to which a message was sent.
  //
  //
  //  This routine will retrieve the ID of a dialog to which a message
  //  has been sent.
  //
  //  CALLING SEQUENCE -
  //
  //    dialogID := CurrentDialogID (msgData)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    dialogID : cardinal
  //      The ID of the dialog receiving a message.
  //




  function CurrentControlID
             (const msgData : pointer) : cardinal; stdcall;

  exports CurrentControlID name 'CtrlBttn_CurrentControlID';

  //*
  //  CurrentControlID - Retrieves the ID of a control for which a message is intended.
  //
  //
  //  This routine will retrieve the ID of a control for which a message
  //  is intended.
  //
  //  CALLING SEQUENCE -
  //
  //    controlID := CurrentControlID (msgData)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    controlID : cardinal
  //      The ID of the control.
  //




  procedure OwnerDrawBMP
             (const msgData       : pointer;
              const bmpFileName   : array of char;
              const proportionate : boolean); overload; stdcall;

  exports OwnerDrawBMP (const msgData       : pointer;
                        const bmpFileName   : array of char;
                        const proportionate : boolean) name 'CtrlBttn_OwnerDrawBMP';

  //*
  //  OwnerDrawBMP - Fill owner draw button when DrawItem message is received.
  //
  //  This procedure causes the owner draw button to be filled with the
  //  contents of the BMP file when the Dialog.DrawItem message has
  //  been received.  This command is received when the control is first
  //  initialized or after the CtrlBttn.RedrawControl procedure for that
  //  control is called.  The BMP file will be stretched to be
  //  proportionate to its original dimensions if the 'proportionate'
  //  argument is True, or it will be stretched across the entire contents
  //  of the button if otherwise.
  //




  procedure OwnerDrawBMP
             (const msgData       : pointer;
              const bmpFileName   : string;
              const proportionate : boolean); overload; stdcall;

  exports OwnerDrawBMP (const msgData       : pointer;
                        const bmpFileName   : string;
                        const proportionate : boolean) name 'CtrlBttn_STROwnerDrawBMP';

  //*
  //  STROwnerDrawBMP - See documentation of OwnerDrawBMP.
  //




  procedure OwnerDrawBMPData
             (const msgData       : pointer;
              const bmpData       : array of char;
              const bmpSize       : cardinal;
              const proportionate : boolean); overload; stdcall;

  exports OwnerDrawBMPData (const msgData       : pointer;
                            const bmpData       : array of char;
                            const bmpSize       : cardinal;
                            const proportionate : boolean) name 'CtrlBttn_OwnerDrawBMPData';

  //*
  //  OwnerDrawBMPData - Fill owner draw button when DrawItem message is received.
  //
  //  This procedure causes the owner draw button to be filled with the
  //  contents of the 'bmpData' when the Dialog.DrawItem message has
  //  been received.  This data is the same as the contents of a BMP file.
  //  This command is received when the control is first
  //  initialized or after the CtrlBttn.RedrawControl procedure for that
  //  control is called.  The BMP file will be stretched to be
  //  proportionate to its original dimensions if the 'proportionate'
  //  argument is True, or it will be stretched across the entire contents
  //  of the button if otherwise.
  //




  procedure OwnerDrawBMPData
             (const msgData       : pointer;
              const bmpData       : string;
              const bmpSize       : cardinal;
              const proportionate : boolean); overload; stdcall;

  exports OwnerDrawBMPData (const msgData       : pointer;
                            const bmpData       : string;
                            const bmpSize       : cardinal;
                            const proportionate : boolean) name 'CtrlBttn_STROwnerDrawBMPData';

  //*
  //  STROwnerDrawBMPData - See documentation of OwnerDrawBMPData.
  //




  procedure OwnerDrawRes
             (const msgData       : pointer;
              const resourceID    : cardinal;
              const proportionate : boolean); stdcall;

  exports OwnerDrawRes name 'CtrlBttn_OwnerDrawRes';

  //*
  //  OwnerDrawRes - Fill owner draw button when DrawItem message is received.
  //
  //  This procedure causes the owner draw button to be filled with the
  //  BMP resource identified by the 'resourceID' when the Dialog.DrawItem
  //  message has been received.  This command is received when the control
  //  is first initialized or after the CtrlBttn.RedrawControl procedure
  //  for that control is called.  The BMP file will be stretched to be
  //  proportionate to its original dimensions if the 'proportionate'
  //  argument is True, or it will be stretched across the entire contents
  //  of the button if otherwise.
  //




  procedure OwnerDrawRes2
             (const msgData       : pointer;
              const resourceID    : cardinal;
              const proportionate : boolean;
              const resInstance   : Windows.hInst); stdcall;

  exports OwnerDrawRes2 name 'CtrlBttn_OwnerDrawRes2';




  function IsEnabled
             (const dialogID  : cardinal;
              const controlID : cardinal) : boolean; stdcall;

  exports IsEnabled name 'CtrlBttn_IsEnabled';

  //*
  //  IsEnabled - Checks to see if a control is enabled.
  //
  //
  //  This routine will determine whether a control is enabled or
  //  disabled (grayed).
  //
  //  CALLING SEQUENCE -
  //
  //    status := IsEnabled (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    status : boolean
  //      True if the control is enabled.
  //




  procedure EnableControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports EnableControl name 'CtrlBttn_EnableControl';

  //*
  //  EnableControl - Enables a control.
  //
  //
  //  This routine will enable the specified control.
  //
  //  CALLING SEQUENCE -
  //
  //    EnableControl (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure DisableControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports DisableControl name 'CtrlBttn_DisableControl';

  //*
  //  DisableControl - Disables a control.
  //
  //
  //  This routine will disable (gray) the specified control.
  //
  //  CALLING SEQUENCE -
  //
  //    DisableControl (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure HideControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports HideControl name 'CtrlBttn_HideControl';

  //*
  //  HideControl - Hides a control.
  //
  //
  //  This routine will hide the specified control.
  //
  //  CALLING SEQUENCE -
  //
  //    HideControl (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure ShowControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports ShowControl name 'CtrlBttn_ShowControl';

  //*
  //  ShowControl - Shows a control.
  //
  //
  //  This routine will show the specified control.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowControl (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure SetFocus
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports SetFocus name 'CtrlBttn_SetFocus';

  //*
  //  SetFocus - Sets to focus to a control.
  //
  //
  //  This routine will give the specified control focus.
  //
  //  CALLING SEQUENCE -
  //
  //    SetFocus (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure RedrawControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports RedrawControl name 'CtrlBttn_RedrawControl';

  //*
  //  RedrawControl - Redraws a control.
  //
  //
  //  This routine will redraw the specified control.
  //
  //  CALLING SEQUENCE -
  //
  //    RedrawControl (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure GetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   Text      : array of char); overload; stdcall;

  exports GetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   var   Text      : array of char) name 'CtrlBttn_GetText';

  //*
  //  GetText - Retrieves the label text and text length from the control.
  //
  //
  //  This routine will return the label and label length of the specified
  //  SageBttn control.
  //
  //  CALLING SEQUENCE -
  //
  //    GetText (dialogID, controlID, text)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    text : array of char
  //      The label text from the control.
  //
  //    textLength : cardinal
  //      The length ot the label text returned.
  //




  procedure GetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   Text      : string); overload; stdcall;

  exports GetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   var   Text      : string) name 'CtrlBttn_STRGetText';

  //*
  //  STRGetText - See documentation of GetText.
  //




  procedure MakeDefault
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports MakeDefault name 'CtrlBttn_MakeDefault';

  //*
  //  MakeDefault - Makes a SageBttn the default button.
  //
  //
  //  This routine will make a SageBttn the default button.  The default
  //  button has a dark outline around it and is automatically pressed
  //  when the user presses the Enter key.
  //
  //  CALLING SEQUENCE -
  //
  //    MakeDefault (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure SetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : array of char); overload; stdcall;

  exports SetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   const Text      : array of char) name 'CtrlBttn_SetText';

  //*
  //  SetText - Sets the label text of the control.
  //
  //
  //  This routine will place the given text string in the specified SageBttn
  //  control label.
  //
  //  CALLING SEQUENCE -
  //
  //    SetText (dialogID, controlID, text)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    text : array of char
  //      The label text to set in the control.
  //




  procedure SetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : string); overload; stdcall;

  exports SetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   const Text      : string) name 'CtrlBttn_STRSetText';

  //*
  //  STRSetText - See documentation of SetText.
  //




  procedure SetToolTip
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : array of char); overload; stdcall;

  exports SetToolTip (const dialogID  : cardinal;
                      const controlID : cardinal;
                      const Text      : array of char) name 'CtrlBttn_SetToolTip';

  //*
  //  SetToolTip - Sets the tooltip text of the control.
  //
  //
  //  This routine will place the given text string in the specified SageBttn
  //  control tooltip.
  //
  //  CALLING SEQUENCE -
  //
  //    SetToolTip (dialogID, controlID, text)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    text : array of char
  //      The tooltip text to set in the control.
  //




  procedure SetToolTip
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : string); overload; stdcall;

  exports SetToolTip (const dialogID  : cardinal;
                      const controlID : cardinal;
                      const Text      : string) name 'CtrlBttn_STRSetToolTip';

  //*
  //  STRSetToolTip - See documentation of SetToolTip.
  //




  procedure PostLeftButtonClick
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports PostLeftButtonClick name 'CtrlBttn_PostLeftButtonClick';

  //*
  //  PostLeftButtonClick - Simulates left click of a button.
  //
  //
  //  This routine will simulate the left click of a button. The action
  //  is *posted*, not sent, so the message currently being processed
  //  will be completed and then a button click message will be generated,
  //  just as if the user had actually pressed the button.
  //
  //  CALLING SEQUENCE -
  //
  //    PostLeftButtonClick (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance