• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetAppClass函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了GetAppClass函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: GetCurrentEpgTime

const CEventInfoData *CChannelMenuItem::GetEventInfo(CEpgProgramList *pProgramList,
													 int Index,const SYSTEMTIME *pCurTime)
{
	if (Index<0 || Index>=lengthof(m_EventList)
			|| (Index>0 && !m_EventList[Index-1].fValid)
			|| m_pChannelInfo->GetServiceID()==0)
		return NULL;
	if (!m_EventList[Index].fValid) {
		SYSTEMTIME st;

		if (Index==0) {
			if (pCurTime!=NULL)
				st=*pCurTime;
			else
				GetCurrentEpgTime(&st);
		} else {
			if (!m_EventList[Index-1].EventInfo.GetEndTime(&st))
				return NULL;
		}

		bool fCurrent=false;
		if (pCurTime==NULL && Index<=1) {
			CAppMain &App=GetAppClass();
			CAppCore::StreamIDInfo StreamID;

			if (App.Core.GetCurrentStreamIDInfo(&StreamID)
					&& m_pChannelInfo->GetNetworkID()==StreamID.NetworkID
					&& m_pChannelInfo->GetTransportStreamID()==StreamID.TransportStreamID) {
				if (!App.CoreEngine.GetCurrentEventInfo(&m_EventList[Index].EventInfo,
														m_pChannelInfo->GetServiceID(),
														Index>0))
					return NULL;
				fCurrent=true;
			}
		}

		if (!fCurrent) {
			if (!pProgramList->GetEventInfo(m_pChannelInfo->GetNetworkID(),
											m_pChannelInfo->GetTransportStreamID(),
											m_pChannelInfo->GetServiceID(),
											&st,&m_EventList[Index].EventInfo))
				return NULL;
		}

		m_EventList[Index].fValid=true;
	}

	return &m_EventList[Index].EventInfo;
}
开发者ID:kento1218,项目名称:TVTest,代码行数:49,代码来源:Menu.cpp


示例17: Lock

int CAudioManager::GetDefaultAudio(AudioSelectInfo *pSelectInfo) const
{
	CBlockLock Lock(&m_Lock);

	if (m_AudioList.empty())
		return -1;

	const CAudioOptions &AudioOptions=GetAppClass().AudioOptions;
	bool fDefault=true;

	if (AudioOptions.GetEnableLanguagePriority()) {
		const CAudioOptions::AudioLanguageList &PriorityList=AudioOptions.GetLanguagePriority();

		if (!PriorityList.empty()) {
			for (auto itPriority=PriorityList.begin();itPriority!=PriorityList.end();++itPriority) {
				for (auto itAudio=m_AudioList.begin();itAudio!=m_AudioList.end();++itAudio) {
					if (itAudio->Language==itPriority->Language
							&& itAudio->DualMono!=DUALMONO_BOTH) {
						if (!itPriority->fSub
								|| itAudio!=m_AudioList.begin()
								|| itAudio->DualMono==CAudioManager::DUALMONO_SUB) {
							if (pSelectInfo!=nullptr) {
								pSelectInfo->ComponentTag=itAudio->ComponentTag;
								pSelectInfo->DualMono=itAudio->DualMono;
							}
							return (int)std::distance(m_AudioList.begin(),itAudio);
						}
					}
				}
			}
		}
	}

	if (pSelectInfo!=nullptr) {
		const AudioInfo &Info=m_AudioList.front();

		pSelectInfo->ComponentTag=Info.ComponentTag;
		if (Info.IsDualMono()) {
			if (m_SelectedAudio.DualMono!=DUALMONO_INVALID)
				pSelectInfo->DualMono=m_SelectedAudio.DualMono;
			else
				pSelectInfo->DualMono=DUALMONO_MAIN;
		} else {
			pSelectInfo->DualMono=DUALMONO_INVALID;
		}
	}

	return 0;
}
开发者ID:kento1218,项目名称:TVTest,代码行数:49,代码来源:AudioManager.cpp


示例18: GetItemText

void CMenuOptions::GetItemText(int ID,LPTSTR pszText,int MaxLength) const
{
	if (ID==MENU_ID_SEPARATOR) {
		::lstrcpyn(pszText,TEXT("�@<��؂�>"),MaxLength);
	} else {
		for (int i=0;i<lengthof(m_DefaultMenuItemList);i++) {
			if (m_DefaultMenuItemList[i].ID==ID) {
				::LoadString(GetAppClass().GetResourceInstance(),
							 m_DefaultMenuItemList[i].TextID,
							 pszText,MaxLength);
				break;
			}
		}
	}
}
开发者ID:ACUVE,项目名称:TVTest,代码行数:15,代码来源:MenuOptions.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetAppName函数代码示例发布时间:2022-05-30
下一篇:
C++ GetApp函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap