我正在使用 TWAIN 2.1,连接到扫描仪,让用户更改任何选项,并等待输入,每当扫描仪界面显示时出现问题,光标仍然指示某些循环或工作,这是以下代码:
HWND g_hwnd = CreateWindow ("STATIC",
"",
WS_POPUPWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
HWND_DESKTOP,
0,
g_hinstDLL,
0);
TW_USERINTERFACE ui;
ui.ShowUI = TRUE;
ui.ModalUI = TRUE;
ui.hParent = g_hwnd;
// g_pDSM_Entry ->
int code = (*g_pDSM_Entry) (&g_AppID,
&g_SrcID,
DG_CONTROL,
DAT_USERINTERFACE,
MSG_ENABLEDSUIONLY,
(TW_MEMREF) &ui);
if(TWRC_SUCCESS != code) {
return;
}
MSG msg;
while(GetMessage ((LPMSG) &msg, g_hwnd, 0, 0)){
// TO-DO
}
如何等待用户输入?对话框也没有出现,只是白色窗口?