详细代码如下:
int TempValue=GetTagWord("TempValue");
char szBuffer[20];
sprintf( szBuffer,"Input number:%d",TempValue);
if ( nChar==13 )//if press enter
{
int xRet = MessageBox(NULL,szBuffer,"确认窗口",MB_YESNO|MB_ICONQUESTION|MB_SYSTEMMODAL);//message
if ( xRet == IDYES )//confirm operate
{
SetTagWord("DisplayValue",TempValue);// set data
}
}
当系统运行后,一旦在该输入/输出域中检测到回车信号,系统就会弹出如图1所示的确认窗口。