Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Sending a message to Win32 Dialog in background.

by Corion (Pope)
on Oct 31, 2012 at 10:05 UTC ( #1001637=note: print w/ replies, xml ) Need Help??


in reply to Re: Sending a message to Win32 Dialog in background.
in thread Sending a message to Win32 Dialog in background.

At least up until Windows XP, this does not match my experience. The Win32 windows callback gets called for every message sent to it, whether the window is in the foreground or not. Especially, there are messages that get sent to set the focus to the window.

If all else fails, the controlling/sending program can force the other window into the foreground and then send the messages.


Comment on Re^2: Sending a message to Win32 Dialog in background.
Re^3: Sending a message to Win32 Dialog in background.
by balajinagaraju (Sexton) on Oct 31, 2012 at 10:10 UTC

    Hi, Thanks for your responses, win32 windows will indeed process the messages sent to them no matter whether they are foreground or background, but i am facing an issue particularly here. I think the only way to achieve this could be to set the required window to foreground and then sendkeys. Let me check other options.

      As the alternative, you could try to send the keyboard messages directly to the appropriate window instead of using SendKeys. This will not always work in a convenient way, as the keycodes and keyboard states do not necessarily translate into Windows messages.

Re^3: Sending a message to Win32 Dialog in background.
by Anonymous Monk on Nov 11, 2012 at 08:00 UTC

    At least up until Windows XP, this does not match my experience.

    You're right, I was misremembering an experience I had with some GUI toolkits, which drop/filter incoming messages based on focus

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (19)
As of 2014-08-29 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (282 votes), past polls