SweetScape Knowledgebase KB1036: How do I define a struct that moves with the cursor?
There are two options here. The first is to use the statement 'FSeek(GetCursorPos());' in your
template before you define your structure. For example:
FSeek(GetCursorPos());
SetBackColor( cLtAqua );
struct MYSTRUCT
{
int id;
int value;
} data;
SetBackColor( cNone );
This structure also has a background color so its easier to tell where
the structure is placed in your file. To move the structure, move your cursor
in the file and then press the F5 key to re-run the template.
The alternate way is to run a Template on your file that
contains the structs you want to use. Then you can create
a custom bookmark using the types from that template (see
KB1020 for more information). When
you create the bookmark, make sure the Move Bookmark with Cursor
toggle is enabled in the Add Bookmark dialog. After the
bookmark is created, moving your cursor around the file
will cause the struct to be moved with your cursor.
Back to knowledgebase index
Back to main support page
|