The server application also provides an in-place toolbar to the container. This toolbar typically supports a different set of commands than does the container’s usual toolbar, generally a subset. For example, the in-place toolbar does not support File menu commands, because the container, not the server, must handle those commands even if the server is activated in place.
AppWizard provides a default in-place toolbar resource with five buttons. The COleIPFrameWnd-derived class is responsible for specifying the mapping of commands to toolbar buttons.
To view the default in-place toolbar
IDR_SCRIBBTYPE_SRVR_IP
.The Toolbar editor opens.
The Toolbar editor makes it easy to edit your application toolbar resources. In the following procedure, you’ll copy the AppWizard-generated toolbar resources for in-place activation of Scribble into your Scribble project. Then you’ll edit the toolbars to match your other Scribble project toolbar resources.
To copy the toolbar buttons
IDR_SCRIBBTYPE_SRVR_IP
, from the AppWizard-provided scratch resource file into your Scribble project Toolbar folder. Close the scratch Scribble.rc file.
IDR_MAINFRAME
and IDR_SCRIBBTYPE_SRVR_IP
and arrange them in the editor window so they don’t overlap.IDR_MAINFRAME
toolbar to the IDR_SCRIBBTYPE_SRVR_IP
toolbar, just after the Paste button. IDR_SCRIBBTYPE_SRVR_IP
toolbar by dragging them off the toolbar.Your in-place toolbar should now contain just three buttons: the application Help button, the Pen Widths button, and the Help Mode button. This is the toolbar that will appear when Scribble is activated as an OLE server application.