Solved

Determine top but unfocused window handle

Posted on 2002-05-08
6
140 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

752 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