Results 1 to 9 of 9

Thread: finding out classes?

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    how do i find out the class of an application so that i can use the function findwindow, to get its handle?

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The class name is normally registred when the window is created.
    The only way that I know of to get the class name is to call GetClassName. But that call requires the hWnd of the window. So I suppose that is of no help to you.

  3. #3

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    how come megatron knew that ie was "IEFRAME" then?

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    OK I thought you wanted to know how your program could find out.
    You can use SPY++ to get the Class name.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    There's many way to find out, but the thing is that you find the window handles, not the classes.

    Enumwindows, enumerates windows
    Windowfrompoint, returns the top window from a position on the screen.
    getparent, returns the parent window to a window.

    you could do a lot with that already. well, never used spy++ since i made my own
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    Guest
    I don't use Spy++ either, I made my own spy tool which can get almost any information about windows (which it stores in a treeview), the only problem I have with the program is the fact that I can't subclass other threads without a DLL.

    About your question: You can enumerate the windows using EnumWindows and in the EnumProc check the classname of the window you want.

  7. #7

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    well then how do i find out the class through spy++?

    also, i do want the class names, so that i can find a window of ie, or word, and make it faster than if i had to enumerate all windows!

  8. #8
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Start Spy++ and choose the Find Window tool on the Spy menu.
    Drag the Finder Tool to the window you want to find the class for and drop it.
    Word 2000 => OpusApp

    Best regards

  9. #9

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    thanks Joacim


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width