Date: Jan 30, 2013 6:20 AM
Author: Tilo W√ľnsche
Subject: Using MS ActiveX RICHTEXT.RichtextCtrl.1

I try to use drag and drop in a MatLab application using the MS ActiveX RICHTEXT.RichtextCtrl.1.

As long I put all code to a sample figure all works fine. For convenience reason I would like to use the guide. I just implemented the necessary code like below. When I try to drag a file to the ActiveX it will be handled by the ActiveX itself, e.g. the file will show up as attachment to the ActiveX. My function is not called.

Has anybody an idea to solve this problem?

function uhu_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to iTecLogfile (see VARARGIN)
handles.output = hObject;
%handles.activex1.registerevent({'KeyUp', @richtextKeyUp});
handles.activex1.registerevent({'OLEDragDrop', @richtextOLEDragDrop});
set(handles.activex1,'OLEDropMode','rtfOLEDropManual');

% Update handles structure
guidata(hObject, handles);
data = struct();
setappdata(handles.figure1,'data',data);