Solved

Determine top but unfocused window handle

Posted on 2002-05-08
6
138 Views
Last Modified: 2010-04-04
How can I determine the top window handle but it doesn't have any focus? Like when you have a window open and it has focus and you click on the clock in the tray. It looses focus but it is still the top window on the desktop. Thanx in advance.
0
Comment
Question by:skynergy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6996385
>it has focus and you click on the clock in the tray. It >looses focus but it is still the top

are your sure?
isn't it so that the taskbar(window) is then on top
(and there is just no overlap)

just for rethinking

meikl ;-)
0
 
LVL 3

Expert Comment

by:raidos
ID: 6996452
meikl, the taskbar(window) is normally "Always on Top" unless somebody changed the setting.. =)

Also note that the Desktop(window) is normally always below "all" other windows even if it does have focus.

Regards
//raidos
0
 
LVL 3

Accepted Solution

by:
raidos earned 25 total points
ID: 6996468
I would Advise you too check the Win32 API for GetTopWindow and GetNextWindow, in those lie the answers you seek i think.

//raidos
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Assisted Solution

by:nestorua
nestorua earned 25 total points
ID: 6997031
HI,
If you want to know the Handle of the Top Window
(in Z-order) then use GetTopWindow() function.
But it is not the same as Focused Window.
So you must tell more fully what you mean when say "the top".
Sincerely,
Nestorua.
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005252
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between raido and netorua

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005303
[ Sorry I missed out all my s's in that last post... It should be "Split between raidos and nestorua" ]

Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Simple Delphi Question 9 104
code issue 8 183
shape, triangle, dbctrlgrid 3 31
Get weeknumber and year from date 4 25
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question