[python-win32] findwindow by its class name
Paul Moore
p.f.moore at gmail.com
Fri Oct 21 14:27:43 EDT 2005
On 10/21/05, Steve Holden <steve at holdenweb.com> wrote:
> > Is there any way to know this windows' class name? I need to find it by
[...]
> I'm not saying it can'ty be done (which is a pity for you, because
> that's usually a cue for someone to contradict me) but it's expecting
> quite a lot of win32gui. A wxPython application is not a windows handle,
> and I suspect you will find that the classname you seek isn't visible
> from inside (wx)Python.
You had to make me do it, didn't you? :-)
wxPython windows expose their HWND via the GetHandle() method. So you
can get the frame's class name as
win32gui.GetClassName(frame.GetHandle())
FWIW, I get a constant value of "wxWindowClassNR".
Hope this helps,
Paul.
More information about the Python-list
mailing list