[python-win32] RE: drawing a bitmap

2005-04-21 Thread Jack Andrews
thanks mark. i've got to the bottom of the problem -- there seems to be a problem with constructing/updating PyBitmaps. or, more generally, the fuzzy boundary between win32gui and win32ui. what do you think about python-wrapping the win32 api, and building the MFC-like class system in python? a

RE: [python-win32] drawing a bitmap

2005-04-21 Thread Mark Hammond
> hi, i can't seem to create a bitmap in memory using pywin32. > my assert > fails, telling me that the bitmap size is (0,0)? I'm no expert on GDI programming at all. However, I have code that works that looks like: hdcBitmap = win32gui.CreateCompatibleDC(0) hdcScreen = win32gui.GetDC(

[python-win32] drawing a bitmap

2005-04-21 Thread Jack Andrews
hi, i can't seem to create a bitmap in memory using pywin32. my assert fails, telling me that the bitmap size is (0,0)? here's fragments: class window: def __init__ ... self.hwnd = CreateWindow(...) wnd=CreateWindowFromHandle(self.hwnd) wdc=wnd.GetDC()

[python-win32] (no subject)

2005-04-21 Thread Jack Andrews
hi, i can't seem to create a bitmap in memory using pywin32. my assert fails, telling me that the bitmap size is (0,0)? here's fragments: class window: def __init__ ... self.hwnd = CreateWindow(...) wnd=CreateWindowFromHandle(self.hwnd) wdc=wnd.GetDC()

Re: [python-win32] pasting from clip-board

2005-04-21 Thread Daniel F
> The code below seems to work. > > def GetClipboardText(): > text = "" > if OpenClipboard(c_int(0)): > hClipMem = GetClipboardData(c_int(CF_TEXT)) > GlobalLock.restype = c_char_p > text = GlobalLock(c_int(hClipMem)) > GlobalUnlock(c_int(hClipMem

Re: [python-win32] pasting from clip-board

2005-04-21 Thread ryan pinto
Hi Everyone, William I found quite a lot of code on capturing text from the clip-board and pasting it. But couldnt find any information on pasting screenshots into MS-WORD. This seems to work fine for pasting text def GetClipboardText(): text = "" if OpenClipboard(c_int(0)):

Re: [python-win32] pasting from clip-board

2005-04-21 Thread Daniel F
> I am new to python WIN-32 and am trying to automate a > word document creation. I am trying to paste clipboard > that I capture from an application to MS Word and I > was wondering if this can be done through python > WIN-32. I am a doing a sequence of tests which saves > simulation results to th

[python-win32] pasting from clip-board

2005-04-21 Thread ryan pinto
Hi Guys, I am new to python WIN-32 and am trying to automate a word document creation. I am trying to paste clipboard that I capture from an application to MS Word and I was wondering if this can be done through python WIN-32. I am a doing a sequence of tests which saves simulation results to the

RE: [python-win32] Python and LabView over COM? (again)

2005-04-21 Thread Mark Hammond
> I found an old thread in a python-list that discusses the > same problem. > http://mail.python.org/pipermail/python-list/2003-February/150857.html > > If I try the advice to use EnsureDispatch I get following error: > File "ExportVIStrings.py", line 19, in ? > > app=win32com.client.gencache.En

[python-win32] Python and LabView over COM? (again)

2005-04-21 Thread Frank Guenther
Hi All, > I try to access LabView by Python-win32com but LabView crashes on some COM-method calls. > The same calls work in VB. > Are there some known problem with the LabView COM implementation? There is a strange behavior of attribute/method access of the COM-Object: Methods are already call