compile function edt_GetCellRect( edtID, colNo, rowNo ) /* Author : Darth C, Sprezzatura Actual Date : Sep 09 Purpose : Function to return edit table cell coordinates Parameters ========== edtID -> Fully qualified name of the edit table colNo -> Column number of the target cell. Defaults to currentPos rowNo -> Row number of the target cell. Defaults to currentPos Returns ======= Returns the edit table cell coordinates as per the RECT structure layout, i.e. <1> Left <2> Top <3> Right <4> Bottom Note these coordinates are relative to the Edit Table CLIENT area, NOT the desktop/screen! */ declare function sendMessage, blank_Struct, struct_To_Var declare function get_Property equ DTM_READCELLRECT$ to 1079 ; * // (WM_USER + 55) equ DTA_ACCESS$ to 0x0000 if assigned( edtID ) else edtID = "" if assigned( colNo ) else colNo = "" if assigned( rowNo ) else rowNo = "" if len( edtID ) else return "" end if len( colNo ) and len( rowNo ) then call set_Property( edtID, "ACCESSPOS", colNo : @fm : rowNo ) end else * // Use the current "caret" position - ensure ACCESSPOS * // is sync'd with CARETPOS call set_Property( edtID, "ACCESSPOS", | get_Property( edtID, "CARETPOS" ) ) end * // Create a blank RECT structure for the edit table * // to fill for us and lock it rc = blank_Struct( "RECT" ) lockVariable rc as BINARY * // Send the DTM_READCELLRECT message. * // * // The third parameter (wParam) contains a value that * // tells the edittable which cell we want. DTA_ACCESS * // means "use the ACCESSPOS property". * // * // We send the address of the RECT structure to fill in * // as the last parameter (lParam). call sendMessage( get_Property( edtID, "HANDLE" ), | DTM_READCELLRECT$, | DTA_ACCESS$, | getPointer( rc ) ) * // Unlock and translate the structure to a * // dynamic array unlockVariable rc rc = struct_To_Var( rc, "RECT" ) return rc