TWAIN: Main Window scaled after Close/Unload Source
Posted: Fri Nov 12, 2021 4:48 pm
Preface:
This issue was first observed using GdPicture with C++ COM interop and occurs after calling TwainGetState without calling any other GDP TWAIN function previously. On this occasion we monitored our Main Window for any WM_SIZE messages on its Procedure. Our window didn't received any thus we are calling it a rescale (due to internal Windows scaling process) not resize (done thought Window Messages on its callback procedures under Win32API).
How to Reproduce:
-> On Windows video/display settings, change the display scaling value to anything but 100% (125% on my case)
-> Run the C# Demo app for TWAIN scanning;
-> Click either "Close Source Manager" or "Unload Source Manager" button;
-> After calling TwainCloseSourceManager/TwainUnloadSourceManager method, the main window will be rescaled (not resized!) with no reason
OS version: Win10 21H1
GDP version: 14.1.138 (Nov 08)
Source code for demo: GdPicture.NET14\Samples\GdPicture\WinForm\C#\TWAIN Scanning
Cheers!
This issue was first observed using GdPicture with C++ COM interop and occurs after calling TwainGetState without calling any other GDP TWAIN function previously. On this occasion we monitored our Main Window for any WM_SIZE messages on its Procedure. Our window didn't received any thus we are calling it a rescale (due to internal Windows scaling process) not resize (done thought Window Messages on its callback procedures under Win32API).
How to Reproduce:
-> On Windows video/display settings, change the display scaling value to anything but 100% (125% on my case)
-> Run the C# Demo app for TWAIN scanning;
-> Click either "Close Source Manager" or "Unload Source Manager" button;
-> After calling TwainCloseSourceManager/TwainUnloadSourceManager method, the main window will be rescaled (not resized!) with no reason
OS version: Win10 21H1
GDP version: 14.1.138 (Nov 08)
Source code for demo: GdPicture.NET14\Samples\GdPicture\WinForm\C#\TWAIN Scanning
Cheers!