OLECMDID

Specifies which command to execute. (The commands in this enumeration are the standard commands defined by Office 95.) A single value from this enumeration is passed in the nCmdID argument of IOleCommandTarget::Exec.

typedef enum  
{ 
    OLECMDID_OPEN            =  1, 
    OLECMDID_NEW             =  2, 
    OLECMDID_SAVE            =  3, 
    OLECMDID_SAVEAS          =  4, 
    OLECMDID_SAVECOPYAS      =  5, 
    OLECMDID_PRINT           =  6, 
    OLECMDID_PRINTPREVIEW    =  7, 
    OLECMDID_PAGESETUP       =  8, 
    OLECMDID_SPELL           =  9, 
    OLECMDID_PROPERTIES      = 10, 
    OLECMDID_CUT             = 11, 
    OLECMDID_COPY            = 12, 
    OLECMDID_PASTE           = 13, 
    OLECMDID_PASTESPECIAL    = 14, 
    OLECMDID_UNDO            = 15, 
    OLECMDID_REDO            = 16, 
    OLECMDID_SELECTALL       = 17, 
    OLECMDID_CLEARSELECTION  = 18, 
    OLECMDID_ZOOM            = 19, 
    OLECMDID_GETZOOMRANGE    = 20  
} OLECMDID; 
 

Elements

OLECMDID_OPEN
File Open
OLECMDID_NEW
File New
OLECMDID_SAVE
File Save
OLECMDID_SAVEAS
File Save As
OLECMDID_SAVECOPYAS
File Save Copy As
OLECMDID_PRINT
File Print
OLECMDID_PRINTPREVIEW
File Print Preview
OLECMDID_PAGESETUP
File Page Setup
OLECMDID_SPELL
Tools Spelling
OLECMDID_PROPERTIES
File Properties
OLECMDID_CUT
Edit Cut
OLECMDID_COPY
Edit Copy
OLECMDID_PASTE
Edit Paste
OLECMDID_PASTESPECIAL
Edit Paste Special
OLECMDID_UNDO
Edit Undo
OLECMDID_REDO
Edit Redo
OLECMDID_SELECTALL
Edit Select All
OLECMDID_CLEARSELECTION
Edit Clear
OLECMDID_ZOOM
View Zoom (see below for details)
OLECMDID_GETZOOMRANGE
Retrieves zoom range applicable to View Zoom (see below for details)

Remarks

In OLE Documents technology, an object that is being edited in-place disables the Zoom control on its toolbar and the Zoom command on its View.menu because, logically, the Zoom command applies to the container document , not to the object. Now, in OLE Document Objects technology, the OLECMDID_ZOOM and OLECMDID_GETZOOMRANGE commands provide a document object with a means of notifying the container’s frame object of the zoom range that it should display in its user interface.(the container frame is the client-side object that implements IOleInPlaceFrame and, optionally, IOleCommandTarget).

The OLECMDID_ZOOM command takes one LONG argument as input and returns one LONG argument on output. This command is used for three purposes:

The OLECMDID_GETZOOMRANGE command is used to determine the range of valid zoom values from an object that implements IOleCommandTarget. The caller passes MSOCMDEXECOPT_DONTPROMPTUSER in nCmdExecOpt and NULL for pvaIn. The object returns its zoom range as a DWORD in pvaOut where the HIWORD contains the maximum zoom value and the LOWORD contains the minimum zoom value. Typically this command is used when the user drops down the Zoom control on the toolbar of the UI-active object. The applications and objects that support this command are required to support all the integral zoom values that are within the (min,max) pair they return.

See Also

IOleCommandTarget, IOleCommandTarget::Exec, IOleInPlaceFrame