Sage-ST ä

Ctrlrich

Documentation

CancelAutoSave ControlCommand CurrentControlID CurrentDialogID
DisableControl EnableControl FindText ForceSave
GetDataPosition GetDataSize HideControl IsEnabled
LoadData PrintContent RedrawControl ReplaceText
Reset ResetFile RetrieveData STRResetFile
SetColors SetFocus ShowControl




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

  exports ControlCommand name 'CtrlRich_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 'CtrlRich_CurrentDialogID';

  //*
  //  CurrentDialogID - Retrieves the ID of a dialog to which a message was sent.
  //
  //
  //  This routine will retrieve a 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 'CtrlRich_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.
  //




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

  exports IsEnabled name 'CtrlRich_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 'CtrlRich_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 'CtrlRich_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 'CtrlRich_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 Reset
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports Reset name 'CtrlRich_Reset';

  //*
  //  Reset - Resets the control.
  //
  //
  //  This routine will cause the control to be reset.  If the control
  //  is associated with a Sage table and field, the current contents
  //  of the memory record will be reflected.
  //
  //  CALLING SEQUENCE -
  //
  //    Reset (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure ResetFile
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const filePath  : array of char); overload; stdcall;

  exports ResetFile (const dialogID  : cardinal;
                     const controlID : cardinal;
                     const filePath  : array of char) name 'CtrlRich_ResetFile';

  //*
  //  ResetFile - Resets the file which a control is displaying.
  //
  //
  //  This routine will cause a SageRich control which is displaying a file
  //  to reset and display a different file.  The current file will be saved
  //  before the new file is loaded.
  //
  //  CALLING SEQUENCE -
  //
  //    ResetFile (dialogID, controlID, filePath)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    filePath : array of char
  //      The path and file name of the new file to load.  This value is
  //      limited to 128 characters.
  //




  procedure ResetFile
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const filePath  : string); overload; stdcall;

  exports ResetFile (const dialogID  : cardinal;
                     const controlID : cardinal;
                     const filePath  : string) name 'CtrlRich_STRResetFile';

  //*
  //  STRResetFile - See documentation of ResetFile.
  //




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

  exports ShowControl name 'CtrlRich_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 'CtrlRich_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 'CtrlRich_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 CancelAutoSave
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer); stdcall;

  exports CancelAutoSave name 'CtrlRich_CancelAutoSave';

  //*
  //  CancelAutoSave - Tells the control to NOT save the data.
  //
  //
  //  The SageRich control sends a AutoSave message when the Sage Data Field
  //  option has been selected in the resource file and the control is about
  //  to save its data.  This will occur either when the control loses focus
  //  or when the dialog is about to close.  This routine can be used to
  //  tell the control not to save any changes which have been made to the data.
  //  If this procedure is not called, the default response is to save the data.
  //
  //  CALLING SEQUENCE -
  //
  //    CancelAutoSave (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 -
  //
  //    None
  //      N/A
  //




  procedure GetDataPosition
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   LoadPos : cardinal;
              var   LoadMax : cardinal); stdcall;

  exports GetDataPosition name 'CtrlRich_GetDataPosition';

  //*
  //  GetDataPosition - Retrieves position and max size of data request.
  //
  //
  //  The SageRich control sends a GetData message when the User Supplied
  //  Data option has been selected in the resource file and the controls
  //  needs data.  This routine can be used to determine what position in
  //  the data block the SageRich control is requesting data from and the
  //  max size of data that can be returned in this iteration.
  //
  //  CALLING SEQUENCE -
  //
  //    GetDataPosition (msgType, msgData, LoadPos, LoadMax)
  //
  //  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 -
  //
  //    LoadPos : cardinal
  //      The current position in the buffer needing data.
  //
  //    LoadMax : cardinal
  //      The max size of data that can be returned to the control.
  //




  function GetDataSize
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer) : cardinal; stdcall;

  exports GetDataSize name 'CtrlRich_GetDataSize';

  //*
  //  GetDataSize - Get the size of the data.
  //
  //
  //  The SageRich control sends a SaveData message when the User Supplied
  //  Data option has been selected in the resource and it needs to write
  //  out its data.  This routine can be used to determine how much data the
  //  SageRich control wishes to save.
  //
  //  CALLING SEQUENCE -
  //
  //    dataSize := GetDataSize (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 -
  //
  //    dataSize : cardinal
  //      The size of the data block to save.
  //




  procedure LoadData
             (const msgType  : DWSpec.DisplayMessageType;
              const msgData  : pointer;
              const dataPos  : cardinal;
              const DataSize : cardinal;
              const Data     : pointer); stdcall;

  exports LoadData name 'CtrlRich_LoadData';

  //*
  //  LoadData - Sends data to a SageRich Control.
  //
  //
  //  The SageRich control sends a GetData message when the User Supplied
  //  Data option has been selected in the resource file and the controls
  //  needs data.  This routine can be used to send data to a SageRich
  //  control.  As the SageRich control may send the GetData message
  //  many times, the programmer should use the GetDataPosition routine to
  //  determine what the starting position of the requested data is.
  //
  //  NOTE - If the date being sent is larger than the LoadMax value
  //         returned from the CtrlRich.GetDataPosition routine then the
  //         data exceeding the value will be lost.
  //
  //  CALLING SEQUENCE -
  //
  //    LoadData (msgType, msgData, dataPos, dataSize, data)
  //
  //  ENTRY -
  //
  //    msgType : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    dataPos : cardinal
  //      The position in the SageRich control data for the current data
  //      block. (1 .. N)
  //
  //    dataSize : cardinal
  //      The size of the data block being returned.
  //
  //    data : pointer
  //      The address of the data being returned.
  //




  procedure RetrieveData
             (const msgType  : DWSpec.DisplayMessageType;
              const msgData  : pointer;
              var   dataPos  : cardinal;
              var   DataSize : cardinal;
              const Data     : pointer); stdcall;

  exports RetrieveData name 'CtrlRich_RetrieveData';

  //*
  //  RetrieveData - Gets data from a SageRich Control.
  //
  //
  //  The SageRich control sends a SaveData message when the User Supplied
  //  Data option has been selected in the resource file and the controls
  //  needs to write out its data.  This routine can be used to get the data
  //  which the control is writing out.  As the SageRich control may send
  //  the SaveData message many times, the programmer should use the
  //  GetDataSize routine each time to determine what size of data buffer needs
  //  to be allocated.
  //
  //  CALLING SEQUENCE -
  //
  //    RetrieveData (msgType, msgData, dataPos, dataSize, data)
  //
  //  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 -
  //
  //    dataPos : cardinal
  //      The position in the SageRich control data for the current data
  //      block.  (1 .. N)
  //
  //    dataSize : cardinal
  //      The size of the data block to write out.
  //
  //    data : pointer
  //      The address of the data being written out.
  //




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

  exports ForceSave name 'CtrlRich_ForceSave';

  //*
  //  ForceSave - Forces a save of the data RichEdit is working with.
  //
  //
  //  This routine will cause a SageRich control which is displaying a file
  //  to save the data it is displaying.
  //
  //  NOTE - This routine currently only does this if the control is defined
  //         as Sage data or User data.  It does not work if the control is
  //         defined as File data.
  //
  //  CALLING SEQUENCE -
  //
  //    ForceSave (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




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

  exports PrintContent name 'CtrlRich_PrintContent';

  //*
  //  PrintContent - Allows printing of a richedit control.
  //
  //
  //  This routine will allow a SageRich control which is displaying to
  //  be printed.
  //
  //  CALLING SEQUENCE -
  //
  //    PrintContent (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure SetColors
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const textColor  : RTColorType;
              const bkGndColor : RTColorType); stdcall;

  exports SetColors name 'CtrlRich_SetColors';

  //*
  //  SetColors - Sets the text and background colors of the control.
  //
  //  This routine will change the text and background colors of
  //  the SageRich control.
  //
  //  CALLING SEQUENCE -
  //
  //    SetColors (dialogID, controlID, textColor, bkGndColor)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    textColor : RTColorType
  //      The color for the text.  Must be one of the RTColorTypes.
  //      The Default color is determined by the current Windows
  //      configuration.
  //
  //    bkGndColor : RTColorType
  //      The color for the background.  Must be one of the
  //      RTColorTypes.  The Default color is determined by the
  //      current Windows configuration.
  //




  function FindText
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const FindRecord : FindStruct;
              const highlight  : boolean) : integer; stdcall;

  exports FindText name 'CtrlRich_FindText';

  //*
  //  FindText - Finds the text specified in findRecord and highlights it.
  //
  //  CALLING SEQUENCE -
  //
  //    FindText (dialogID, controlID, findRecord)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    findRecrd : FindStruct
  //      A FindStruct structure contianing information about the find
  //      operation.
  //
  //    highlight : boolean
  //      Determines whether the searched text is highlighted
  //
  //  EXIT -
  //
  //    Return value
  //      <0 = The text was not found in the dialog box within the given search range
  //      >=0 = The starting position of the text within the control.
  //




  procedure ReplaceText
             (const dialogID      : cardinal;
              const controlID     : cardinal;
              const replaceRecord : ReplaceStruct;
              const highlight     : boolean); stdcall;

  exports ReplaceText name 'CtrlRich_ReplaceText';

  //*
  //  ReplaceText - Finds and replaces the text specified in replaceRecord.
  //
  //  If the replaceAll flag is set in the replaceRecord structure then all
  //  occurrences of the find string in the entire control are replaced.  If
  //  the flag is not set then the current selection is replaced.  The current
  //  selection must be the find string or the replace will no take place.
  //  After the replace the next occurence of the find string will be
  //  highlighted.
  //
  //  CALLING SEQUENCE -
  //
  //    ReplaceText (dialogID, controlID, replaceRecord)
  //
  //  ENTRY -
  //
  //    dialogID : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    replaceRecrod : ReplaceStruct
  //      A ReplaceStruct structure contianing information about the find
  //      and replace operation.
  //
  //    highlight : boolean
  //      Determines whether the next match is highlighted
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




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