Partager via


CWinApp::OnDDECommand

Called by the framework when the main frame window receives a DDE execute message.

virtual BOOL OnDDECommand( 
   LPTSTR lpszCommand  
);

Parameters

  • lpszCommand
    Points to a DDE command string received by the application.

Return Value

Nonzero if the command is handled; otherwise 0.

Remarks

The default implementation checks whether the command is a request to open a document and, if so, opens the specified document. The Windows File Manager usually sends such DDE command strings when the user double-clicks a data file. Override this function to handle other DDE execute commands, such as the command to print.

Example

BOOL CMyApp::OnDDECommand(LPTSTR lpszCommand)
{
   if (CWinApp::OnDDECommand(lpszCommand))
      return TRUE;

   // Handle any DDE commands recognized by your application 
   // and return TRUE.  See implementation of CWinApp::OnDDEComand 
   // for example of parsing the DDE command string. 

   // Return FALSE for any DDE commands you do not handle. 
   return FALSE;
 }

Requirements

Header: afxwin.h

See Also

Reference

CWinApp Class

Hierarchy Chart

CWinApp::EnableShellOpen