Page 1 of 1

problem with window name and CreateWindowEx

Posted: Wed May 16, 2012 3:35 pm
by Wiedmann
Hi,

I'm trying to use CreateWindowEx (and SetProp) like in \plugins\MceRemote\__init__.py. But I'm having a problem with the Windows title/caption. It's allways shown carbled in e.g. spy++. The same happens with the property name (SetProp). But the class name is correct.

I have the same effect, if I inspect the HiddenMceMessageReceiver window from MceRemote. Of course, the window "EventGhost Message Receiver" from "\eg\Classes\MessageReceiver.py" is correct.

Anyone know what happens?


BTW:
In most files I can read "# -*- coding: utf-8 -*-" at the beginning. But all files (from EventGhost_0.4.1.r1568_Setup.exe) are in DOS encoding?

Re: problem with window name and CreateWindowEx

Posted: Tue May 22, 2012 11:17 am
by Wiedmann
Maybe it's easier if you see a screenshot (from WIndow Detective):
Image
For this screenshot only the plugin "Microsoft MCE Remote" (left side) was enabled.

Just look at "Window Text" or Font --> "Face Name". I guess somewhere is a mix of Unicode and ANSI WINAPI functions in EventGhost? This only happens if I use ctypes for creating a Window. It seems to work if I use win32gui (of course, this allways create ANSI WIndows).

But ok. I'm able to set a correct windows prop with ctypes. That's enough to make my plugin works.