Hello, I have a program which I can control via COM and Python's win32com. This program will visualize a big tree, which gets created by my COM-commands. The problem is, that after each modification of the tree (like insert), the program refreshes its display area.
Accidentally I discovered when you click on the window of the program to change its size, as long as I don't lift the mouse button, the refresh of the display area is suspended and the performance of the tree creation increases by factor 10. So my idea is now to simulate this event. When I use win32api.mouse_event(...) with the correct location in the window, it works, but I can't use the mouse. Because Windows thinks the left mouse button is pressed, all movement will change the size of the window. Clicking again will release the connection to the window and the performance will drop again. I also tried win32gui.MoveWindow(...) and win32api.SetWindowPos(...). But both behave like clicking the window, move the mouse and release the mouse button. So, this does not work! My idea now is to send the WM_SIZING event to the window. So I tried something like win32api.SendMessage(hdnl, win32con.WM_SIZING, win32con.WMSZ_BOTTOM, "0 0 100 100") This returns 0 and nothing happens. The last param should be a RECT. I found info about a PyRECT class (see http://timgolden.me.uk/pywin32-docs/PyRECT.html) but I am not experienced enough to create an object from it ( in this moment I saw that the ctypes.wintypes has this class :-( ). So I tried to create a RECT structure (which looked like the one from ctypes.wintypes) but as result I got an exception saying that the last param needs to be a String, int or buffer (there is a typo in the exception ;) ). So I tried to give the rect byref, but this gave me the same exception. So, can someone explain me how to send this event to the window? Or perhaps my idea is total idiotic and one can archive this easy by a differnet way? Thanks in advance Andreas _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32