A user has entered a screenful of data. They hit a “GO” hit and now I’m
validating all of the data fields entered. When I process a field that is
not valid, I want to put the cursor back in that field and pop up a message
box. Even though I do a PtFlush(), the cursor isn’t going into the correct
field before the message box pops up.
Here is a sample of my code. What can I do to fix this?
char line[ 64 ];
d = atof( GetTextString( ABW_ConfigLubeInterval_txt ) );
if( d < 0 || d >= 2 )
PtGiveFocus( ABW_ConfigLubeInterval_txt, 0 );
PtMessageBox( ABW_base, “Input Error”, “Must be between 0.0 and 1.999”, 0, 0 );
return( Pt_CONTINUE );
sprintf( line, “%f5.3”, d );
SetTextString( ABW_ConfigLateralFeedback_txt, line );
config_rec.lube_interval = int( d * 1000 );
P.S. GetTextString/SetTextString are just cover functions for