Start with the project you created in Dealing with the Paint Automation Toolbar.
Add the following menu structure to the main menu you created in Implementing the Paint Automation Initializing, Creating and Freeing.
&Edit
&Undo with ID = IDM_EDIT_UNDO
&Redo with ID = IDM_EDIT_REDO
Add the following declaration to the WndProc function:
L_BOOL fState
Add the following lines to the WndProc function after the "return 0L ;" of the case IDM_EXIT in WM_COMMAND
message:
case IDM_EDIT_UNDO:
L_AutCanUndo(pAutomation, &fState);
if (fState)
{
L_AutUndo(pAutomation, 0);
}
return 0L;
case IDM_EDIT_REDO:
L_AutCanRedo(pAutomation, &fState);
if (fState)
{
L_AutRedo(pAutomation, 0);
}
return 0L;
Compile and run the project by selecting Build->Execute tutorial.exe from the menu.