Sage-ST ä

Ctrllv

Documentation

AdjustAndHighlightRow CalculateTopRow ColumnSize ControlCommand
CurrentControlID CurrentDialogID CurrentFont DATAISVALID
DeleteColumn DisableControl DummyCharValidateProc EditCell
EnableControl EndEdit GetAverageCharWidth GetColClicked
GetControlSize GetCurrentPosition GetDefaultColors GetEditExitFunction
GetHDC GetHighlightedPosition GetImageIndex GetItemNumber
GetItemState GetRowCol GetSearchStr GetValidationStr
HideControl HideGridlines InsertColumn IsEnabled
IsItemMarked KillEdit NextMarked RedrawControl
Refresh Reset ResetAndHighlightRow ResetColumns
STRCurrentFont STREditCell STRGetAverageCharWidth STRGetSearchStr
STRGetValidationStr STRSetColumnInfo STRSetItemText SetAllItemStates
SetColor SetColumnCount SetColumnInfo SetCurrentRow
SetDragging SetFocus SetHeaderFont SetHighlightedPosition
SetHighlighting SetIconMarkingMode SetImageCount SetImageInfo
SetItemFont SetItemFontColor SetItemNumber SetItemPos
SetItemRange SetItemState SetItemText SetItemVisible
SetLeftMouseClick SetMarkCursor SetSelectStyle SetState
SetStriping SetTotalStates SetViewKind ShowControl
ShowGridlines ShowIcon ShowOnlyMarked ToggleState
TotalMarked TurnOffDotDotDot TurnOnDotDotDot UnSetMarkCursor




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

  exports ControlCommand name 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_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 'CtrlLV_RedrawControl';

  //*
  //  RedrawControl - repaints control .. essentially the same as Refresh.
  //
  //  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 Refresh
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports Refresh name 'CtrlLV_Refresh';

  //*
  //  Refresh - will reload the current page of data.
  //
  //  This routine will reloads the current page.
  //
  //  CALLING SEQUENCE -
  //
  //    Refresh (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //




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

  exports ResetColumns name 'CtrlLV_ResetColumns';

  //*
  //  ResetColumns - Reset all columns.
  //
  //  This routine will cause the list view column headers to be reinitialized.
  //  This will clear all column headers and reask for the column information.
  //
  //  CALLING SEQUENCE -
  //
  //    ResetColumns (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;
              const rowPos    : cardinal); stdcall;

  exports Reset name 'CtrlLV_Reset';

  //*
  //  Reset - Reset the LV control.
  //
  //  This routine will cause the list view to be reinitialized, including
  //  asking for range and icon information, and asking for the item
  //  position to display first.  This also sets all states for all rows to 0.
  //
  //  CALLING SEQUENCE -
  //
  //    Reset (dialogID, controlID. rowPos)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowPos : CARDINAL
  //      The beginning item in the list to be displayed (1 .. n) (current page).
  //




  procedure SetLeftMouseClick
             (const dialogID       : cardinal;
              const controlID      : cardinal;
              const setToCtrlClick : boolean); stdcall;

  exports SetLeftMouseClick name 'CtrlLV_SetLeftMouseClick';

  //*
  //  SetLeftMouseClick - Set the left mouse click.
  //
  //  This routine will change the behavior of a left mouse click to match
  //  the behavior of a ctrl left mouse click.  That is, once an item has
  //  been clicked it stays selected until clicked again or cleared in some
  //  way other than clicking on another item (which is default behavior).
  //  This may be called during the Dialog.Initialize or any time after the
  //  Dialog has been initialized in response to any other ListView message.
  //
  //  CALLING SEQUENCE -
  //
  //    SetLeftMouseClick (dialogID, controlID. setToCtrlClick)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    setToCtrlClick : CARDINAL
  //      TRUE sets left click behavior to same as ctrl left click behavior;
  //      FALSE resets to default left click behavior
  //




  procedure GetSearchStr
             (const msgData : pointer;
              var   Str     : array of char); overload; stdcall;

  exports GetSearchStr (const msgData : pointer;
                        var   Str     : array of char) name 'CtrlLV_GetSearchStr';

  //*
  //  GetSearchStr - Retrieves the current search string from the list.
  //
  //  The list sends a SearchChange message when the search string
  //  has changed.  The programmer may use this routine to get the
  //  current search string.  The programmer can then use this value to
  //  perform a search to find a new index to position the list at.
  //  The SetItemPos routine can then be used to tell the list
  //  what the new position will be.
  //
  //  CALLING SEQUENCE -
  //
  //    GetSearchStr (msgData, str)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    str : ARRAY OF CHAR
  //      The current search string.
  //




  procedure GetSearchStr
             (const msgData : pointer;
              var   Str     : string); overload; stdcall;

  exports GetSearchStr (const msgData : pointer;
                        var   Str     : string) name 'CtrlLV_STRGetSearchStr';

  //*
  //  STRGetSearchStr - See documentation of GetSearchStr.
  //




  procedure SetItemPos
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Pos       : cardinal); stdcall;

  exports SetItemPos name 'CtrlLV_SetItemPos';

  //*
  //  SetItemPos - position data to specified position.
  //
  //  This routine will change the page of the data so that "pos" is at or
  //  near the top of the page.  This will set the position and do a Refresh
  //  of the control.
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemPos (dialogID, controlID. pos)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    pos : CARDINAL
  //      Data item (1 .. n) to be visible on current page.
  //




  procedure SetItemText
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const rowIndex   : cardinal;
              const colIndex   : cardinal;
              const imageIndex : cardinal;
              const Text       : array of char); overload; stdcall;

  exports SetItemText (const dialogID   : cardinal;
                       const controlID  : cardinal;
                       const rowIndex   : cardinal;
                       const colIndex   : cardinal;
                       const imageIndex : cardinal;
                       const Text       : array of char) name 'CtrlLV_SetItemText';

  //*
  //  SetItemText - load the current "cell" with data.
  //
  //  This routine is called in response to the GetItemInfo message. The
  //  user should first call GetRowCol to determine the rowIndex and colIndex,
  //  and then call this routine to load the data item.  rowIndex is the (1 .. n)
  //  data item or record, and colIndex is the (1 .. n) part of the data item.
  //  imageIndex is the 1 .. n relative image index associated with the data item
  //  (only 1 image per row)  0 indicates no image.
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemText (dialogID, controlID. rowIndex, colIndex, imageIndex, text)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowIndex : CARDINAL
  //      The data row (1 .. n)
  //
  //    colIndex : CARDINAL
  //      The data column (1 .. n)
  //
  //    imageIndex : CARDINAL
  //      The image associated with the entire row (0 .. n) where 0 indicates
  //      no image.
  //




  procedure SetItemText
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const rowIndex   : cardinal;
              const colIndex   : cardinal;
              const imageIndex : cardinal;
              const Text       : string); overload; stdcall;

  exports SetItemText (const dialogID   : cardinal;
                       const controlID  : cardinal;
                       const rowIndex   : cardinal;
                       const colIndex   : cardinal;
                       const imageIndex : cardinal;
                       const Text       : string) name 'CtrlLV_STRSetItemText';

  //*
  //  STRSetItemText - See documentation of SetItemText.
  //




  procedure SetColumnCount
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Count     : cardinal); stdcall;

  exports SetColumnCount name 'CtrlLV_SetColumnCount';

  //*
  //  SetColumnCount - tell the list view how many columns of data to expect.
  //
  //  This routine is called in response to the GetColumnCount message.
  //  count must be at least 1.
  //
  //  CALLING SEQUENCE -
  //
  //    SetColumnCount (dialogID, controlID. count)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    count : CARDINAL
  //      The number of columns of data.
  //




  procedure SetColumnInfo
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const columnIndex  : cardinal;
              const columnWidth  : cardinal;
              const columnAlign  : AlignmentType;
              const columnHeader : array of char); overload; stdcall;

  exports SetColumnInfo (const dialogID     : cardinal;
                         const controlID    : cardinal;
                         const columnIndex  : cardinal;
                         const columnWidth  : cardinal;
                         const columnAlign  : AlignmentType;
                         const columnHeader : array of char) name 'CtrlLV_SetColumnInfo';

  //*
  //  SetColumnInfo - set the current column header text.
  //
  //  This routine is called in response to the GetColumnInfo message. The
  //  user should first call GetRowCol to determine the columnIndex
  //  and then call this routine with that value and its header text
  //  (columnHeader). columnWidth is the width that you want the column to
  //  be, in average characters. columnAlign specifies Left, Center, or Right
  //  alignment of both the header and data.
  //
  //  CALLING SEQUENCE -
  //
  //    SetColumnInfo (dialogID, controlID. columnIndex, columnWidth,
  //                   columnAlign, columnHeader)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    columnIndex : CARDINAL
  //      The header column (1 .. n)
  //
  //    columnWidth : CARDINAL
  //      The number of average characters wide to make the column.
  //
  //    columnAlign : AlignmentType
  //      Left, Center, or Right justification of the column header and data.
  //




  procedure SetColumnInfo
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const columnIndex  : cardinal;
              const columnWidth  : cardinal;
              const columnAlign  : AlignmentType;
              const columnHeader : string); overload; stdcall;

  exports SetColumnInfo (const dialogID     : cardinal;
                         const controlID    : cardinal;
                         const columnIndex  : cardinal;
                         const columnWidth  : cardinal;
                         const columnAlign  : AlignmentType;
                         const columnHeader : string) name 'CtrlLV_STRSetColumnInfo';

  //*
  //  STRSetColumnInfo - See documentation of SetColumnInfo.
  //




  procedure SetImageCount
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Count     : cardinal); stdcall;

  exports SetImageCount name 'CtrlLV_SetImageCount';

  //*
  //  SetImageCount - tell the list view how many different images will be referred to.
  //
  //  This routine is called in response to the GetImageCount message.  Each row in the ListView
  //  can have an Icon (image) set in the first column.  The icon is set when the user calls the
  //  SetItemText in response to the GetItemInfo message.
  //
  //  CALLING SEQUENCE -
  //
  //    SetImageCount (dialogID, controlID, count)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    count : CARDINAL
  //      The number of different images (icons) to be used.
  //




  procedure GetImageIndex
             (const msgData : pointer;
              var   idx     : cardinal); stdcall;

  exports GetImageIndex name 'CtrlLV_GetImageIndex';

  //*
  //  GetImageIndex - get the requested index position from the ActionProc.
  //
  //  This routine is called in response to the GetImageInfo message.
  //  It will return the index of the image info wanted by the list.
  //  The programmer can then set the associated resource image id by
  //  calling SetImageInfo.
  //
  //  CALLING SEQUENCE -
  //
  //    GetImageIndex (msgData, str)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    idx : CARDINAL
  //      The 1 relative requested index to "assign" an image (icon) id.
  //




  procedure SetImageInfo
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const imageID    : cardinal;
              const imageIndex : cardinal); stdcall;

  exports SetImageInfo name 'CtrlLV_SetImageInfo';

  //*
  //  SetImageInfo - add the resource image id to the list view image index.
  //
  //  This routine is called in response to the GetImageInfo message. The
  //  user should first call GetImageIndex to determine the 1 relative
  //  image index to set, and then call this procedure to set the associated
  //  image resource id.  Thereafter, (in SetItemText) the image must be
  //  referred to by this indexIndex.
  //
  //  CALLING SEQUENCE -
  //
  //    SetImageInfo (dialogID, controlID. imageID, imageIndex)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    imageID : CARDINAL
  //      resource id of the (32x32) icon to put in the image list.
  //
  //    imageIndex : CARDINAL
  //      The 1 relative index to refer to the imageID as in the future.
  //




  procedure SetItemRange
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Count     : cardinal); stdcall;

  exports SetItemRange name 'CtrlLV_SetItemRange';

  //*
  //  SetItemRange - tell the list view how many items (rows) of data are in the list.
  //
  //  This routine is called in response to the GetItemCount message.
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemRange (dialogID, controlID, count)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    count : CARDINAL
  //      The total number of data items (rows)
  //




  procedure NextMarked
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const startPos  : cardinal;
              const state     : cardinal;
              var   markedRow : cardinal); stdcall;

  exports NextMarked name 'CtrlLV_NextMarked';

  //*
  //  NextMarked - get the next marked row.
  //
  //  CALLING SEQUENCE -
  //
  //    NextMarked (dialogID, controlID, startPos, state, markedRow)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    startPos : CARDINAL
  //      The position to begin looking for a marked item
  //
  //    state : CARDINAL
  //      The state to match to get the next marke row.  If state = 0 then the
  //      returned value will be the next row that has a state other than 0.  If
  //      state > 0 then the returned value will be the next row that has a state
  //      the same as the one requested.
  //
  //  EXIT -
  //
  //    markedRow : CARDINAL
  //      The 1 relative row index of the first marked item starting
  //      from (and including) startPos.
  //




  procedure ToggleState
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal); stdcall;

  exports ToggleState name 'CtrlLV_ToggleState';

  //*
  //  ToggleState - Toggles the state of an item.
  //
  //  Toggles the state of an item.  Increments the state
  //  of the rowIndex.  If incremented state is greater
  //  than the number of states requested (see SetTotalStates)
  //  then the state will be set to 0.
  //
  //  CALLING SEQUENCE -
  //
  //    ToggleMark (dialogID, controlID, rowIndex)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowIndex : CARDINAL
  //      The 1 relative index of the row to toggle
  //




  function TotalMarked
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const state     : cardinal) : cardinal; stdcall;

  exports TotalMarked name 'CtrlLV_TotalMarked';

  //*
  //  TotalMarked - returns total marked rows.
  //
  //  CALLING SEQUENCE -
  //
  //    totalMarked := TotalMarked (dialogID, controlID, state)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    state : CARDINAL
  //      The state to get total of.
  //
  //  EXIT -
  //
  //    totalMarked : CARDINAL
  //      number of items marked in the list. If state = 0 then the returned
  //      value will be the total rows that have a state other than 0.  If
  //      state > 0 then the returned value will be the total rows that have
  //      a state the same as the one requested.
  //




  function IsItemMarked
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const state     : cardinal) : boolean; stdcall;

  exports IsItemMarked name 'CtrlLV_IsItemMarked';

  //*
  //  IsItemMarked - test a row to determine mark status.
  //
  //  CALLING SEQUENCE -
  //
  //    marked := IsItemMarked (dialogID, controlID, rowIndex, state)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowIndex : CARDINAL
  //      The 1 relative index of the row to mark
  //
  //    state : CARDINAL
  //      The state to check against.
  //
  //  EXIT -
  //
  //    marked : BOOLEAN
  //      If state = 0 then the returned value will be TRUE if the row has
  //      a state other than 0.  If state > 0 then the returned value will
  //      be TRUE if the row has a state the same as the one requested.
  //      Otherwise FALSE will be returned.
  //




  procedure SetIconMarkingMode
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const turnOn    : boolean); stdcall;

  exports SetIconMarkingMode name 'CtrlLV_SetIconMarkingMode';

  //*
  //  SetIconMarkingMode - Sets the control to act like the Windows NT Setup screen.
  //
  //  If turnOn is set to TRUE then the only time you receive an indexChange message
  //  is when the user clicks on the ICON in the first column.  This also toggles the
  //  mark status of the row.  If any other place on the row is clicked the row will
  //  be highlighted but the mark status is not toggled.  This is normally called during
  //  the Dialog.Initialize message, however it may also be called in response to any ListView
  //  control message.
  //
  //  CALLING SEQUENCE -
  //
  //    SetIconMarkingMode (dialogID, controlID, turnOn)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    turnOn : BOOLEAN
  //      TRUE - sets control.
  //      FALSE - unsets control.
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




  procedure GetControlSize
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   numChars  : cardinal;
              var   NumRows   : cardinal); stdcall;

  exports GetControlSize name 'CtrlLV_GetControlSize';

  //*
  //  GetControlSize - Returns the number of characters that will fit into the control.
  //
  //  This procedure is used to get the number of average characters
  //  wide and number of visible rows of the control.  If this procedure
  //  is called during a GetColumnInfo or GetColumnCount message the numRows
  //  parameter may have a larger number than what actually shows in the
  //  control.  The control first send the GetColumnInfo and GetColumnCount
  //  messages first and the vert. scroll bar has not been set in place until
  //  after these two messages are completed.  If all of the columns do not fit
  //  into the viewable area of the control then a vert. scrollbar is then put
  //  up and the number of rows will be decrimented by as many as 2 rows.  For
  //  this reason you may want to call GetControlSize a second time (like during
  //  the Range message) to get the actual number of rows visible.  The number
  //  of visible rows can also be changed during the stretching of column headers
  //  so make sure that you call this procedure at the appropriate places.
  //
  //  CALLING SEQUENCE -
  //
  //    GetControlSize (dialogID, controlID, numChars, numRows)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    numChars : CARDINAL
  //      Number of characters that will fit into the width of the control.
  //
  //    numRows : CARDINAL
  //      Number of rows that will fit into the control.
  //




  procedure SetColor
             (const textColor  : LVColorType;
              const bkGndColor : LVColorType); stdcall;

  exports SetColor name 'CtrlLV_SetColor';

  //*
  //  SetColor - set the color of the current "cell" (row, col).
  //
  //  This routine is called in response to the GetItemInfo message. The
  //  user can call GetRowCol to determine the rowIndex and colIndex.
  //  Valid colors can be any of the color constants included above, or
  //  a windows Windows.COLORREF.  This should be called before the SetItemText
  //  call is made.
  //
  //  CALLING SEQUENCE -
  //
  //    SetColor (textColor, bkGndColor)
  //
  //  ENTRY -
  //
  //    textColor : LVColorType
  //      The color of the text of the current row, col
  //
  //    bkGndColor : LVColorType
  //      The color of the background of the text of the current row, col
  //




  function ColumnSize
             (const dialogID     : cardinal;
              const controlID    : cardinal;    // LISTVIEW ID
              const columnNumber : cardinal) : cardinal; stdcall;

  exports ColumnSize name 'CtrlLV_ColumnSize';

  //*
  //  ColumnSize - get the current size, in average characters of the specified column.
  //
  //  This routine returns the current size, in average characters, of
  //  the requested column.
  //
  //  CALLING SEQUENCE -
  //
  //    ColumnSize (dialogID, controlID, columnNumber)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    columnNumber : CARDINAL
  //      The 1 relative column to find the current size of
  //
  //  EXIT -
  //
  //    columnSize : CARDINAL
  //      The
  //




  procedure GetRowCol
             (const msgData : pointer;
              var   row     : cardinal;
              var   col     : cardinal); stdcall;

  exports GetRowCol name 'CtrlLV_GetRowCol';

  //*
  //  GetRowCol - Retrieves the row and col index of the current item.
  //
  //  This routine is called in response to a GetDataInfo or GetColumnInfo
  //  message. It returns the requested row, col (for GetDataInfo) or
  //  col (row is ignored for GetColumnInfo).
  //
  //  CALLING SEQUENCE -
  //
  //    GetRowCol (msgData, row, col)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    row : CARDINAL
  //      The current row index (1 .. n)
  //
  //    col : CARDINAL
  //      The current column index (1 .. m)
  //




  procedure GetColClicked
             (const msgData : pointer;
              var   col     : cardinal); stdcall;

  exports GetColClicked name 'CtrlLV_GetColClicked';

  //*
  //  GetColClicked - Returns the column clicked on.
  //
  //  This procedure is called in response to a ColumnClick message.
  //  It returns the 1 relative column the user just clicked on.  THe
  //  programmer can use this information to perform a sort or other programmer
  //  defined operation.
  //
  //  CALLING SEQUENCE -
  //
  //    GetColClicked (msgData, col)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    col : CARDINAL
  //      The 1 relative column clicked on.
  //




  procedure GetHDC
             (const msgData : pointer;
              var   Hdc     : Windows.Hdc;
              var   RECT    : Windows.TRect); stdcall;

  exports GetHDC name 'CtrlLV_GetHDC';

  //*
  //  GetHDC - Retrieves the hdc of the current item.
  //
  //  This routine is called in response to a GetItemPicture
  //  message. It returns the current hdc for the current cell.
  //
  //  CALLING SEQUENCE -
  //
  //    GetHDC (msgData, hdc, rect)
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    hdc : Windows.HDC
  //      The current cell's device context.
  //
  //    rect : Windows.TRECT
  //      Logical rectangle of cell to write to.
  //




  procedure InsertColumn
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const columnPos : cardinal); stdcall;

  exports InsertColumn name 'CtrlLV_InsertColumn';

  //*
  //  InsertColumn - add a new column of data.
  //
  //  This routine is called to add a new column to the list. If columnPos
  //  is less than or equal to the number of existing columns, then the
  //  old columnPos will be moved one to the right.
  //
  //  CALLING SEQUENCE -
  //
  //    InsertColumn (dialogID, controlID, columnPos)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    columnPos : CARDINAL
  //      The new column position (1 .. n+1)
  //




  procedure DeleteColumn
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const columnPos : cardinal); stdcall;

  exports DeleteColumn name 'CtrlLV_DeleteColumn';

  //*
  //  DeleteColumn - add a new column of data.
  //
  //  This routine is called to remove a column from the list.
  //
  //  CALLING SEQUENCE -
  //
  //    DeleteColumn (dialogID, controlID, columnPos)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    columnPos : CARDINAL
  //      The column position (1 .. n) to remove.
  //




  procedure ShowOnlyMarked
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const markedOnly : boolean;
              const state      : cardinal); stdcall;

  exports ShowOnlyMarked name 'CtrlLV_ShowOnlyMarked';

  //*
  //  ShowOnlyMarked - Show only marked items.
  //
  //  This routine is called as a toggle to show only marked items
  //  or all items.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowOnlyMarked (dialogID, controlID, TRUE, astate)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    markedOnly : BOOLEAN
  //      If set to TRUE then only marked items will show in list.
  //      If set to FALSE then all items will show in list.
  //
  //    state : CARDINAL
  //      The state of the items to show (only used if markedOnly set to TRUE).
  //      If the state is 0 then all non-zero items will be shown.  If state is
  //      greater than 0 then only those items with that state will be shown.
  //




  function GetCurrentPosition
             (const dialogID  : cardinal;
              const controlID : cardinal) : cardinal; stdcall;

  exports GetCurrentPosition name 'CtrlLV_GetCurrentPosition';

  //*
  //  GetCurrentPosition - get current position in list.
  //
  //  This routine is called to get the current row in a list.  This is normally
  //  the row that has the selection box around it (the row with the dashed box).
  //
  //  CALLING SEQUENCE -
  //
  //    cPos := GetCurrentPosition (dialogID, controlID);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    currentPosition : CARDINAL
  //      The current position in the list.
  //




  procedure GetHighlightedPosition
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   row       : cardinal;
              var   column    : cardinal); stdcall;

  exports GetHighlightedPosition name 'CtrlLV_GetHighlightedPosition';

  //*
  //  GetHighlightedPosition - get current row and column position in list.
  //
  //  This routine is called to get the current row and column in a list.  This is normally
  //  the row that has the selection box around it (the row with the dashed box).
  //
  //  CALLING SEQUENCE -
  //
  //    GetHighlightedPosition (dialogID, controlID, row, column);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //  EXIT -
  //
  //    row : CARDINAL
  //      The current position in the list.
  //
  //    column : CARDINAL
  //      The current column position.
  //




  procedure SetHighlightedPosition
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const row       : cardinal;
              const column    : cardinal); stdcall;

  exports SetHighlightedPosition name 'CtrlLV_SetHighlightedPosition';

  //*
  //  SetHighlightedPosition - Sets current row and column position in list.
  //
  //  This routine is called to set the current row and column in a list.  This is normally
  //  the row that has the selection box around it (the row with the dashed box).
  //
  //  CALLING SEQUENCE -
  //
  //    SetHighlightedPosition (dialogID, controlID, row, column);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    row : CARDINAL
  //      The current position in the list.
  //
  //    column : CARDINAL
  //      The current column position.
  //




  procedure SetSelectStyle
             (const dialogID       : cardinal;
              const controlID      : cardinal;
              const doSingleSelect : boolean); stdcall;

  exports SetSelectStyle name 'CtrlLV_SetSelectStyle';

  //*
  //  SetSelectStyle - Set if want to do single or multiple selection.
  //
  //  This routine is called to set the selection style of a listview control.
  //  This clear all modes that were previously set (ie. SetIconMarkingMode).
  //  These will need to be reset if they are needed.
  //
  //  CALLING SEQUENCE -
  //
  //    SetSelectStyle (dialogID, controlID, FALSE);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    doSingleSelect : BOOLEAN
  //      TRUE  - control does single selection
  //      FALSE - control doew multiple selection
  //




  procedure GetDefaultColors
             (var   HText : LVColorType;
              var   HBg   : LVColorType;
              var   NText : LVColorType;
              var   NBg   : LVColorType); stdcall;

  exports GetDefaultColors name 'CtrlLV_GetDefaultColors';

  //*
  //  GetDefaultColors - Get System default colors for the listview control.
  //
  //  This routine is called to get System default colors for the listview control.
  //
  //  CALLING SEQUENCE -
  //
  //    GetDefaultColors (HText, HBg, NText, NBg);
  //
  //  ENTRY -
  //
  //    None
  //      N/A
  //
  //  EXIT -
  //
  //    HText : LVColorType
  //      Highlight text color (foreground)
  //
  //    HBg : LVColorType
  //      Highlight background color
  //
  //    NText : LVColorType
  //      Normal text color (foreground)
  //
  //    NBg : LVColorType
  //      Normal background color
  //




  procedure SetTotalStates
             (const dialogID       : cardinal;
              const controlID      : cardinal;
              const numberOfStates : cardinal); stdcall;

  exports SetTotalStates name 'CtrlLV_SetTotalStates';

  //*
  //  SetTotalStates - Sets the number of states that an item can have assigned to it.
  //
  //  This routine is called to set the number of states of an item.  Only call this
  //  if you want to have more than 2 states (the default is 2 states).  If
  //  numberOfStates > 2 then the IconMarkingMode will automatically be set to TRUE,
  //  meaning that an item changes state only when the item's icon is pressed.
  //
  //  CALLING SEQUENCE -
  //
  //    SetTotalStates (dialogID, controlID, numberOfStates);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    numberOfStates : CARDINAL
  //      The number of states that are needed for an item.
  //




  procedure GetItemState
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              var   state     : cardinal); stdcall;

  exports GetItemState name 'CtrlLV_GetItemState';

  //*
  //  GetItemState - Gets the state of selected item.
  //
  //  This routine is called to get the state of an item.
  //
  //  CALLING SEQUENCE -
  //
  //    GetItemState (dialogID, controlID, item, state);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowIndex : CARDINAL
  //      The item number you are requesting the state of.
  //
  //  EXIT -
  //
  //    state : CARDINAL
  //      The state of the item requested.
  //




  procedure SetItemState
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const state     : cardinal); stdcall;

  exports SetItemState name 'CtrlLV_SetItemState';

  //*
  //  SetItemState - Sets the state of selected item.
  //
  //  This routine is called to set the state of an item.
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemState (dialogID, controlID, item, state);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    rowIndex : CARDINAL
  //      The item (row) number you are setting the state of.
  //
  //    state : CARDINAL
  //      The state of the item to set (0 .. n).
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




  procedure SetAllItemStates
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const state     : cardinal); stdcall;

  exports SetAllItemStates name 'CtrlLV_SetAllItemStates';

  //*
  //  SetAllItemStates - sets the state of all rows to the state requested (0 .. n).
  //
  //  CALLING SEQUENCE -
  //
  //    MarkAllItems (dialogID, controlID, state)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    state : CARDINAL
  //      The state to set all rows to.
  //




  procedure SetState
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const state     : cardinal); stdcall;

  exports SetState name 'CtrlLV_SetState';

  //*
  //  SetState - Sets the state to check against.
  //
  //  Sets the state to check against when the user presses
  //  the Ctrl-A (MarkAll) or the Ctrl-C (CopytoClipboard).
  //
  //  CALLING SEQUENCE -
  //
  //    SetState (dialogID, controlID, state)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    state : CARDINAL
  //      The state to set for marking all (Ctrl-A) or copying to Clipboard (Ctrl-C).
  //




  procedure DummyCharValidateProc
             (var   ACHAR : char;
              var   valid : boolean); stdcall;

  exports DummyCharValidateProc name 'CtrlLV_DummyCharValidateProc';

  //*
  //  DummyCharValidateProc - Empty (dummy) char validation proc.
  //
  //  The user may use this for a default character validation
  //  procedure when calling the EditCell procedure.  If this procedure
  //  is called then all characters will be valid and all characters
  //  will be shown as typed.
  //
  //  CALLING SEQUENCE -
  //
  //    This is for use when using the EditCell procedure.
  //
  //  ENTRY -
  //
  //    aChar : CHAR
  //      The character that was pressed
  //
  //  EXIT -
  //
  //    aChar : CHAR
  //      The character that the user wants shown
  //
  //    valid : BOOLEAN
  //      TRUE - if character is valid.
  //      FALSE - if character is not valid (the character will not be displayed)
  //




  procedure EditCell
             (const msgData        : pointer;
              const row            : cardinal;
              const column         : cardinal;
              const totChars       : cardinal;
              const Data           : array of char;
              const upperCase      : boolean;
              const validationProc : CharIsValidType); overload; stdcall;

  exports EditCell (const msgData        : pointer;
                    const row            : cardinal;
                    const column         : cardinal;
                    const totChars       : cardinal;
                    const Data           : array of char;
                    const upperCase      : boolean;
                    const validationProc : CharIsValidType) name 'CtrlLV_EditCell';

  //*
  //  EditCell - Edits a cell (row, col) on the ListView control.
  //
  //  This procedure is called when a user wishes to edit a cell (row, col)
  //  in a ListView control.  This may be called anytime after the control
  //  has been initialized.  Under normal circumstances the user would call
  //  this in response to a Click or DoubleClick message and would call
  //  GetRowCol to get the row and column to edit.
  //
  //  CALLING SEQUENCE -
  //
  //    EditCell (msgData, row, col, 20, "abc", FALSE, DummyCharValidateProc);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    row : CARDINAL
  //      The 1 relative row to edit.
  //
  //    col : CARDINAL
  //      The 1 relative column to edit.
  //
  //    totChars : CARDINAL
  //      The number of characters that may be input in the edit.
  //      (if more than totChars are entered then those > totChars
  //         will be dicarded)
  //
  //    data : ARRAY OF CHAR
  //      The initial data to edit. (this could be the original data that
  //      was in the cell (row, col)
  //
  //    upperCase : BOOLEAN
  //      TRUE  - All characters entered will be capitalized.
  //      FALSE - All characters show as typed.
  //
  //    validationProc : CharIsValidType
  //      The procedure to use for character validation.  DummyCharValidateProc
  //      can be used if no validation is required.  (see details of
  //      DummyCharValidateProc for more information)
  //




  procedure EditCell
             (const msgData        : pointer;
              const row            : cardinal;
              const column         : cardinal;
              const totChars       : cardinal;
              const Data           : string;
              const upperCase      : boolean;
              const validationProc : CharIsValidType); overload; stdcall;

  exports EditCell (const msgData        : pointer;
                    const row            : cardinal;
                    const column         : cardinal;
                    const totChars       : cardinal;
                    const Data           : string;
                    const upperCase      : boolean;
                    const validationProc : CharIsValidType) name 'CtrlLV_STREditCell';

  //*
  //  STREditCell - See documentation of EditCell.
  //




  procedure GetEditExitFunction
             (const msgData      : pointer;
              var   exitFunction : cardinal); stdcall;

  exports GetEditExitFunction name 'CtrlLV_GetEditExitFunction';

  //*
  //  GetEditExitFunction - Gets the keystroke that caused the edit cell to terminate on the ListView control.
  //
  //  This procedure is called when a user wishes to know why the celledit was exited
  //  in a ListView control.  This may be called anytime after the control
  //  has been initialized.  Under normal circumstances the user would call
  //  this in response to a Exit message.
  //
  //  CALLING SEQUENCE -
  //
  //    GetEditExitFunction (msgData, exitFunc);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    exitFunction : CARDINAL
  //      The key value hit that caused the edit cell to terminate.
  //
  //  EXIT -
  //
  //    None
  //      N/A
  //




  procedure DataIsInvalid
             (const msgData : pointer); stdcall;

  exports DataIsInvalid name 'CtrlLV_DataIsInvalid';

  //*
  //  DataIsInvalid - States that the value from an edit is invalid.
  //
  //  This procedure is called when a value from an edit is not valid and
  //  the user wishes to stay in the edit mode.  This call is only valid
  //  when the ValidateValue message is sent.
  //
  //  CALLING SEQUENCE -
  //
  //    DataIsInvalid (msgData);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //




  procedure GetValidationStr
             (const msgData : pointer;
              var   Str     : array of char); overload; stdcall;

  exports GetValidationStr (const msgData : pointer;
                            var   Str     : array of char) name 'CtrlLV_GetValidationStr';

  //*
  //  GetValidationStr - Returns the string from the ListView edit control.
  //
  //  This procedure is called when the ListView edit control is ready to
  //  loose focus and the ValidateValue message has been received.  It will
  //  return the value entered in the ListView edit control.
  //
  //  CALLING SEQUENCE -
  //
  //    GetValidationStr (msgData, tStr);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    str : ARRAY OF CHAR
  //      The value that is in the ListView edit control.
  //




  procedure GetValidationStr
             (const msgData : pointer;
              var   Str     : string); overload; stdcall;

  exports GetValidationStr (const msgData : pointer;
                            var   Str     : string) name 'CtrlLV_STRGetValidationStr';

  //*
  //  STRGetValidationStr - See documentation of GetValidationStr.
  //




  procedure EndEdit
             (const msgData : pointer); stdcall;

  exports EndEdit name 'CtrlLV_EndEdit';

  //*
  //  EndEdit - Calling this procedure will exit the ListView edit control.
  //
  //  This procedure should only be called when you wish to stop the edit
  //  with validation.  When called this procedure closes the ListView
  //  edit control and imediately returns focus to the ListView control.
  //
  //  CALLING SEQUENCE -
  //
  //    EndEdit (msgData);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //




  procedure KillEdit
             (const msgData : pointer); stdcall;

  exports KillEdit name 'CtrlLV_KillEdit';

  //*
  //  KillEdit - Calling this procedure will exit the ListView edit control.
  //
  //  This procedure should only be called when you wish to stop the edit
  //  without validation.  When called this procedure closes the ListView
  //  edit control and imediately returns focus to the ListView control.
  //
  //  CALLING SEQUENCE -
  //
  //    KillEdit (msgData);
  //
  //  ENTRY -
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    NONE
  //      N/A
  //




  procedure SetHighlighting
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const highlight  : boolean;
              const columnOnly : boolean); stdcall;

  exports SetHighlighting name 'CtrlLV_SetHighlighting';

  //*
  //  SetHighlighting - sets the highlighting of a ListView control.
  //
  //  This procedure is called only if you wish to show highlighting on a cell, or
  //  have no highlighting.  The default values when the control is initialized is
  //  highlight = TRUE and columnOnly = FALSE.
  //
  //  CALLING SEQUENCE -
  //
  //    SetHighlighting (dialogID, controlID, highlight, columnOnly)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    highlight : BOOLEAN
  //      TRUE  - highlighting will be turned on.
  //      FALSE - no highlighting will be performed.
  //
  //    columnOnly : BOOLEAN
  //      TRUE  - only highlighting in a column will be turned on.
  //                (This is only valid if highlight is set to TRUE)
  //      FALSE - complete row will be highlighted.
  //




  procedure SetStriping
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const stripeOn  : boolean;
              const ODD       : boolean); stdcall;

  exports SetStriping name 'CtrlLV_SetStriping';

  //*
  //  SetStriping - sets the striping of a ListView control.
  //
  //  This procedure is called only if you wish to show striping on odd or even lines
  //  of data.  The default values when the control is initialized is
  //  striping is off.
  //
  //  CALLING SEQUENCE -
  //
  //    SetStriping (dialogID, controlID, stripeOn, odd)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    stripeOn : BOOLEAN
  //      TRUE  - Striping will be turned on.
  //      FALSE - striping will be turned off.
  //
  //    odd : BOOLEAN
  //      TRUE  - striping will be on odd rows.
  //      FALSE - striping will be on even rows.
  //




  procedure SetCurrentRow
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const row       : cardinal); stdcall;

  exports SetCurrentRow name 'CtrlLV_SetCurrentRow';

  //*
  //  SetCurrentRow - sets the current row of a ListView control.
  //
  //  This procedure is called to set the current row of a ListView control.
  //  The current row is defined as the row with the dashed border around it.
  //  This procedure does not need to be called under normal conditions.  One
  //  reason to call this procedure is to set the current row in the middle of
  //  the rows showing in the listview after doing a Reset.  If row is outside
  //  of the range of rows being displayed then nothing will be done.   This
  //  procedure will do nothing when control is in showMarkedOnly mode.
  //
  //  CALLING SEQUENCE -
  //
  //    SetCurrentRow (dialogID, controlID, row)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    row : CARDINAL
  //      The row to set as the current row. (The one with the dashed border)
  //




  procedure GetAverageCharWidth
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const testStr      : array of char;
              var   AvgCharWidth : cardinal); overload; stdcall;

  exports GetAverageCharWidth (const dialogID     : cardinal;
                               const controlID    : cardinal;
                               const testStr      : array of char;
                               var   AvgCharWidth : cardinal) name 'CtrlLV_GetAverageCharWidth';

  //*
  //  GetAverageCharWidth - Gets number of average chars required to display the testStr.
  //
  //  This procedure is called to get the number of average characters (in a particular
  //  controls font) required to display the testStr.
  //
  //  CALLING SEQUENCE -
  //
  //    GetAverageCharWidth (dialogID, controlID, "ABC", avgcharWidth)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    testStr : ARRAY OF CHAR
  //      The string to test for average character width.
  //
  //  EXIT -
  //
  //    avgCharWidth - CARDINAL
  //      The number of average characters required to display the testStr.
  //




  procedure GetAverageCharWidth
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const testStr      : string;
              var   AvgCharWidth : cardinal); overload; stdcall;

  exports GetAverageCharWidth (const dialogID     : cardinal;
                               const controlID    : cardinal;
                               const testStr      : string;
                               var   AvgCharWidth : cardinal) name 'CtrlLV_STRGetAverageCharWidth';

  //*
  //  STRGetAverageCharWidth - See documentation of GetAverageCharWidth.
  //




  function GetItemNumber
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowPos    : cardinal) : cardinal; stdcall;

  exports GetItemNumber name 'CtrlLV_GetItemNumber';




  procedure SetItemNumber
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const rowPos     : cardinal;
              const itemNumber : cardinal); stdcall;

  exports SetItemNumber name 'CtrlLV_SetItemNumber';




  procedure SetMarkCursor
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const cursorID  : cardinal); stdcall;

  exports SetMarkCursor name 'CtrlLV_SetMarkCursor';




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

  exports UnSetMarkCursor name 'CtrlLV_UnSetMarkCursor';




  procedure SetItemVisible
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const itemNumber : cardinal); stdcall;

  exports SetItemVisible name 'CtrlLV_SetItemVisible';




  procedure SetViewKind
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const listViewKind : ListViewType); stdcall;

  exports SetViewKind name 'CtrlLV_SetViewKind';




  procedure SetDragging
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const dragItems : boolean); stdcall;

  exports SetDragging name 'CtrlLV_SetDragging';




  procedure ShowIcon
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const iconID    : integer;
              const ix        : integer;
              const iy        : integer;
              const iw        : integer;
              const ih        : integer); stdcall;

  exports ShowIcon name 'CtrlLV_ShowIcon';




  procedure SetItemFont
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const inFont    : Windows.HFONT); stdcall;

  exports SetItemFont name 'CtrlLV_SetItemFont';

  //*
  //  SetItemFont - Sets the font of an Item or a cell.
  //
  //  This procedure should be called directly after the GetCellFont message is sent.
  //  This function allows the user to set the font of the cell that is to be written
  //  next.
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemFont (dialogID, controlID, inFont)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    inFont : Windows.HFONT
  //      an HFONT structure containing the desired font of the cell that is to be written
  //      next
  //




  procedure SetItemFontColor
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const inColor   : Windows.COLORREF); stdcall;

  exports SetItemFontColor name 'CtrlLV_SetItemFontColor';

  //*
  //  SetItemFontColor - Sets the color of an Item or a cell.
  //
  //  This procedure should be called directly after the GetCellFont message is sent.
  //  This function allows the user to set the color of the cell text next to be written
  //
  //  CALLING SEQUENCE -
  //
  //    SetItemFontColor (dialogID, controlID, inColor)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    inColor : Windows.COLORREF
  //      a COLORREF to determine the desired font color of the cell next to be written
  //




  procedure SetHeaderFont
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const newFont   : Windows.HFONT); stdcall;

  exports SetHeaderFont name 'CtrlLV_SetHeaderFont';

  //*
  //  SetHeaderFont - Sets the Font of the header for the list view.
  //
  //  This procedure can be called at any time to change the font of the headers of the
  //  listview.  CtrlLV.ResetColumns should be called after this to make the changes
  //  visible
  //
  //  CALLING SEQUENCE -
  //
  //    SetHeaderFont (dialogID, controlID, newFont)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    newFont : Windows.HFONT
  //      the structure containing the desired font for the headers
  //




  procedure CurrentFont
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   FontName  : array of char;
              var   Success   : boolean); overload; stdcall;

  exports CurrentFont (const dialogID  : cardinal;
                       const controlID : cardinal;
                       var   FontName  : array of char;
                       var   Success   : boolean) name 'CtrlLV_CurrentFont';

  //*
  //  SetItemFontColor - Sets the color of an Item or a cell.
  //
  //  This procedure can be used when the listveiw is first created to determine the
  //  default font used.
  //
  //  CALLING SEQUENCE -
  //
  //    CurrentFont (dialogID, controlID, fontName, Success)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    fontName : ARRAY OF CHAR
  //      Name of the font.
  //
  //  EXIT -
  //
  //    Success : BOOLEAN
  //      TRUE - if the font name was retrieved.
  //      FALSE - could not get the font name.
  //




  procedure CurrentFont
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   FontName  : string;
              var   Success   : boolean); overload; stdcall;

  exports CurrentFont (const dialogID  : cardinal;
                       const controlID : cardinal;
                       var   FontName  : string;
                       var   Success   : boolean) name 'CtrlLV_STRCurrentFont';

  //*
  //  STRSetItemFontColor - See documentation of CurrentFont.
  //




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

  exports TurnOnDotDotDot name 'CtrlLV_TurnOnDotDotDot';

  //*
  //  TurnOnDotDotDot - Turns on the dot dot dot feature.
  //
  //  This is the default and only needs to be called if the dot dot dot feature is
  //  desired after it has been turned off.
  //
  //  CALLING SEQUENCE -
  //
  //    TurnOnDotDotDot (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //




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

  exports TurnOffDotDotDot name 'CtrlLV_TurnOffDotDotDot';

  //*
  //  TurnOffDotDotDot - Turns off the dot dot dot feature.
  //
  //  The default is to have this feature on.  One possible use for this is if different
  //  fonts are used in the listview this may cause the dot dot dot feature to work
  //  improperly
  //
  //  CALLING SEQUENCE -
  //
  //    TurnOffDotDotDot (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //




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

  exports HideGridlines name 'CtrlLV_HideGridlines';

  //*
  //  HideGridlines - Turns off the gridlines if they are currently in use.
  //
  //  The default is to have gridlines off.
  //
  //  CALLING SEQUENCE -
  //
  //    HideGridlines (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //




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

  exports ShowGridlines name 'CtrlLV_ShowGridlines';

  //*
  //  ShowGridlines - Turns on the gridline feature if it is currently not in use.
  //
  //  The default is to have gridlines off.
  //
  //  CALLING SEQUENCE -
  //
  //    ShowGridlines (dialogID, controlID)
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //




  procedure CalculateTopRow
             (const dialogID      : cardinal;
              const controlID     : cardinal;
              const FirstRecord   : cardinal;
              const LastRecord    : cardinal;
              const DesiredRecord : cardinal;
              var   topRow        : cardinal); stdcall;

  exports CalculateTopRow name 'CtrlLV_CalculateTopRow';

  //*
  //  CalculateTopRow - Calculate which record should be the new top row.
  //
  //  This routine calculates which record needs to be requested as the new
  //  top row in order to scroll a desired record into the approximate middle
  //  of the visible list of items.  The Reset procedure of the ListView control
  //  takes as it argument the value of TopRow to be the first record showing on
  //  the top of the list.  What this routine does is to help you calculate which
  //  record should be requested in order to make the record that you want to
  //  appear in the middle of the screen be in the correct position.
  //
  //  All the data necessary to do this calculation is available to you by using a
  //  combination of the other calls provided in this package.  This routine is
  //  provided to you as a convenience to eliminate that effort on your part.
  //
  //  CALLING SEQUENCE -
  //
  //    CalculateTopRow (dialogID, controlID, FirstRecord,
  //                     LastRecord, DesiredRecord, TopRow);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    FirstRecord : CARDINAL
  //      The number of the first record you are listing (you might be showing only
  //      a subset of the entire records so this may not always be 1).
  //
  //    LastRecord : CARDINAL
  //      The number of the last record you are listing (you might be showing only
  //      a subset of the entire records so this may not always be N).
  //
  //    DesiredRecord : CARDINAL
  //      The number of the desired record.  This a number within the range
  //      FirstRecord <= DesiredRecord >= LastRecord.
  //
  //  EXIT -
  //
  //    TopRow : CARDINAL
  //      The value to send to the Reset procedure in order to get the DesiredRecord
  //      visible in the middle of the screen if possible.
  //
  //  EXAMPLE -
  //
  //    This routine would typically be used in conjuction with the AdjustAndHighlight
  //    and ResetAndHighlight routines.
  //
  //      CtrlLV.CalculateTopRow (ObjDialog.ReturnUniqueId (DataHandle),
  //                              MyRes.LVW_My_ListView,
  //                              1,
  //                              Sage.TotalRecords ("MyRel"),
  //                              DesiredRecord,
  //                              TopRow);
  //
  //      CtrlLV.ResetAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
  //                                   MyRes.LVW_My_ListView,
  //                                   TopRow,
  //                                   DesiredRow,
  //                                   DesiredState);
  //




  procedure AdjustAndHighlightRow
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const topRow       : cardinal;
              const DesiredRow   : cardinal;
              const DesiredState : cardinal); stdcall;

  exports AdjustAndHighlightRow name 'CtrlLV_AdjustAndHighlightRow';

  //*
  //  AdjustAndHighlightRow - Adjust to show desired row in middle of the control.
  //
  //  This routine adjust the ListView control to bring a desired record into the
  //  middle of the control and Highlight it.  This routine would typically be
  //  called in the Initialize message of the ActionProc to adjust the desired
  //  record into view.  This routine does this without doing a complete reset
  //  of the control.
  //
  //  All the routines necessary to accomplish this task are available to you by
  //  using a combination of the other calls provided in this package.  This
  //  routine is provided to you as a convenience to eliminate that effort on your
  //  part.
  //
  //  CALLING SEQUENCE -
  //
  //    AdjustAndHighlightRow (dialogID, controlID, TopRow,
  //                           DesiredRow, DesiredState);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    TopRow : CARDINAL
  //      The number of the record to be displayed as the top row of visible
  //      data.
  //
  //    DesiredRow : CARDINAL
  //      The number of the desired record.  This is the record that you want to
  //      be as close to the center of the list of data as possible.  This record
  //      will also become the Highlighted record when this routine is exited.
  //
  //    DesiredState : CARDINAL
  //      The state that you want this entry to have.
  //
  //  EXAMPLE -
  //
  //    This routine would typically be called in the Initialize message of the
  //    ActionProc to set the initial Highlighted item in the ListView.
  //
  //      CtrlLV.AdjustAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
  //                                    MyRes.LVW_My_ListView,
  //                                    TopRow,
  //                                    DesiredRow,
  //                                    DesiredState);
  //




  procedure ResetAndHighlightRow
             (const dialogID     : cardinal;
              const controlID    : cardinal;
              const topRow       : cardinal;
              const DesiredRow   : cardinal;
              const DesiredState : cardinal); stdcall;

  exports ResetAndHighlightRow name 'CtrlLV_ResetAndHighlightRow';

  //*
  //  ResetAndHighlightRow - Adjust to show desired row in middle of the control.
  //
  //  This routine adjust the ListView control to bring a desired record into the
  //  middle of the control and Highlight it.  This routine would typically be
  //  called in the Initialize message of the ActionProc to adjust the desired
  //  record into view.  This routine does this by doing a complete reset of the
  //  control.
  //
  //  All the routines necessary to accomplish this task are available to you by
  //  using a combination of the other calls provided in this package.  This
  //  routine is provided to you as a convenience to eliminate that effort on your
  //  part.
  //
  //  CALLING SEQUENCE -
  //
  //    ResetAndHighlightRow (dialogID, controlID, TopRow,
  //                          DesiredRow, DesiredState);
  //
  //  ENTRY -
  //
  //    dialogID : CARDINAL
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : CARDINAL
  //      The control resource identifier.
  //
  //    TopRow : CARDINAL
  //      The number of the record to be displayed as the top row of visible
  //      data.
  //
  //    DesiredRow : CARDINAL
  //      The number of the desired record.  This is the record that you want to
  //      be as close to the center of the list of data as possible.  This record
  //      will also become the Highlighted record when this routine is exited.
  //
  //    DesiredState : CARDINAL
  //      The state that you want this entry to have.
  //
  //  EXAMPLE -
  //
  //    This routine would typically be used in conjuction with the CalculateTopRow
  //    routine to change the visible row.  One example would be when adding a new
  //    record into the list you would want the new record to be in the center of the
  //    list and to be Highlighted.   If the list of items scrolled is a relation you
  //    could get the KeyPosition of the new record, set DesiredRecord to that value and
  //    then make the following calls to end up with that record in the desired position.
  //
  //      CtrlLV.CalculateTopRow (ObjDialog.ReturnUniqueId (DataHandle),
  //                              MyRes.LVW_My_ListView,
  //                              1,
  //                              Sage.TotalRecords ("MyRel"),
  //                              DesiredRecord,
  //                              TopRow);
  //
  //      CtrlLV.ResetAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
  //                                   MyRes.LVW_My_ListView,
  //                                   TopRow,
  //                                   DesiredRow,
  //                                   DesiredState);
  //




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