Vista Alt+Tab
-
My application is a modeless dialog which sits on top of the application's main window. Within the dialog is one edit control. My pointers are correct i.e., Window->Dialog->EditCtrl In XP, the Alt+Tab function of the Desktop works just fine. In Vista, the edit control does not regain focus. I am fine with sending Focus to the edit control however I am having problems with intercepting a WM_Message from the desktop when it brings my application to the foreground. Is it the Z-order, EV_WM_Message response, using GetForegroundWindow or something else? I can utilise the EvGetFocus and EvKillFocus functions but cannot distinguish between control from within the application and that which comes from the desktop. This is my first time here. Assistance would make me a regular responder to questions.
-
My application is a modeless dialog which sits on top of the application's main window. Within the dialog is one edit control. My pointers are correct i.e., Window->Dialog->EditCtrl In XP, the Alt+Tab function of the Desktop works just fine. In Vista, the edit control does not regain focus. I am fine with sending Focus to the edit control however I am having problems with intercepting a WM_Message from the desktop when it brings my application to the foreground. Is it the Z-order, EV_WM_Message response, using GetForegroundWindow or something else? I can utilise the EvGetFocus and EvKillFocus functions but cannot distinguish between control from within the application and that which comes from the desktop. This is my first time here. Assistance would make me a regular responder to questions.
I'm not sure what you need, does WM_ACTIVATEAPP[^] help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
I'm not sure what you need, does WM_ACTIVATEAPP[^] help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
Tried both WM_ACTIVATE and WM_ACTIVATEAPP. I've set up a status bar at the base of the application requesting both functions to talk (acknowledge the message) to me. No response. Thanks for your response.
-
Tried both WM_ACTIVATE and WM_ACTIVATEAPP. I've set up a status bar at the base of the application requesting both functions to talk (acknowledge the message) to me. No response. Thanks for your response.
I might instantiate these functions into the dialog and try letting it call the parent window with NotifyParent to refresh itself. Always good to talk to someone. Thank You Ric
-
Tried both WM_ACTIVATE and WM_ACTIVATEAPP. I've set up a status bar at the base of the application requesting both functions to talk (acknowledge the message) to me. No response. Thanks for your response.
Ric Ashton wrote:
I've set up a status bar at the base of the application requesting both functions to talk (acknowledge the message) to me.
How do you mean that?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
Ric Ashton wrote:
I've set up a status bar at the base of the application requesting both functions to talk (acknowledge the message) to me.
How do you mean that?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
Within C++ Object Windows TStatusBar* StatusBar; char xxx[255]; sprintf(xxx, "Keystroke C Timer = %d", RicsMasterTimer); if (::StatusBar) {::StatusBar->SetText(xxx);} The status bar is part of the application window.
-
Within C++ Object Windows TStatusBar* StatusBar; char xxx[255]; sprintf(xxx, "Keystroke C Timer = %d", RicsMasterTimer); if (::StatusBar) {::StatusBar->SetText(xxx);} The status bar is part of the application window.
Ah, you are using Object Windows (Borland, right?), i have no experience with that so i can't help you with anything specific, in VC++ i would give the WM_ACTIVATE (or WM_APPACTIVATE) message a handler in my dialog and in that handler i would set focus onto my edit control. Sorry but i don't know how that would work with OW.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
Ah, you are using Object Windows (Borland, right?), i have no experience with that so i can't help you with anything specific, in VC++ i would give the WM_ACTIVATE (or WM_APPACTIVATE) message a handler in my dialog and in that handler i would set focus onto my edit control. Sorry but i don't know how that would work with OW.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
I thank very much for your time. My application is complex and I will get through the current inconsistency between operating systems with respect to Focus and Activate. I would like to ask one more question. In older computers with sound cards, there is an instant termination of sound with two direct PlaySound statements. One might hear a click of the first sound, with the second sound being played in full. Example strcpy(bbb, ResidentDir); strcat(bbb, "\\sound\\alphabet\\cfs.wav"); //changed file structure PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT); strcpy(bbb, ResidentDir); strcat(bbb, "\\sound\\alphabet\\ill.wav"); //I love lollipops PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT); On newer computers with the sound card built into the motherboard, there is an accumulated delay. If the above code were to be repeated 100 times, it would take some 10 seconds for the computer to say "I love lollipops". I was curious as to whether there was a primacy on streaming or an inability to interrupt in the new configurations. Yours Ric
-
I thank very much for your time. My application is complex and I will get through the current inconsistency between operating systems with respect to Focus and Activate. I would like to ask one more question. In older computers with sound cards, there is an instant termination of sound with two direct PlaySound statements. One might hear a click of the first sound, with the second sound being played in full. Example strcpy(bbb, ResidentDir); strcat(bbb, "\\sound\\alphabet\\cfs.wav"); //changed file structure PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT); strcpy(bbb, ResidentDir); strcat(bbb, "\\sound\\alphabet\\ill.wav"); //I love lollipops PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT); On newer computers with the sound card built into the motherboard, there is an accumulated delay. If the above code were to be repeated 100 times, it would take some 10 seconds for the computer to say "I love lollipops". I was curious as to whether there was a primacy on streaming or an inability to interrupt in the new configurations. Yours Ric
I can't really help you there...do you mean the first PlaySound returns before the sound has been played and then when the second PlaySound kicks in it terminates the first sound with a "click" sound and then starts to play the new one?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
-
I can't really help you there...do you mean the first PlaySound returns before the sound has been played and then when the second PlaySound kicks in it terminates the first sound with a "click" sound and then starts to play the new one?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <
Hi, that seems correct. If you want better sound control, the general advice is to use DirectSound. I have no experience with it though. :)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google - the quality and detail of your question reflects on the effectiveness of the help you are likely to get - use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets