Exemplo n.º 1
0
void wxMenuItem::SetText(const wxString& text)
{
	wxString label(text);
#if wxUSE_ACCEL
	wxAcceleratorEntry * accel = GetAccel();
#endif
	label.Replace("&", "");
	int pos = label.Find("\t");
	if(pos) label = label(0, pos);
	m_mnuitem->SetLabel(label.c_str());
	if(m_mnu)
		m_mnu->SetName(label.c_str());
}
Exemplo n.º 2
0
unsigned int __stdcall DoEPID(void *arg)
{
	HRESULT hr = E_FAIL;

	GUID guidTest = DXVA2_ModeMPEG2_VLD;	

	IDirect3DDevice9Ex *pD3DDevice = static_cast<IDirect3DDevice9Ex*>(arg);
	CComPtr<IDirectXVideoDecoder> pDXVDec;
	CComPtr<IHVDService> pIHVDService;				
	CComPtr<ICPService> pCP;				

	CoInitialize(NULL);

	do
	{

	hr = CreateHVDService(&pIHVDService, pD3DDevice);
	if(FAILED(hr))
	break;

	pDXVDec = (IDirectXVideoDecoder*)GetAccel(pIHVDService);

	hr = CoCreateInstance(CLSID_IVICP_WIN7, NULL, CLSCTX_INPROC_SERVER,IID_ICPService, (void**)&pCP);							
	if(FAILED(hr))
	break;

	CPOpenOptions openoption;
	openoption.dwCPOption = E_CP_OPTION_ON + E_CP_OPTION_DBG_MSG + E_CP_OPTION_I_ONLY;
	openoption.pD3D9 = pD3DDevice;
	openoption.pVA = pDXVDec;
	openoption.bProtectedBlt = FALSE;
	openoption.dwFrameWidth = 0;
	openoption.dwDeviceID = 0;
	openoption.pDecodeProfile = &guidTest;

	hr = pCP->Open(&openoption);
	if(SUCCEEDED(hr))
		printf("succeed to open ivicp!");
	else
		printf("failed to open ivicp!");
	
	}while(0);

	hr = pCP->Close(); 	
	hr = pIHVDService->Uninitialize();

	CoUninitialize();

	return 0;
}