2.2.6.31.1 waitCursor::CheckEsc

Description

The CheckEsc method allows a program to capture user hitting ESC to abort the current operation

Syntax

BOOL CheckEsc( )

Parameters

Return

TRUE if user has hit the ESC key, FALSE otherwise

Examples

EX1

void waitCursor_waitCursor_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if(wks==NULL)
        return;
    
    waitCursor    cur;
    string    str;
    int        nCol = 0;
    for(int ii = 0; ii < 10000 && !cur.CheckEsc();ii++)
    {
        wks.AddCol();
        str.Format("Adding col %d", nCol++);
        SetDataDisplayText(str);
    }
    if(ii < 10000)
        printf("User abort adding columns, only %d columns are added\n", nCol);
    
}

Remark

See Also

Header to Include

origin.h