Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetNextWindow

Status
Not open for further replies.

extempore

Programmer
Jun 1, 2001
71
0
0
US
I have an API code in my client server app which uses the function getnextqueuewindow. This is in a windows 95 pc. Now I am running on windows 2000 and my user32.dll doesnt have the function getnextqueuewindow. Is ther any equivalent function for it so that i can use for all the O/S?

 
Use GetNextWindow(...); it shows the Z order of the windows. John Fill
1c.bmp


ivfmd@mail.md
 
John,

GetNextWindow() doesnt seem to be in the user32.dll either on win95 or windows 2000. But MSDN says it is. WHich OS r u running in?
 
Copy/Paste from MSDN
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
John Fill
1c.bmp


ivfmd@mail.md
 
John,

I am running on windows 2000 and I cant find the getnextwindow() same with my oldermachine which is windows95. I should look in user32.dll right? It's not there...do u know what cud be wrong?
 
do you use this function on handling any messages? If yes, see if the message is compatible with Win2k. If the function didn't exist, you would get a system error with some dialog boxes and... John Fill
1c.bmp


ivfmd@mail.md
 
John,

Thanks for responding to me.I am using this function to check an instance of an application if its already opened. I am looping through the available open windows in the desktop to find my required application. FOr me to do that I need to use something like the getnextwindow to loop thro. But the problem now is I dont have the function in the user32.dll as per MSDN. so everytime i come to the line where the function is called it bombs. I cannot even trap the GetLasterror for some reason. Do u have the function in ur user32.dll?
 
John,

Is there a way to the classname of a window with the help of the window title? OR do u know how to get the handle of a specific window?
 
You should have the instance of your window class(for example instance of some CWnd in MFC). To have it, is the same thing as to have the handle when you use WinAPI classic. But without having one of them, you don't have any window information. John Fill
1c.bmp


ivfmd@mail.md
 
Did anyone figure out how to access GetNextWindow? I am in the same boat now in that I need this function but it is not in my user32.dll. I am running win 98 se.
 
I used GetWindow(GW_NEXT)... ________
George, M
email : shaddow11_ro@yahoo.com
 
Why don't you use the FindWindow function?

From MSDN
"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.

HWND FindWindow(
LPCTSTR lpClassName, // pointer to class name
LPCTSTR lpWindowName // pointer to window name
);




Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT."
 
I thought there was a way to search all windows with one API call but it looks like you have to search each level separately ( top level, child level, next child level, etc).

At this point I will be using both functions in my code (getwindow, findwindow)

Thanks to all,
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top