ButtonDownFcn on ActXControl video element

1 次查看(过去 30 天)
Hi,
at first, I wanted to create ActXControl video element using GUIDE. There ButtonDownFcn could be easily created. But when I compiled the code to exe file, there was always an error at the begining of the program concerning this video element.
So I decided to create the video window in the code by calling actxcontrol and defining size of the element. Is there any difference in these two solutions? At lease this one does not cause error after compilation. But how can I create ButtonDownFcn on this element?
Thanks for help, Filip

采纳的回答

Friedrich
Friedrich 2013-11-21
Hi,
you have to use registerevent:
%http://www.mathworks.com/help/matlab/matlab_external/using-events.html#f90131
function test
f = figure('position',[30 30 500 500]);
a = actxcontrol('Sysmon.3',[10 10 400 400], f);
a.events
a.registerevent({'OnDblClick',@mycb});
end
function mycb(varargin)
celldisp(varargin)
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by