當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetAppClass函數代碼示例

本文整理匯總了C++中GetAppClass函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetAppClass函數的具體用法?C++ GetAppClass怎麽用?C++ GetAppClass使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetAppClass函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: OnMenuSelect

bool CChannelMenu::OnMenuSelect(HWND hwnd,WPARAM wParam,LPARAM lParam)
{
	HMENU hmenu=reinterpret_cast<HMENU>(lParam);
	UINT Command=LOWORD(wParam);

	if (hmenu==NULL || hmenu!=m_hmenu || hwnd!=m_hwnd || HIWORD(wParam)==0xFFFF
			|| Command<m_FirstCommand || Command>m_LastCommand) {
		if (m_Tooltip.IsVisible())
			m_Tooltip.TrackActivate(1,false);
		return false;
	}

	if ((m_Flags&FLAG_SHOWTOOLTIP)!=0) {
		MENUITEMINFO mii;

		mii.cbSize=sizeof(mii);
		mii.fMask=MIIM_DATA;
		if (::GetMenuItemInfo(hmenu,Command,FALSE,&mii)) {
			CChannelMenuItem *pItem=reinterpret_cast<CChannelMenuItem*>(mii.dwItemData);
			if (pItem==NULL)
				return false;

			const CEventInfoData *pEventInfo1,*pEventInfo2;
			pEventInfo1=pItem->GetEventInfo(0);
			if (pEventInfo1==NULL) {
				pEventInfo1=pItem->GetEventInfo(&GetAppClass().EpgProgramList,0);
			}
			if (pEventInfo1!=NULL) {
				TCHAR szText[256*2+1];
				int Length;
				POINT pt;

				Length=GetEventText(pEventInfo1,szText,lengthof(szText)/2);
				pEventInfo2=pItem->GetEventInfo(&GetAppClass().EpgProgramList,1);
				if (pEventInfo2!=NULL) {
					szText[Length++]=_T('\r');
					szText[Length++]=_T('\n');
					GetEventText(pEventInfo2,szText+Length,lengthof(szText)/2);
				}
				m_Tooltip.SetText(1,szText);
				::GetCursorPos(&pt);
				pt.x+=16;
				pt.y+=max(m_TextHeight,m_LogoHeight)+
							m_Margins.cyTopHeight+m_Margins.cyBottomHeight;
				m_Tooltip.TrackPosition(pt.x,pt.y);
				m_Tooltip.TrackActivate(1,true);
			} else {
				m_Tooltip.TrackActivate(1,false);
			}
		}
	}
	return true;
}
開發者ID:kento1218,項目名稱:TVTest,代碼行數:53,代碼來源:Menu.cpp

示例2: GetAppClass

