Condividi tramite


Metodo IUIApplication::OnDestroyUICommand (uiribbon.h)

Chiamato per ogni comando specificato nel markup del framework della barra multifunzione di Windows quando la finestra dell'applicazione viene eliminata definitivamente.

Sintassi

HRESULT OnDestroyUICommand(
  [in]           UINT32            commandId,
  [in]           UI_COMMANDTYPE    typeID,
  [in, optional] IUICommandHandler *commandHandler
);

Parametri

[in] commandId

Tipo: UINT32

ID per il comando, specificato nel file di risorse di markup.

[in] typeID

Tipo: UI_COMMANDTYPE

Tipo di comando associato a un controllo specifico.

[in, optional] commandHandler

Tipo: IUICommandHandler*

Puntatore a un oggetto IUICommandHandler . Questo valore può essere NULL.

Valore restituito

Tipo: HRESULT

Se questo metodo ha esito positivo, restituisce S_OK. In caso contrario, restituisce un codice di errore HRESULT .

Commenti

Questa notifica di callback viene inviata dal framework della barra multifunzione all'applicazione host per ogni dichiarazione di comando nel file di risorse di markup.

Tutte le risorse nell'applicazione host associate a ogni comando vengono rilasciate.

Esempio

Nell'esempio seguente viene illustrata un'implementazione di base del metodo IUIApplication::OnDestroyUICommand .

//
//  FUNCTION:    OnDestroyUICommand(UINT, UI_COMMANDTYPE, IUICommandHandler*)
//
//  PURPOSE:    Called for each Command specified in the Ribbon markup 
//                when the Ribbon host application window is destroyed.
//
//  PARAMETERS:    
//                nCmdID - The Command identifier. 
//                typeID - The Command type. 
//                commandHandler - The Command handler. 
//
//  COMMENTS:
//
//
STDMETHODIMP CApplication::OnDestroyUICommand(
    UINT32 nCmdID,
    UI_COMMANDTYPE typeID,
    IUICommandHandler* commandHandler)
{
    return E_NOTIMPL;
}

Requisiti

Requisito Valore
Client minimo supportato Windows 7 [solo app desktop]
Server minimo supportato Windows Server 2008 R2 [solo app desktop]
Piattaforma di destinazione Windows
Intestazione uiribbon.h
DLL Mshtml.dll

Vedi anche

IUIApplication

Esempi di Windows Ribbon Framework