Hi,
I am working on COM/ActiveX integration using José's new includes and OLE Container. I am also using José's TypeLib Browser instead of PB's COM Browser.
For objects that have Events, what is the best way to determine which control has fired the event? Say, that I have 2 masked edit controls on the dialog, I point both controls to the same events code.
(summary of the code):
hMaskedEd and hMaskedEd2 are window handles
pMaskedEd = OC_GetDispatch(hMaskedEd)
pMaskedEvents = CLASS "CMaskEdBoxEvents"
EVENTS FROM pMaskedEd CALL pMaskedEvents
pMaskedEd = NOTHING
pMaskedEd = OC_GetDispatch(hMaskedEd2)
EVENTS FROM pMaskedEd CALL pMaskedEvents
pMaskedEd = NOTHING
How can I put code in the "Change" event for the control that determines which masked edit control has fired the Change event?
INTERFACE MaskEdBoxEventsImpl GUID$("{C932BA87-4374-101B-A56C-00AA003668DC}") AS EVENT
INHERIT IDispatch
' =====================================================================================
METHOD Change <1>
' *** Insert your code here ***
OutputDebugString FUNCNAME$
END METHOD
Sorry if this sounds like an easy question - maybe I am missing something really simple? :)
The only way would be to have a separate event class for each instance of the control.
Thanks José :)