Using the Automation Editing Capabilities

Start with the project you created in Using the Undoing/Redoing capabilities.

1.

Add the following menu structure to the Edit popup menu you created in Using the Undoing/Redoing Capabilities after the &Redo item:

 Cu&t     with ID = IDM_EDIT_CUT 
 &Copy    with ID = IDM_EDIT_COPY 
 &Paste   with ID = IDM_EDIT_PASTE 
 &Delete  with ID = IDM_EDIT_DELETE 

2.

Add the following lines to the WndProc after the statement "return 0L ;" of the case IDM_EDIT_REDO in the WM_COMMAND message:

case IDM_EDIT_CUT: 
// Cut the current selection to the clipboard 
L_AutCut(pAutomation, 0); 
return 0L; 
case IDM_EDIT_COPY: 
// Copy the current selection to the clipboard 
L_AutCopy(pAutomation, 0); 
return 0L; 
case IDM_EDIT_PASTE: 
//check if there is a valid automation mode data on the clipboard 
L_AutClipboardDataReady(pAutomation, &fState); 
if (fState) 
{ 
   // paste the data to the current active container 
   L_AutPaste(pAutomation, 0); 
} 
return 0L; 
case IDM_EDIT_DELETE: 
// Delete the current selection 
L_AutDelete(pAutomation, 0); 
return 0L; 

3.

Compile and run the project by selecting Build->Execute tutorial.exe from the menu.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Container and Automation C API Help