CheckEsc
The CheckEsc method allows a program to capture user hitting ESC to abort the current operation
BOOL CheckEsc( )
TRUE if user has hit the ESC key, FALSE otherwise
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); }
origin.h