2.8.4 Menu Enabling/Disabling Functions

Implementing OLE in your client application affects the Edit menu. Besides adding new menu items, OLE adds an extra step in handling standard commands such as Cut, Copy, and Paste. This extra step is needed to determine whether or not to disable these commands. First, isolate the code that handles the WM_INITMENU or WM_INITMENUPOPUP message in your main window procedure to enable or disable menu items. Second, centralize any other code that enables or disables the standard menu items.