当前位置: 首页>>代码示例>>C++>>正文


C++ ProcessCommand函数代码示例

本文整理汇总了C++中ProcessCommand函数的典型用法代码示例。如果您正苦于以下问题:C++ ProcessCommand函数的具体用法?C++ ProcessCommand怎么用?C++ ProcessCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ProcessCommand函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WXUNUSED

bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
    wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId );
    event.SetInt(GetSelection());
    event.SetEventObject(this);
    event.SetString(GetStringSelection());
    ProcessCommand(event);
    return true;
}
开发者ID:beanhome,项目名称:dev,代码行数:9,代码来源:combobox_osx.cpp

示例2: vEvent

bool wxButton::SendClickEvent()
{
    wxCommandEvent                  vEvent( wxEVT_COMMAND_BUTTON_CLICKED
                                           ,GetId()
                                          );

    vEvent.SetEventObject(this);
    return ProcessCommand(vEvent);
} // end of wxButton::SendClickEvent
开发者ID:esrrhs,项目名称:fuck-music-player,代码行数:9,代码来源:button.cpp

示例3: WXUNUSED

bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
    // Just emit button event for now
    wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId);
    event.SetEventObject(this);
    ProcessCommand(event);

    return true;
}
开发者ID:jonntd,项目名称:dynamica,代码行数:9,代码来源:button_osx.cpp

示例4: WXUNUSED

bool wxTextCtrl::OS2Command(
  WXUINT                            uParam
, WXWORD                            WXUNUSED(vId)
)
{
    switch (uParam)
    {
        case EN_SETFOCUS:
        case EN_KILLFOCUS:
            {
                wxFocusEvent        vEvent( uParam == EN_KILLFOCUS ? wxEVT_KILL_FOCUS
                                                                   : wxEVT_SET_FOCUS
                                           ,m_windowId
                                          );

                vEvent.SetEventObject(this);
                GetEventHandler()->ProcessEvent(vEvent);
            }
            break;

        case EN_CHANGE:
            {
                if (m_bSkipUpdate)
                {
                    m_bSkipUpdate = false;
                    break;
                }

                wxCommandEvent      vEvent( wxEVT_COMMAND_TEXT_UPDATED
                                           ,m_windowId
                                          );

                InitCommandEvent(vEvent);
                ProcessCommand(vEvent);
            }
            break;

        case EN_OVERFLOW:
            //
            // The text size limit has been hit - increase it
            //
            AdjustSpaceLimit();
            break;

        case EN_SCROLL:
        case EN_INSERTMODETOGGLE:
        case EN_MEMERROR:
            return false;
        default:
            return false;
    }

    //
    // Processed
    //
    return true;
} // end of wxTextCtrl::OS2Command
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:57,代码来源:textctrl.cpp

示例5: ProcessCommand

void CommandParser::ProcessBuffer(std::string &buffer,LocalUser *user)
{
	if (buffer.empty())
		return;

	ServerInstance->Logs->Log("USERINPUT", LOG_RAWIO, "C[%s] I :%s %s",
		user->uuid.c_str(), user->nick.c_str(), buffer.c_str());
	ProcessCommand(user,buffer);
}
开发者ID:ghostmod,项目名称:inspircd,代码行数:9,代码来源:command_parse.cpp

示例6: send_SendMessage

// -------------------------------------------------------------------------------------------------
le_result_t send_SendMessage(const char* telPtr, const char* messagePtr)
{
    if (!ProcessCommand(messagePtr, NULL))
    {
        return SendMessage(telPtr, messagePtr);
    }

    return LE_OK;
}
开发者ID:H-H-bin,项目名称:legato-af,代码行数:10,代码来源:demo.c

示例7: WXUNUSED

bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
    bool sendEvent = true;
    wxCheckBoxState newState = Get3StateValue();

    if ( !GetPeer()->ButtonClickDidStateChange() )
    {
        wxCheckBoxState origState ;

        origState = Get3StateValue();

        switch (origState)
        {
            case wxCHK_UNCHECKED:
                newState = wxCHK_CHECKED;
                break;

            case wxCHK_CHECKED:
                // If the style flag to allow the user setting the undetermined state is set,
                // then set the state to undetermined; otherwise set state to unchecked.
                newState = Is3rdStateAllowedForUser() ? wxCHK_UNDETERMINED : wxCHK_UNCHECKED;
                break;

            case wxCHK_UNDETERMINED:
                newState = wxCHK_UNCHECKED;
                break;

            default:
                break;
        }
        
        if (newState == origState)
            sendEvent = false;
        else
            Set3StateValue( newState );
    }
    else
    {
        // in case we cannot avoid this user state change natively (eg cocoa) we intercept it here
        if ( newState == wxCHK_UNDETERMINED && !Is3rdStateAllowedForUser() )
        {
            newState = wxCHK_CHECKED;
            Set3StateValue( newState );
        }
    }
    
    if (sendEvent)
    {
        wxCommandEvent event( wxEVT_CHECKBOX, m_windowId );
        event.SetInt( newState );
        event.SetEventObject( this );
        ProcessCommand( event );
    }

    return true;
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:56,代码来源:checkbox_osx.cpp

示例8: BugDlg_SaveGame

