Save and Restore Window and Cursor Position - Visible

CodeWright® - API Macro - Royalty Free - 2005.01.01 17:15
Send Comments


This function Maintains the edit window dimensions, edit window location, and cursor position within the edit window. This information is maintained and is accessible by the calling DLL function or API macro.

The first call allocates an array and stores the values for later use.

The second call restores the information using the values from the array and then deletes the array.

If the calling DLL function or API macro exits without issuing the second call then a memory leak will result.


API Macro Example:

int iPosition[] = tlaPositionVisible( );
MsgNotify( "Pointer = " + lplPosition[0] +
   "\nLine = " + lplPosition[1] +
   "\nColumn = " + lplPosition[2] +
   "\Left = " + lplPosition[3] +
   "\Top = " + lplPosition[4] +
   "\Right = " + lplPosition[5] +
   "\Bottom = " + lplPosition[6] );
tlaPositionVisible( iPosition );

DLL Function Example:

LPLONG lplPosition = tlaPositionVisible( );
tlaPositionVisible( lplPosition );

Input Parameters

Parm Name Code Meaning
1 Type 0 Allocate array and save information.
position array Restore location and release array.

Return Codes

Code Message
postion array  




Current version verified under:

  • CodeWright 7.5.3
  • CodeWright for .NET 7.0

CodeWright for .NET Restriction



The API functions used in this function are not Exported. As a result, this function can not be written as an API macro. This function is only available in the tlaTools DLL.


tlaTools is a Dynamic Link Library that contains most of the API macros on this website in a single easy to install package. The tlaTools DLL can be purchased by selecting the Buy button on this page.

tlaPositionVisible is included as a function in tlaTools.

Copyright © 1993-2005 Thom Little Associates, Ltd. revised 2005.01.01 17:15
One Central Square, Keene, NH 03431-3787 phone 603-357-7567