External Interfaces |
Saving Your Work
Use these MATLAB functions to save and restore the state of a COM control object.
Function |
Description |
load |
Load and initialize a COM control object from a file |
save |
Write and serialize a COM control object to a file |
Save the current state of a COM control to a file using the save
function. The following example creates an mwsamp2
control and saves its original state to the file mwsample
:
f = figure('position', [100 200 200 200]); h = actxcontrol('mwsamp.mwsampctrl.2', [0 0 200 200], f); h.save('mwsample')
Now, alter the figure by changing its label and the radius of the circle:
Using the load
function, you can restore the control to its original state:
Writing Event Handlers | Releasing COM Interfaces and Objects |
© 1994-2005 The MathWorks, Inc.