How to Check Dektop Window is the current Active Window?.
-
Hi, I am doing application in which i want to know whether the Desktop window is the current active window or Not. How can i do this. Is GetForeGroundWindow() is a solution?. thanks Nitheesh.
Jose Jo Martin http://www.simpletools.co.in
-
Hi, I am doing application in which i want to know whether the Desktop window is the current active window or Not. How can i do this. Is GetForeGroundWindow() is a solution?. thanks Nitheesh.
Jose Jo Martin http://www.simpletools.co.in
Have you tried:
if (GetActiveWindow() == GetDesktopWindow())
..."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Have you tried:
if (GetActiveWindow() == GetDesktopWindow())
..."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hi David, Thanks for your reply. I tried using the GetForeGroundWindow but that didn't work. thanks Nitheesh
Jose Jo Martin http://www.simpletools.co.in
-
Hi David, Thanks for your reply. I tried using the GetForeGroundWindow but that didn't work. thanks Nitheesh
Jose Jo Martin http://www.simpletools.co.in
Assuming you meant
GetForegroundWindow()
, I don't recall suggesting it. Anyway, what does it return? Have you compared that window handle with those in Spy++?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Assuming you meant
GetForegroundWindow()
, I don't recall suggesting it. Anyway, what does it return? Have you compared that window handle with those in Spy++?"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
Hi David, I tried by using GetActiveWindow() but MSDN says "The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue." . So i am getting NULL when my application's window is not the current window. Do u have any suggestion?. thanks. Nitheesh
Jose Jo Martin http://www.simpletools.co.in