Open GoogleCodeExporter opened 8 years ago
i have the same problem
cancel and the window close button do not respond on the twain scanner native
settings UI
Original comment by wgtm.pet...@gmail.com
on 9 Sep 2010 at 11:57
Bug confirmed in the source.
Class: DataSourceManager
Method: FilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref
bool handled)
Should handle the Message MSG_CLOSEDSREQ and close the DataSource!
Current Implementation:
switch (_eventMessage.Message)
{
case Message.XFerReady:
Exception exception = null;
try
{
TransferPictures();
}
catch (Exception e)
{
exception = e;
}
finally
{
EndingScan();
DataSource.Close();
}
ScanningComplete(this, new ScanningCompleteEventArgs(exception));
break;
case Message.CloseDS:
EndingScan();
DataSource.Close();
break;
case Message.CloseDSOK:
EndingScan();
DataSource.Close();
break;
case Message.DeviceEvent:
break;
}
Fix:
switch (_eventMessage.Message)
{
case Message.XFerReady:
Exception exception = null;
try
{
TransferPictures();
}
catch (Exception e)
{
exception = e;
}
finally
{
EndingScan();
DataSource.Close();
}
ScanningComplete(this, new ScanningCompleteEventArgs(exception));
break;
case Message.CloseDS:
EndingScan();
DataSource.Close();
break;
case Message.CloseDSReq:
EndingScan();
DataSource.Close();
break;
case Message.CloseDSOK:
EndingScan();
DataSource.Close();
break;
case Message.DeviceEvent:
break;
}
Original comment by michel.w...@googlemail.com
on 11 Mar 2011 at 2:14
This looks like it is fixed in the latest checked-in code:
switch (_eventMessage.Message)
{
case Message.XFerReady:
Exception exception = null;
try
{
TransferPictures();
}
catch (Exception e)
{
exception = e;
}
CloseDsAndCompleteScanning(exception);
break;
case Message.CloseDS:
case Message.CloseDSOK:
case Message.CloseDSReq:
CloseDsAndCompleteScanning(null);
break;
case Message.DeviceEvent:
break;
default:
break;
}
Can anyone confirm that?
Original comment by luke.qui...@gmail.com
on 11 Mar 2011 at 11:30
No,
it does not work for me. The problem is that no messages were received until
the mouse is not over my own window and in the 'scanner' window. After a click
to close, if i move the mouse over my app window, the message is received.
Original comment by Mungo...@gmail.com
on 28 Jun 2011 at 12:36
Original issue reported on code.google.com by
ayman1...@gmail.com
on 6 Apr 2010 at 1:54