I am trying to understand what top-level window means.
(as in FindWindow)
Thanks.
Its garble speak for an extra axis. A Window has X and Y co-ordinates, the terminology for which window is above or below the other is Z axis or commonly Z order. A top level window is the one at the front of the other windows. FindWindow() will usually search the table of running processes for either the window "class name" or the Window "Title".
From MSDN
Quote
FindWindow Function
The FindWindow function retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search.
To search child windows, beginning with a specified child window, use the FindWindowEx function.
In this context, "top window" means a window that was created with hWndParent = NULL ie a windows that has no parent or a window that has the desktop as a parent.
In more simple words it is an application "main" window, or usually the window that contains all other windows and controls for an application.
hmmmm - i would have thought it was the window that was currently on top of the rest
that does not necessarily mean it has focus
Quote from: dedndave on May 12, 2010, 10:29:47 AM
hmmmm - i would have thought it was the window that was currently on top of the rest
M$ is a bit ambiguous in its wording. Top level means "not child windows". You get "the window on top" via GetActiveWindow or GetForegroundWindow (and again, there are subtle differences between the two).
thanks JJ
subtle - but important to note the wording, i guess :bg
i see "Foreground" is probably what i was thinking of
in "user lingo" the definitions don't have to be so precise
Quote from: hutch-- on May 12, 2010, 03:12:50 AM
Its garble speak for an extra axis. A Window has X and Y co-ordinates, the terminology for which window is above or below the other is Z axis or commonly Z order. A top level window is the one at the front of the other windows. FindWindow() will usually search the table of running processes for either the window "class name" or the Window "Title".
Thanks dedndave for the explanation.
Would FindWindow be used to accomplish this?
1. Start one application and run at full screen.
2. Start a second application and have it's window at the top while reducing the size of the top window.
An inch down would be good.
:bg Hutch and JJ are the guys to thank
when you go full-screen - you have taken over the entire display area
i don't think you can have another window visible at the same time
EDIT - let me clarify that
if you want to have another "window" visible, you'll have to write it as part of the full-screen application
Quote from: hutch-- on May 12, 2010, 03:12:50 AM
Its garble speak for an extra axis. A Window has X and Y co-ordinates, the terminology for which window is above or below the other is Z axis or commonly Z order. A top level window is the one at the front of the other windows. FindWindow() will usually search the table of running processes for either the window "class name" or the Window "Title".
I meant to thank you.
Andy
Quote from: dedndave on May 12, 2010, 01:27:42 PM
:bg Hutch and JJ are the guys to thank
when you go full-screen - you have taken over the entire display area
i don't think you can have another window visible at the same time
EDIT - let me clarify that
if you want to have another "window" visible, you'll have to write it as part of the full-screen application
Apparently that isn't true.
How often have you reduced a window so you could compare the contents with another open window?
I do that to find mistakes I have made in source code.
that is not "full-screen" mode
you are refering to a "maximized" window
here is an old 16-bit program i wrote that is full screen
http://necrobones.com/starflt
you have to scroll down and find S1mapgen.zip
if you want to reduce a maximized window, you might be able to fool the OS into thinking the display area is shrunken, i suppose
similar to the way the Office Shortcut Bar behaves
the easy way is to use a "normal" window, though :bg