//-----------------------------------------------------------------------------
//	BugDlg_SaveGame
//
//-----------------------------------------------------------------------------
void BugDlg_SaveGame( HWND hWnd )
{
	char	buff[1024];
	char	savename[MAX_PATH];
	char	remoteFile[MAX_PATH];

	if ( !g_bug_mapInfo.savePath[0] )
	{
		return;
	}

	SetDlgItemText( hWnd, IDC_BUG_SAVEGAME_LABEL, "Working..." );

	BugDlg_GetDataFileBase( g_bug_pReporter->GetUserName(), true, g_bug_szSavegame, sizeof( g_bug_szSavegame ) );
	Sys_StripPath( g_bug_szSavegame, savename, sizeof( savename ) );
	strcat( g_bug_szSavegame, ".360.sav" );

	sprintf( remoteFile, "%s\\%s.360.sav", g_bug_mapInfo.savePath, savename );

	// delete file locally
	unlink( g_bug_szSavegame );

	// delete file remotely
	DmDeleteFile( remoteFile, false );

	// save, and wait to ensure async completes
	sprintf( buff, "save \"%s\" notmostrecent wait", savename );
	if ( !ProcessCommand( buff ) )
	{
		// failed
		g_bug_szSavegame[0] = '\0';
	}
	else
	{
		DM_FILE_ATTRIBUTES fileAttributes;
		for (int i=0; i<5; i++)
		{
			// wait for the save file to appear
			HRESULT hr = DmGetFileAttributes( remoteFile, &fileAttributes );
			if ( hr == XBDM_NOERR )
				break;

			// wait for it
			Sleep( 1000 );
		}

		HRESULT hr = DmReceiveFile( g_bug_szSavegame, remoteFile );
		if ( hr != XBDM_NOERR )
		{
			// failed
			g_bug_szSavegame[0] = '\0';
		}
	}

	SetDlgItemText( hWnd, IDC_BUG_SAVEGAME_LABEL, g_bug_szSavegame );
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:60,代码来源:bug.cpp

示例9: main

int main(void)
{

	// open the device
	AFP_Error = ADIM29W64DEntryPoint.adi_pdd_Open(	NULL,		// DevMgr handle
							0,				// pdd entry point
							NULL,			// device instance
							NULL,			// client handle callback identifier
				  			ADI_DEV_DIRECTION_BIDIRECTIONAL,// data direction for this device
							NULL,			// DevMgr handle for this device
							NULL,			// handle to DmaMgr for this device
							NULL,			// handle to deferred callback service
							NULL );			// client's callback function

	// setup the device so the DSP can access it
	if (SetupForFlash() != NO_ERR)
		return FALSE;

	// allocate AFP_Buffer
	if (( AFP_Error = AllocateAFPBuffer()) != NO_ERR)
		return FALSE;

	// get sector map
	if (( AFP_Error = GetSectorMap())!= NO_ERR)
		return FALSE;

	// get flash manufacturer & device codes, title & desc
	if (( AFP_Error = GetFlashInfo()) != NO_ERR)
		return FALSE;

	// command processing loop
	while ( !bExit )
	{
		// the plug-in will set a breakpoint at "AFP_BreakReady" so it knows
		// when we are ready for a new command because the DSP will halt
		//
		// the jump is used so that the label will be part of the debug
		// information in the driver image otherwise it may be left out
 		// since the label is not referenced anywhere
		asm("AFP_BreakReady:");
       		asm("nop;");
			if ( FALSE )
				asm("jump AFP_BreakReady;");

		// Make a call to the ProcessCommand
		   AFP_Error = ProcessCommand();
	}

	//Clear the AFP_Buffer
	FreeAFPBuffer();

	//Close the Device
	AFP_Error = ADIM29W64DEntryPoint.adi_pdd_Close(NULL);

	return TRUE;
}
开发者ID:diqiuren,项目名称:idlab-daq,代码行数:56,代码来源:main.c

示例10: wxCHECK_RET

void wxCheckBox::Command (wxCommandEvent & event)
{
    int state = event.GetInt();
    wxCHECK_RET( (state == wxCHK_UNCHECKED) || (state == wxCHK_CHECKED)
        || (state == wxCHK_UNDETERMINED),
        wxT("event.GetInt() returned an invalid checkbox state") );

    Set3StateValue((wxCheckBoxState) state);
    ProcessCommand(event);
}
开发者ID:beanhome,项目名称:dev,代码行数:10,代码来源:checkbox.cpp

示例11: HID_GetOutReport

void HID_GetOutReport(uint8_t *pu8EpBuf, uint32_t u32Size)
{
    uint8_t  u8Cmd;
    uint32_t u32StartPage;
    uint32_t u32Pages;
    uint32_t u32PageCnt;

    /* Get command information */
    u8Cmd        = gCmd.u8Cmd;
    u32StartPage = gCmd.u32Arg1;
    u32Pages     = gCmd.u32Arg2;
    u32PageCnt   = gCmd.u32Signature; /* The signature word is used to count pages */


    /* Check if it is in the data phase of write command */
    if((u8Cmd == HID_CMD_WRITE) &&  (u32PageCnt < u32Pages))
    {
        /* Process the data phase of write command */

        /* Get data from HID OUT */
        USBD_MemCopy(&g_u8PageBuff[g_u32BytesInPageBuf], pu8EpBuf, EP6_MAX_PKT_SIZE);
        g_u32BytesInPageBuf += EP6_MAX_PKT_SIZE;

        /* The HOST must make sure the data is PAGE_SIZE alignment */
        if(g_u32BytesInPageBuf >= PAGE_SIZE)
        {
            printf("Writing page %d\n", u32StartPage + u32PageCnt);
            /* TODO: We should program received data to storage here */
            memcpy(g_u8TestPages + u32PageCnt * PAGE_SIZE, g_u8PageBuff, sizeof(g_u8PageBuff));
            u32PageCnt++;

            /* Write command complete! */
            if(u32PageCnt >= u32Pages)
            {
                u8Cmd = HID_CMD_NONE;

                printf("Write command complete.\n");
            }

            g_u32BytesInPageBuf = 0;
        }

        /* Update command status */
        gCmd.u8Cmd        = u8Cmd;
        gCmd.u32Signature = u32PageCnt;
    }
    else
    {
        /* Check and process the command packet */
        if(ProcessCommand(pu8EpBuf, u32Size))
        {
            printf("Unknown HID command!\n");
        }
    }
}
开发者ID:OpenNuvoton,项目名称:Nano100B_BSP,代码行数:55,代码来源:micro_printer_and_hid_transfer.c

示例12: switch

bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
{
    switch ( msg )
    {
        case WM_CHAR:
            // for compatibility with wxTextCtrl, generate a special message
            // when Enter is pressed
            if ( wParam == VK_RETURN )
            {
                if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0))
                    return false;

                wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);

                const int sel = GetSelection();
                event.SetInt(sel);
                event.SetString(GetValue());
                InitCommandEventWithItems(event, sel);

                if ( ProcessCommand(event) )
                {
                    // don't let the event through to the native control
                    // because it doesn't need it and may generate an annoying
                    // beep if it gets it
                    return true;
                }
            }
            // fall through

        case WM_SYSCHAR:
            return HandleChar(wParam, lParam);

        case WM_SYSKEYDOWN:
        case WM_KEYDOWN:
            return HandleKeyDown(wParam, lParam);

        case WM_SYSKEYUP:
        case WM_KEYUP:
            return HandleKeyUp(wParam, lParam);

        case WM_SETFOCUS:
            return HandleSetFocus((WXHWND)wParam);

        case WM_KILLFOCUS:
            return HandleKillFocus((WXHWND)wParam);

        case WM_CUT:
        case WM_COPY:
        case WM_PASTE:
            return HandleClipboardEvent(msg);
    }

    return false;
}
开发者ID:Zombiebest,项目名称:Dolphin,代码行数:54,代码来源:combobox.cpp