void CEpgOptions::Finalize()
{
	if (m_hLoadThread!=NULL) {
		if (::WaitForSingleObject(m_hLoadThread,0)==WAIT_TIMEOUT) {
			GetAppClass().AddLog(TEXT("EPGデータ読み込みスレッドの終了を待っています..."));
			if (::WaitForSingleObject(m_hLoadThread,30000)==WAIT_TIMEOUT) {
				GetAppClass().AddLog(CLogItem::TYPE_WARNING,TEXT("EPGデータ読み込みスレッドを強製終了します。"));
				::TerminateThread(m_hLoadThread,-1);
			}
		}
		::CloseHandle(m_hLoadThread);
		m_hLoadThread=NULL;
	}

	SAFE_DELETE(m_pEpgDataLoader);
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:16,代碼來源:EpgOptions.cpp

示例3: SaveLogoFile

bool CEpgOptions::SaveLogoFile()
{
	if (m_fSaveLogoFile && m_szLogoFileName[0]!='\0') {
		CAppMain &App=GetAppClass();
		CLogoManager &LogoManager=App.LogoManager;
		TCHAR szFileName[MAX_PATH];

		if (!GetAbsolutePath(m_szLogoFileName,szFileName,lengthof(szFileName)))
			return false;
		if (!::PathFileExists(szFileName) || LogoManager.IsLogoDataUpdated()) {
			App.AddLog(TEXT("ロゴデータを \"%s\" に保存します..."),szFileName);
			if (!LogoManager.SaveLogoFile(szFileName)) {
				App.AddLog(CLogItem::TYPE_ERROR,TEXT("ロゴファイルの保存でエラーが発生しました。"));
				return false;
			}
		}
		if (::lstrlen(szFileName)+4<MAX_PATH) {
			::lstrcat(szFileName,TEXT(".ini"));
			if (!::PathFileExists(szFileName) || LogoManager.IsLogoIDMapUpdated()) {
				App.AddLog(TEXT("ロゴ設定を \"%s\" に保存します..."),szFileName);
				LogoManager.SaveLogoIDMap(szFileName);
			}
		}
	}
	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:26,代碼來源:EpgOptions.cpp

示例4: LoadLogoFile

bool CEpgOptions::LoadLogoFile()
{
	if (m_fSaveLogoFile && m_szLogoFileName[0]!='\0') {
		CAppMain &App=GetAppClass();
		CLogoManager &LogoManager=App.LogoManager;
		TCHAR szFileName[MAX_PATH];

		if (!GetAbsolutePath(m_szLogoFileName,szFileName,lengthof(szFileName)))
			return false;
		if (::PathFileExists(szFileName)) {
			App.AddLog(TEXT("ロゴデータを \"%s\" から読み込みます..."),szFileName);
			if (!LogoManager.LoadLogoFile(szFileName)) {
				App.AddLog(CLogItem::TYPE_ERROR,TEXT("ロゴファイルの読み込みでエラーが発生しました。"));
				return false;
			}
		}
		if (::lstrlen(szFileName)+4<MAX_PATH) {
			::lstrcat(szFileName,TEXT(".ini"));
			if (!::PathFileExists(szFileName)) {
				// 以前のバージョンとの互換用
				::GetModuleFileName(NULL,szFileName,lengthof(szFileName));
				::PathRenameExtension(szFileName,TEXT(".logo.ini"));
				if (!::PathFileExists(szFileName))
					return false;
			}
			App.AddLog(TEXT("ロゴ設定を \"%s\" から読み込みます..."),szFileName);
			LogoManager.LoadLogoIDMap(szFileName);
		}
	}
	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:31,代碼來源:EpgOptions.cpp

示例5:

bool CInformationPanel::CRecordItem::Update()
{
	CAppMain &App=GetAppClass();
	bool fRecording=App.RecordManager.IsRecording();
	LONGLONG WroteSize;
	CRecordTask::DurationType RecordTime;
	LONGLONG DiskFreeSpace;

	if (fRecording) {
		const CRecordTask *pRecordTask=App.RecordManager.GetRecordTask();
		WroteSize=pRecordTask->GetWroteSize();
		RecordTime=pRecordTask->GetRecordTime();
		DiskFreeSpace=pRecordTask->GetFreeSpace();
	}

	if (fRecording==m_fRecording
			&& (!fRecording
				|| (WroteSize==m_WroteSize
					&& RecordTime==m_RecordTime
					&& DiskFreeSpace==m_DiskFreeSpace)))
		return false;

	m_fRecording=fRecording;
	if (fRecording) {
		m_WroteSize=WroteSize;
		m_RecordTime=RecordTime;
		m_DiskFreeSpace=DiskFreeSpace;
	}

	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:31,代碼來源:InformationPanel.cpp

示例6: GetAppClass

bool CVideoDecoderOptions::ReadSettings(CSettings &Settings)
{
	CMediaViewer &MediaViewer = GetAppClass().CoreEngine.m_DtvEngine.m_MediaViewer;
	VideoDecoderSettings DecoderSettings;
	int Value;

	MediaViewer.GetVideoDecoderSettings(&DecoderSettings);

	Settings.Read(TEXT("EnableDeinterlace"), &DecoderSettings.bEnableDeinterlace);
	if (Settings.Read(TEXT("DeinterlaceMethod"), &Value))
		DecoderSettings.DeinterlaceMethod = static_cast<TVTVIDEODEC_DeinterlaceMethod>(Value);
	Settings.Read(TEXT("AdaptProgressive"), &DecoderSettings.bAdaptProgressive);
	Settings.Read(TEXT("AdaptTelecine"), &DecoderSettings.bAdaptTelecine);
	Settings.Read(TEXT("SetInterlacedFlag"), &DecoderSettings.bSetInterlacedFlag);
	Settings.Read(TEXT("Brightness"), &DecoderSettings.Brightness);
	Settings.Read(TEXT("Contrast"), &DecoderSettings.Contrast);
	Settings.Read(TEXT("Hue"), &DecoderSettings.Hue);
	Settings.Read(TEXT("Saturation"), &DecoderSettings.Saturation);
	Settings.Read(TEXT("NumThreads"), &DecoderSettings.NumThreads);
	Settings.Read(TEXT("EnableDXVA2"), &DecoderSettings.bEnableDXVA2);

	MediaViewer.SetVideoDecoderSettings(DecoderSettings);

	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:25,代碼來源:VideoDecoderOptions.cpp

示例7: GetAppClass

bool CInformationPanel::CItem::GetButtonTipText(int Button,LPTSTR pszText,int MaxText) const
{
	if (Button==0 && HasProperty()) {
		return GetAppClass().CommandList.GetCommandNameByID(m_PropertyID,pszText,MaxText)>0;
	}
	return false;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:7,代碼來源:InformationPanel.cpp

示例8: ListView_SetItem

void CControllerManager::SetButtonCommand(HWND hwndList,int Index,int Command)
{
	int CurController=(int)DlgComboBox_GetCurSel(m_hDlg,IDC_CONTROLLER_LIST);
	if (CurController<0)
		return;

	LV_ITEM lvi;
	TCHAR szText[CCommandList::MAX_COMMAND_NAME];

	lvi.mask=LVIF_PARAM;
	lvi.iItem=Index;
	lvi.iSubItem=0;
	lvi.lParam=Command;
	ListView_SetItem(hwndList,&lvi);
	lvi.mask=LVIF_TEXT;
	lvi.iSubItem=1;
	if (Command>0) {
		GetAppClass().CommandList.GetCommandNameByID(Command,szText,lengthof(szText));
		lvi.pszText=szText;
	} else {
		lvi.pszText=TEXT("");
	}
	ListView_SetItem(hwndList,&lvi);
	m_CurSettingsList[CurController].AssignList[Index]=(WORD)Command;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:25,代碼來源:Controller.cpp

示例9: SaveControllerSettings

bool CControllerManager::SaveControllerSettings(LPCTSTR pszName) const
{
	int Index=FindController(pszName);
	if (Index<0)
		return false;

	const ControllerInfo &Info=m_ControllerList[Index];
	if (!Info.fSettingsChanged)
		return true;

	CSettings Settings;
	TCHAR szFileName[MAX_PATH];

	if (!Info.pController->GetIniFileName(szFileName,lengthof(szFileName)))
		return false;
	if (Settings.Open(szFileName,CSettings::OPEN_WRITE)
			&& Settings.SetSection(Info.pController->GetIniFileSection())) {
		const int NumButtons=Info.pController->NumButtons();
		const CCommandList &CommandList=GetAppClass().CommandList;

		for (int i=0;i<NumButtons;i++) {
			TCHAR szName[64];
			LPCTSTR pszText=NULL;

			::wsprintf(szName,TEXT("Button%d_Command"),i);
			if (Info.Settings.AssignList[i]!=0)
				pszText=CommandList.GetCommandTextByID(Info.Settings.AssignList[i]);
			Settings.Write(szName,pszText!=NULL?pszText:TEXT(""));
		}
		if (!Info.pController->IsActiveOnly())
			Settings.Write(TEXT("ActiveOnly"),Info.Settings.fActiveOnly);
	}
	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:34,代碼來源:Controller.cpp

示例10: GetIniFileName

bool CController::GetIniFileName(LPTSTR pszFileName,int MaxLength) const
{
	LPCTSTR pszIniFileName=GetAppClass().GetIniFileName();

	if (::lstrlen(pszIniFileName)>=MaxLength)
		return false;
	::lstrcpy(pszFileName,pszIniFileName);
	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:9,代碼來源:Controller.cpp

示例11: Apply

bool CViewOptions::Apply(DWORD Flags)
{
	CAppMain &App=GetAppClass();

	if ((Flags&UPDATE_LOGO)!=0) {
		App.UICore.SetLogo(m_fShowLogo?m_szLogoFileName:NULL);
	}

	return true;
}
開發者ID:kento1218,項目名稱:TVTest,代碼行數:10,代碼來源:ViewOptions.cpp

示例12: Menu

void CCaptureWindow::CPreviewEventHandler::OnRButtonDown(int x,int y)
{
    CPopupMenu Menu(GetAppClass().GetResourceInstance(),IDM_CAPTUREPREVIEW);

    Menu.EnableItem(CM_COPY,m_pCaptureWindow->HasImage());
    Menu.EnableItem(CM_SAVEIMAGE,m_pCaptureWindow->HasImage());
    Menu.CheckItem(CM_CAPTURESTATUSBAR,m_pCaptureWindow->IsStatusBarVisible());
    POINT pt= {x,y};
    ::ClientToScreen(m_pCapturePreview->GetHandle(),&pt);
    Menu.Show(m_pCaptureWindow->GetHandle(),&pt,TPM_RIGHTBUTTON);
}
開發者ID:ChenglongWang,項目名稱:TVTest,代碼行數:11,代碼來源:Capture.cpp

示例13: sizeof

bool CTaskbarSharedProperties::Open(LPCTSTR pszName,const CRecentChannelList *pRecentChannels)
{
	bool fExists;

	if (!m_SharedMemory.Create(pszName,
			sizeof(SharedInfoHeader)+sizeof(RecentChannelInfo)*MAX_RECENT_CHANNELS,
			&fExists)) {
		GetAppClass().AddLog(CLogItem::TYPE_ERROR,
							 TEXT("共有メモリ(%s)を作成できません。"),
							 pszName);
		return false;
	}

	m_pHeader=static_cast<SharedInfoHeader*>(m_SharedMemory.Map());
	if (m_pHeader==nullptr) {
		m_SharedMemory.Close();
		return false;
	}

	if (!fExists) {
		m_pHeader->Size=sizeof(SharedInfoHeader);
		m_pHeader->Version=SharedInfoHeader::VERSION_CURRENT;
		m_pHeader->MaxRecentChannels=MAX_RECENT_CHANNELS;

		if (pRecentChannels!=nullptr) {
			DWORD ChannelCount=pRecentChannels->NumChannels();
			if (ChannelCount>MAX_RECENT_CHANNELS)
				ChannelCount=MAX_RECENT_CHANNELS;

			RecentChannelInfo *pChannelList=pointer_cast<RecentChannelInfo*>(m_pHeader+1);

			for (DWORD i=0;i<ChannelCount;i++) {
				TunerChannelInfoToRecentChannelInfo(
					pRecentChannels->GetChannelInfo(ChannelCount-1-i),
					pChannelList+i);
			}

			m_pHeader->RecentChannelCount=ChannelCount;
		} else {
			m_pHeader->RecentChannelCount=0;
		}
	} else {
		if (!ValidateHeader(m_pHeader)) {
			Close();
			return false;
		}
	}

	m_SharedMemory.Unlock();

	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:52,代碼來源:TaskbarSharedProperties.cpp

示例14: WriteSettings

bool CGeneralOptions::WriteSettings(CSettings &Settings)
{
	Settings.Write(TEXT("DriverDirectory"),m_BonDriverDirectory);
	Settings.Write(TEXT("DefaultDriverType"),(int)m_DefaultDriverType);
	Settings.Write(TEXT("DefaultDriver"),m_DefaultBonDriverName);
	Settings.Write(TEXT("Driver"),GetAppClass().CoreEngine.GetDriverFileName());
	Settings.Write(TEXT("Resident"),m_fResident);
	Settings.Write(TEXT("KeepSingleTask"),m_fKeepSingleTask);
	Settings.Write(TEXT("StandaloneProgramGuide"),m_fStandaloneProgramGuide);
	Settings.Write(TEXT("Enable1SegFallback"),m_fEnable1SegFallback);

	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:13,代碼來源:GeneralOptions.cpp

示例15: Apply

bool CGeneralOptions::Apply(DWORD Flags)
{
	CAppMain &App=GetAppClass();

	if ((Flags & UPDATE_RESIDENT)!=0) {
		App.UICore.SetResident(m_fResident);
	}

	if ((Flags & UPDATE_1SEGFALLBACK)!=0) {
		App.CoreEngine.m_DtvEngine.m_TsPacketParser.EnablePATGeneration(m_fEnable1SegFallback);
	}

	return true;
}
開發者ID:DBCTRADO,項目名稱:TVTest,代碼行數:14,代碼來源:GeneralOptions.cpp


注:本文中的GetAppClass函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。