| Home | Previous Lesson: Insert Class in the OLE Control Next Lesson: Inserting an Object in the OLE Control |
Calling the InsertFile() embeds a copy of the existing object into the control. The following example inserts the specified object.
String
lFileNameWithFullPath, lFileName If lResult = 0 Then Return lResult = ole_1.InsertFile( lFileNameWithFullPath ) If lResult <> 0 Then ole_1.Activate( InPlace! ) |
Activate() function activates the inserted file, i.e., invokes the OLE Server (The program that created the file).
To see it in the action, run the application. Select "Module/OLE 2.0 Control Examples" option from the menu. Click on the "Insert File" CommandButton.
| Home | Previous Lesson: Insert Class in the OLE Control Next Lesson: Inserting an Object in the OLE Control |