I am working on a control which is derived from TCustomGrid.
This control is used in VCL applications, but also in Visual
Basic 6 applications via an activeX wrapper.
In VCL applications, everything is working fine. In VB however,
I am having a problem with inplace edits not always being
hidden when they are supposed to. To be more specific, if I
click in a cell to get a dropdown box and then drag the form
around instead of selecting an item, then the dropdown box
'sticks' instead of disappearing.
Examining the VCL source reveals the problem: VCL controls
rely on TCustomForm to notify them of events by sending
them messages such as CM_CancelMode. In Visual Basic there
is of course no TCustomForm to send these messages, so
TCustomGrid.HideEdit is never called.
Isn't the ActiveX wrapper supposed to take care of this
somehow? If not, what is the best way to work around this
problem? My first guess it to implement the WMKillFocus
message handler. I hesitate because Borland must have used
TCustomForm + custom messages for a reason.
Thanks in advance for any suggestions,
Wim Coenen.
sorry,
Wim.