how to receive a WM_COPYDATA message in wxwindows

F

Frank Bechmann

I started to write a SciTe director in python. I had a very basic
communication running in Pythonwin but I disliked the strong mixture
between Pythonwin's basic functionality and the Pythonwin application.

Now I was trying to do the same with wxWindows but I did not find a
way to receive the WM_COPYDATA messages sent from SciTe since there is
no predefined wx-event for WM_COPYDATA and I got completely lost in
the mix of C++/Swig/Python docs and sources. I tried to add my own
event handler like this:

# wxEVT_COPYDATA = win32con.WM_COPYDATA <== didn't work too
wxEVT_COPYDATA = wx.NewEventType()
def EVT_COPYDATA(win, func):
win.Connect(-1, -1, wxEVT_COPYDATA, func)

class CopyDataEvent(wx.PyEvent):
def __init__(self, data):
wx.PyEvent.__init__(self)
self.SetEventType(wxEVT_COPYDATA)
...

class SciCtrlFrame(wx.Frame):
def __init__(self, logger, scitePath, sciteStartArgs):
wx.Frame.__init__(self, None, -1, "title")
...
EVT_COPYDATA(self, self.OnCopyData)

but that didn't work. Can someone give me a hint where the wxEventType
is documented or does someone even have an idea how to solve this?

thx in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top