findwindow by its class name

James Hu jhu at metrigenix.com
Fri Oct 21 17:53:42 CEST 2005


Hi,

For the simple code:

from wxPython.wx import *
 
class MyApp(wxApp):
    def OnInit(self):
        frame = wxFrame(NULL, -1, "Hello App")
        frame.Show(true)
        self.SetTopWindow(frame)
        return true
 
app = MyApp(0)
app.MainLoop()

Is there any way to know this windows' class name? I need to find it by
win32gui.FindWindow(classname,None) and send msg from another
application, but not using its title "Hello App".
MyApp is not the classname, for it couldn't be found by
FindWindow("MyApp",None).

Thanks a lot in advance!

James




More information about the Python-list mailing list