Home › Forums › TWAIN Classic › Question about window handlers
- This topic has 3 replies, 2 voices, and was last updated 15 years, 8 months ago by gabe.
- AuthorPosts
Hello All,
Can you describe differences between window handlers in methods:
1) Control / Parent / OpenDSM
2) Control / UserInterface / EnableDSIs it right that handle from Control / Parent / OpenDSM using as parent window for “Select Scaner Dialog” and for “Driver Settings Dialog”, but handle form Control / UserInterface / EnableDS using for process messages from driver/device only?
Is it right that I can use different window handlers for first and second methods? For example for first method I will use handle of main window in App, but for second handle I will use other window handle (for example Message-Only Windows)
Thanks
I use a message-only windows for all of my twain work in c++, works fine.
but I don’t know about using a different handle in a session – why not use the message-only window all the way?
.
@gabe wrote:
I use a message-only windows for all of my twain work in c++, works fine.
but I don’t know about using a different handle in a session – why not use the message-only window all the way?
Because at this case you can have problem with z-order position of window. And you can’t appear driver window because it window can be hidden other windows from you app.
Therefore my customers don’t appear some driver window sometimes and can’t switch to that window because that window don’t have icon in taskbar and Alt+Tab window (because F@$# driver developers disabled that features 👿 )
Please describe that problem in specification for driver developers and use different windows handlers for messages (message-only windows) and driver dialogs (standard windows).Thanks
P.S.
If you want I can send example for reproduce this problem written on C#. That app contains 3 window: main window, modal window and “driver” window which can have or not have parent window.ah .net. In .Net I don’t use a message-only window, I use a class that Implements IMessageFilter. No z-order problems, runs in from all project types even those that don’t typically have a messagepump or have a handle (ie console & windows service project types). The source code is over at http://www.codeplex.com/opentwain is you don’t mind reading vb.net 2005 code.
Did you base you code on NetMaster’s codeproject sample? And if so, did you address the twCapability ctor problem? And twState problems, and the other small but annoying problems? His article was/is brilliant but as he says, it is just a sample.
You’re welcome to send reproduction code, I don’t mind reading c# code. Send me a pm and I’ll send you my email address. Are you using visual studio or #develop then which version?
.
- AuthorPosts