ENABLE_SWITCH command
Content Manager OnDemand enables a toolbar icon and a menu item that allow the user to transfer window focus to the client application. The client name is set as the menu item text.
Command | Parameters |
---|---|
ENABLE_SWITCH | /H client
hWnd /C client name /N number |
- Parameters
- H
- Specifies, as a set of ASCII digits, the window handle of the client application. This parameter is required. The example below indicates how to prepare this parameter.
- C
- Specifies the name of the client application. This parameter is optional. If not specified, the name is not changed.
- N
- Specifies the number of the menu item/toolbar button to be enabled.
The number must be an integer between 1 and the number specified with
the
Enable DDE Interface --/I number,path,resid
. Specifying 1 enables the first menu item/toolbar button; specifying 2 enables the second; and so forth.This parameter is optional. The default is 1.
- Action
- If the client application has established an Advise Loop, Content Manager OnDemand informs the client application when the user transfers focus.
- Return Code
-
- 0
ARS_DDE_RC_NO_ERROR
- 2
ARS_DDE_RC_PARM_NOT_SPECIFIED
- 3
ARS_DDE_RC_INVALID_PARM_VALUE
- 11
ARS_DDE_RC_USER_ACTION_IN_PROGRESS
- Return Data
- None
Refer to the DoDdeCommand function.
char parms[200];
sprintf( parms,
"/H %ld /C %s",
(long)hWnd,
"Fred's Windows Application" );
DoDdeCommand( "ENABLE_SWITCH", parms, NULL );