[python-win32] Creating python com objects

Dahlstrom, Roger rdahlstrom at directedge.com
Wed Apr 23 13:33:16 CEST 2008


I might be greatly misinterpreting what you're trying to do here, but RegisterDragDrop registers a window, not a com object.  The drop target instance would be
associating the target with that particular window.   Have you checked out wxDropTarget?
________________________________

From: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Alex Denham
Sent: Wednesday, April 23, 2008 7:18 AM
To: python-win32
Subject: [python-win32] Creating python com objects


Hi,

Anybody happen to know how to go about creating a COM object that RegisterDragDrop() will actually accept?

print dropTarget
<COMObject Python.PyIDropTarget>

pythoncom.RegisterDragDrop(_id, dropTarget)

Traceback (most recent call last):
  File "C:\Python25\DragAndDrop.py", line 82, in <module>
    main()
  File "C:\Python25\DragAndDrop.py", line 41, in main
    pythoncom.RegisterDragDrop(_id, dropTarget)
ValueError: argument is not a COM object

Any help appreciated,

Thanks
Alex


________________________________

Miss your Messenger buddies when on-the-go? Get Messenger on your mobile! <http://messengergonemobile.com>  


DISCLAIMER:
This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and
may contain legally privileged and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and 
any attachments thereto, is strictly prohibited. If you have received this in error, please immediately notify 
me and permanently delete the original and any copy of any e-mail and any printout thereof. 
E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept 
liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.

NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
Direct Edge ECN LLC may, at its discretion, monitor and review the content of all e-mail communications.

www.directedge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080423/fc15e522/attachment.htm>


More information about the python-win32 mailing list