OriginObject::ProcessCommand

Description

Processes internal menu/button commands

Syntax

BOOL ProcessCommand( int nCmd, DWORD dwCmdType = PCMD_ORIGIN_INTERNAL, DWORD wParam = 0, DWORD lParam = 0 )

Parameters

nCmd
Handle to the menu where the internal menu needs to be added
dwCmdType
wParam
lParam

Return

TRUE if successful, FALSE otherwise

Examples

EX1

#include <Control.h> 
#include <OC_Res.h>
void    OriginObject_ProcessCommand_Ex1(Menu* pmenu, int nId = IDR_CM_WKS)
{
    Worksheet wks = Project.ActiveLayer();
    HINSTANCE hInstOutil = GetModuleHandle(MODULE_OU);
    if(pmenu->Load(hInstOutil, nId, 1))
    {
        HWND hMenu = pmenu->GetSafeHmenu();
        if(hMenu)
            wks.AddInternalMenu(hMenu, nId, 1);
        
        int nCmd =    pmenu->TrackPopupResMenu(0,  0, 0, GetWindow());    //Screen co-ordinates
        wks.GetPage().ProcessCommand(nCmd);
    }
}

Remark

Processes internal menu/button commands

See Also

header to Include

origin.h