TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

modal/modeless Select Source dialog

Forums › TWAIN Classic › modal/modeless Select Source dialog

  • This topic has 4 replies, 3 voices, and was last updated 12 years, 9 months ago by mcscorp.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 24, 2006 at 3:38 am #21857 Reply
    spike
    Participant
    • Topics - 10
    • Replies - 139
    • Total Posts - 149

    I am having the weirdest problem – one of my customers reports that the Select Source dialog is not behaving in a fully ‘modal’ way: The main application window can be clicked on, and it then pops forward and covers the Select Source dialog. I was able to easily reproduce this behavior with one of my test programs earlier this afternoon… but when I tried again later (with the same test program) the dialog acts perfectly modal!

    I feel like I’ve seen this problem before years ago, but I can’t for the life of me remember any details. None of these programs are doing any disable of the main window. When I use Spy++ to examine the Select Source dialog, it has the app main window as its owner (not parent) – even though the TWAIN call to post the Select Source dialog does not pass any window handle… Anybody know what that’s about? Could the Select Source dialog be calling something like GetForegroundWindow to choose its parent?

    March 21, 2008 at 3:50 pm #23215 Reply
    mcscorp
    Participant
    • Topics - 0
    • Replies - 2
    • Total Posts - 2

    Source dialog uses parent window handle passed to source manager, so you should make sure if you pass correct handle (probably there was mistake in getting handle) eg.

    twain.loadSourceManager(GetActiveWindow());
    srcIndex = twain.selectSource();

    March 21, 2008 at 5:38 pm #23216 Reply
    dpenney
    Participant
    • Topics - 3
    • Replies - 66
    • Total Posts - 69

    Wow, a 2+ year old question gets a reply. I think scscorp is talking about the window handle passed in on DG_CONTROL/DAT_PARENT/MSG_OPENDSM.

    spike, if you ever figured this problem out please post so others can avoid it.
    –

    March 21, 2008 at 7:52 pm #23217 Reply
    spike
    Participant
    • Topics - 10
    • Replies - 139
    • Total Posts - 149

    Hi mcscorp & dpenney (Doug, is that you?) – mcscorp, thanks for taking the time to post. I was running into this problem inside my EZTwain library, which does a lot of clever 😉 window handle management and caching, so I need to drill down to the bare metal of the TWAIN API to try to reproduce the issue. This has come up *again* with a customer just recently, so I’ll post when I have something new to report.

    April 8, 2008 at 8:06 am #23218 Reply
    mcscorp
    Participant
    • Topics - 0
    • Replies - 2
    • Total Posts - 2

    I had this problem with delphitwain – there was a bug with passing handle to virtual window (yes I mean DG_CONTROL, DAT_PARENT, MSG_OPENDSM). I needed to modify delphitwain source to fix this bug, but it helped (CreateWindow in procedure CreateVirtualWindow needs correct handle instead of 0). I don’t know EZTwain, so I just described my case 😉

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: modal/modeless Select Source dialog
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.