示例13: switch

void CScreenManager::OnReceive(LPBYTE lpBuffer, UINT nSize)
{
	try
	{
 		switch (lpBuffer[0])
 		{
		case COMMAND_NEXT:
			// 通知内核远程控制端对话框已打开,WaitForDialogOpen可以返回
			NotifyDialogIsOpen();
			break;
		case COMMAND_SCREEN_RESET:
			ResetScreen(*(LPBYTE)&lpBuffer[1]);
			break;
		case COMMAND_ALGORITHM_RESET:
			m_bAlgorithm = *(LPBYTE)&lpBuffer[1];
			m_pScreenSpy->setAlgorithm(m_bAlgorithm);
			break;
		case COMMAND_SCREEN_CTRL_ALT_DEL:
			::SimulateCtrlAltDel();
			break;
		case COMMAND_SCREEN_CONTROL:
			{
				typedef BOOL (WINAPI *BlockInputT)
					(
					BOOL fBlockIt
					);
				BlockInputT pBlockInput= (BlockInputT)GetProcAddress(LoadLibrary("user32.dll"),"BlockInput");
				// 远程仍然可以操作
				pBlockInput(false);
				ProcessCommand(lpBuffer + 1, nSize - 1);
				pBlockInput(m_bIsBlockInput);
			}
			break;
		case COMMAND_SCREEN_BLOCK_INPUT: //ControlThread里锁定
			m_bIsBlockInput = *(LPBYTE)&lpBuffer[1];
			break;
		case COMMAND_SCREEN_BLANK:
			m_bIsBlankScreen = *(LPBYTE)&lpBuffer[1];
			break;
		case COMMAND_SCREEN_CAPTURE_LAYER:
			m_bIsCaptureLayer = *(LPBYTE)&lpBuffer[1];
			m_pScreenSpy->setCaptureLayer(m_bIsCaptureLayer);
			break;
		case COMMAND_SCREEN_GET_CLIPBOARD:
			SendLocalClipboard();
			break;
		case COMMAND_SCREEN_SET_CLIPBOARD:
			UpdateLocalClipboard((char *)lpBuffer + 1, nSize - 1);
			break;
		default:
			break;
		}
	}catch(...){}
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:54,代码来源:ScreenManager.cpp

示例14: command

status_t
Protocol::_GetAllFolders(StringList& folders)
{
	ListCommand command(NULL, false);
	status_t status = ProcessCommand(command);
	if (status != B_OK)
		return status;

	folders = command.FolderList();
	return status;
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:11,代码来源:Protocol.cpp

示例15: event

bool wxSearchCtrl::HandleSearchFieldSearchHit()
{
    wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId );
    event.SetEventObject(this);

    // provide the string to search for directly in the event, this is more
    // convenient than retrieving it from the control in event handler code
    event.SetString(GetValue());

    return ProcessCommand(event);
}
开发者ID:beanhome,项目名称:dev,代码行数:11,代码来源:srchctrl_osx.cpp


注:本文中的ProcessCommand函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。