JohnMo Posted November 16, 2007 Share Posted November 16, 2007 This is a little thing, but when Acquire is selected from the File menu, would it be possible to skip the Select Device dialog when there is only one device listed? If there's only one device available, why do I have to select it? I think it would be safe to assume that's the one I want and proceed with the scan. Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted November 16, 2007 Share Posted November 16, 2007 Not possible. That whole UI is provided by Windows, we have no control over it. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
JohnMo Posted November 16, 2007 Author Share Posted November 16, 2007 I figured the dialog was provided by Windows. I don't know exactly how it's handled in the code, but it sounds like the default Windows behavior is to not show the dialog when there's only one device. From http://msdn2.microsoft.com/en-us/library/ms630143.aspx: If IWiaDevMgr::GetImageDlg finds only one matching device, it will not display the Select Device dialog box. Instead, it will select the matching device. You can override this behavior and force IWiaDevMgr::GetImageDlg to display the Select Device dialog box by passing WIA_SELECT_DEVICE_NODEFAULT as the value for the lFlags parameter. Perhaps there's not a combination of lDeviceType and lFlags parameters that will allow device types to be unrestricted while also suppressing the Select Device dialog box. The MSDN article only specifies that the Select Device dialog can be forced with the lFlags parameter and that lDeviceType parameter has to be set to something other than null before there's any chance the Select Device dialog will be skipped. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.