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

C++ LPCTSTR函数代码示例

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

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



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

示例1: _T

/*========================================================================
	Name:	连接 SQL SERVER 数据库. 
	-----------------------------------------------------
	Params:		[dbsrc]:	SQL SERVER 服务器名.
				[dbname]:	默认的数据库名.
				[user]:		用户名.
				[pass]:		密码.
==========================================================================*/
BOOL CAdoConnection::ConnectSQLServer(CString dbsrc, CString dbname, CString user, CString pass, long lOptions)
{
	CString strConnect = _T("Provider=SQLOLEDB.1; Data Source=") + dbsrc + 
						 _T("; Initial Catalog=") + dbname  +
						 _T("; User ID=") + user + 
						 _T("; PWD=") + pass;
	return Open(LPCTSTR(strConnect), lOptions);
}
开发者ID:isongbo,项目名称:MyCode,代码行数:16,代码来源:Ado.cpp


示例2: if

LRESULT CClientDlg::OnWinListChanged( WPARAM wp, LPARAM lp )
{
	list<WIN_INFO> info;
	m_pClient->GetWindowList( info );

	m_TextWinList1.ResetContent();
	list<WIN_INFO>::iterator I = info.begin();

	for( ; I != info.end(); I++ )
	{
		CString s1 = L"";
		if( I->placement.showCmd == SW_SHOWMAXIMIZED )
		{
			s1 = L",Maximized";
		}
		else if( I->placement.showCmd == SW_SHOWMINIMIZED )
		{
			s1 = L",Minimized";
		}
		else if( I->placement.showCmd == SW_SHOWNORMAL )
		{
			s1 = L",Normal";
		}

		CString s;
		s.Format( L"[%08X%s] - \"%s\" (%s)",
			I->id, LPCTSTR(s1), I->title, I->classname );
		#ifdef NoHideJava
		if(NULL!= wcsstr(I->classname,L"SunAwtFrame"))
			m_TextWinList1.AddItem(s,RGB(255,  0, 0), RGB(255, 255,255), I->id);
		else
		if(NULL!= wcsstr(I->classname,L"SunAwtDialog"))
			m_TextWinList1.AddItem(s,RGB(255,  0, 0), RGB(255, 255,255), I->id);
		else
		#else
			if(NULL!= wcsstr(I->classname,L"SunAwtFrame"))
			continue;
		else
			if(NULL!= wcsstr(I->classname,L"SunAwtDialog"))
			continue;
		else
		#endif
		if(NULL!= wcsstr(I->classname,L"IEFrame"))
			m_TextWinList1.AddItem(s,RGB(50,  100, 150), RGB(220, 220,220), I->id);
		else
		if(NULL!= wcsstr(I->classname,L"#"))
			m_TextWinList1.AddItem(s,RGB(0,  0, 0), RGB(245, 245,16), I->id);
		else
		if(NULL!= wcsstr(I->classname,L"Desktop"))
			m_TextWinList1.AddItem(s,RGB(0,  255, 0), RGB(0, 0,0), I->id);
		else
			m_TextWinList1.AddItem(s,RGB(255,  255, 255), RGB(0, 0,0), I->id);

	}
	m_TextWinList1.UpdateData(true);
	Log( L"Received list of windows." );
	return 0;
}
开发者ID:AlexWMF,项目名称:Carberp,代码行数:58,代码来源:ClientDlg.cpp


示例3: _T

/*========================================================================
Name:	连接 ACCESS 数据库. 
-----------------------------------------------------
Params:		[dbpath]:	MDB 数据库file路径名.
[pass]:		访问密码.
===========================================================================*/
BOOL CDBAccess::ConnectAccess(CString dbpath, CString pass, long lOptions)
{
	CString strConnect = _T("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=") + dbpath;
	if (pass != _T("")) 
	{
		strConnect += _T("Jet OLEDB:Database Password=") + pass + _T(";");
	}
	return Open(LPCTSTR(strConnect), lOptions);
}
开发者ID:changjixiong,项目名称:MySourceLib,代码行数:15,代码来源:DBAccess.cpp


示例4: DDX_Text

void CSystemConfigDlg::DoDataExchange(CDataExchange* pDX)
{
	CString temp;
	temp.Format("%d",PacketCount);
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT_PKT_COUNT, temp);
	PacketCount = atoi( LPCTSTR(temp));
	DDX_Check(pDX, IDC_CHECK_FORCE_PRECHECK, ForcePrecheck);
}
开发者ID:piaoxue85,项目名称:tsfriend,代码行数:9,代码来源:SystemConfig.cpp


示例5: UpdateData

void CDirectoryPropPage::OnAddseparatorButton() 
{
	UpdateData(TRUE);
	m_directoryeditstr += m_separatorstr;
	m_directoryformatedit.ReplaceSel(LPCTSTR(m_separatorstr));
	UpdateData(FALSE);
	m_directoryformatedit.SetFocus();
	
}
开发者ID:xeonfusion,项目名称:Mp3TagTools,代码行数:9,代码来源:DirectoryPropPage.cpp


示例6: fprintf

void CAppConfig::SaveHistory(CFile &f)
{
	int i;
	fprintf(f, "[Menu]\r\n");
	for (i = 0; i < history_menu.GetSize(); ++i)
	{
		CString str = history_menu[i];
		if (str[0] == 's')	// bbs
		{
			int p = str.Find('\t');
			if (p <= 0)
				continue;
			int p2 = str.Find('\t', p + 1);
			if (p2 > 0)	// 有進階設定檔
			{
				CString name = str.Mid(1, p - 1);
				CString address = str.Mid(p, (p2 - p));
				CString cfg = str.Mid(p2 + 1);

				str = 's' + name;
				str += address;
				if (0 == strnicmp(cfg, ConfigPath, ConfigPath.GetLength()))
				{
					cfg = cfg.Mid(ConfigPath.GetLength());
					cfg = cfg.Left(cfg.GetLength() - name.GetLength());
					cfg.Replace(';', '\\');
					cfg += name;
					str += '\t';
					str += cfg;
				}
			}
		}
		str += "\r\n";
		f.Write(LPCTSTR(str), str.GetLength());
	}
	fprintf(f, "\r\n[DropDown]\r\n");
	for (i = 0; i < history_dropdown.GetSize(); ++i)
		fprintf(f, "%s\r\n", LPCTSTR(history_dropdown[i]));
	fprintf(f, "\r\n[Typed]\r\n");
	POSITION pos = history.GetHeadPosition();
	for (; pos; history.GetNext(pos))
		fprintf(f, "%s\r\n", LPCTSTR(history.GetAt(pos)));

}
开发者ID:lelou6666,项目名称:pcman-windows,代码行数:44,代码来源:AppConfig.cpp


示例7: GetStyle

//before Subclassing 
void CMyHyperLink::PreSubclassWindow() 
{

	//Enable the Static to send the Window Messages To its parent
	DWORD dwStyle = GetStyle();
	SetWindowLong(GetSafeHwnd() ,GWL_STYLE ,dwStyle | SS_NOTIFY);

	TCHAR szCurretText[MAX_PATH];
	GetWindowText(szCurretText, MAX_PATH);
	if ((szCurretText) == NULL){
		SetWindowText(m_csLinkText.operator LPCTSTR());
	}
	
	LOGFONT sLogFont;
	GetFont()->GetLogFont(&sLogFont);
	//Set the Link UnderLined
	sLogFont.lfUnderline = true;
	//Set the Font to  the Control
	m_oTextFont.CreateFontIndirect(&sLogFont);
	this->SetFont(&m_oTextFont, true);
	
	//Adjust the window
	//IsValidURL();

	//Set the Cursor Hand
	//WinHlp32.exe in windows folder ResourceID 106
	//is a standard window HAND cursor 
	//courtesy www.codeguru.com
	//you can use a custom Hand cursor resourse also
	// i added that  as a resourse in this project with 
	// ID - IDC_CURSOR_HAND

	TCHAR szWindowsDir[MAX_PATH*2];
	GetWindowsDirectory( szWindowsDir ,MAX_PATH*2);
	_tcscat_s( szWindowsDir, MAX_PATH*2, _T( "\\Winhlp32.exe"));
	HMODULE hModule = LoadLibrary(szWindowsDir);
	
	if (hModule){
		m_hHyperCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
	}

	this->SetCursor(m_hHyperCursor);

	//free the module
	if (hModule)
		FreeLibrary(hModule);

	CStatic::PreSubclassWindow();
	this->SetCursor(m_hHyperCursor);
	
	m_ToolTip.Create(this,TTS_ALWAYSTIP);
	CRect oRect;
	GetClientRect(&oRect);
	m_ToolTip.AddTool(this, _T(""),oRect,1001);
	m_ToolTip.ShowWindow(SW_HIDE);
}
开发者ID:GoGoogle,项目名称:WindowsAgent,代码行数:57,代码来源:MyHyperLink.cpp


示例8: while

void Dossier::OnClickedPhoto() 
{
#ifndef	BOB_DEMO_VER

	if (LUF_FighterLF2BAND==Persons2::GetBandFromUID(uid) && RFullPanelDial::gameside == RFullPanelDial::SIDE_LW)
	{
// launch fighters dialog

		int i=0;
		while (Node_Data.gruppe[i].squadron != SQ_ZERO)
		{
			if (Node_Data.gruppe[i].homeairfield == uid)
			{
				if (Node_Data.gruppe[i].AcType()<PT_LW_BOMBERS)
				{
					MainToolBar().OpenACDossier(Node_Data.gruppe[i].wadernum,
						Node_Data.gruppe[i].gruppennum);

					break;
				}
			}
			i++;
		}
	}
	else	
	{
 		if (ReconnRequired())
		{
			int packnum=Todays_Packages_NewPackage(uid,MMC.directives.lw.userprofiles[Directives::LW::RECON]);
			if (packnum < 0)
				RDialog::RMessageBox(IDS_WARNING, IDS_NOAIRCRAFTAVAIL,NULL,NULL,IDS_CONTINUE);
			else
			{
				Todays_Packages[packnum].CalcRoutePositionsAndTime();
				MainToolBar().OnClickedMissionfolder();
				Todays_Packages.InvalidateRoute(&Todays_Packages[packnum],true,true);

			}
		}else
		{
	#ifndef NDEBUG
	#define PLACEMENT	CRect(0,0,512,384)
	#else
	#define	PLACEMENT	Place(POSN_CENTRE,POSN_CENTRE, 0, 0)
	#endif
	//	#define PLACEMENT	CRect(0,0,512,384)
			UniqueID targID=UniqueID(uid);
			CString tname=GetTargName(targID);
			OverLay.SetTargName((char*)LPCTSTR(tname));
			OverLay.loader_art=FIL_LOADING;									//RJS 16Aug00
			LogChild(0,MakeTopDialog(PLACEMENT,DialBox(OverLay.loader_art,new Rtestsh1(UniqueID(uid)),EDGES_NOSCROLLBARS)));
			Rtestsh1::Start3d(Rtestsh1::S3D_DONEBACK);
		}
	}
#endif
}
开发者ID:gondur,项目名称:BOB_Src,代码行数:56,代码来源:DOSSIERB.CPP


示例9: FormatLongPath

void CBrowseForFolder::SetStatusText(const CString& strText) const
{
	if (m_hwnd == NULL)
		return;

	CString oPathString = FormatLongPath(strText);

	(void)SendMessage(m_hwnd, BFFM_SETSTATUSTEXT, NULL,
		reinterpret_cast<long>(LPCTSTR(oPathString/*strText*/)));
}
开发者ID:11050837,项目名称:Dissertation11050837,代码行数:10,代码来源:BrowseForFolder.cpp


示例10: _T

//open the URL by Windows ShellExecute()
bool CMyHyperLink::GoToLinkUrl(CString csLink)
{

	HINSTANCE hInstance = (HINSTANCE)ShellExecute(NULL, _T("open"), csLink.operator LPCTSTR(), NULL, NULL, 2);

	if ((UINT)hInstance < HINSTANCE_ERROR){
		return false;
	}else
		return true;
}
开发者ID:GoGoogle,项目名称:WindowsAgent,代码行数:11,代码来源:MyHyperLink.cpp


示例11: Clean

CFilePath &CFilePath::operator = (LPCWSTR psString)
{
    if (psString == msPath.operator LPCTSTR())
        return *this;

    msPath = psString;
    Clean();

    return *this;
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:10,代码来源:FilePath.cpp


示例12: Msg

void Msg(const char *msg, ...)
{
	CString str;
	va_list ap;
	va_start(ap, msg);
	str.FormatV(msg, ap);
	va_end(ap);
	
	GetBkEndUI()->DoMessageLine(str.operator LPCTSTR(), mmBlueTriangle);
}
开发者ID:ste6an,项目名称:v7lua,代码行数:10,代码来源:StdAfx.cpp


示例13: guard

BOOL SeriesValuesDialog::OnInitDialog() 
{
	int i, j; CString T, T1;

	CDialog::OnInitDialog();
	
	void *x;
	if((x=Series->GainAcsess(READ))!=NULL)
	{
		SeriesProtector guard(x); TSeriesArray& series(guard);
		TChartSeries *graph=series[graph_num];
		graph->GetInfo(strs); ListBox1.ResetContent();  for(i=0;i<strs.GetSize();i++) ListBox1.AddString(strs[i]);			

		LV_ITEM lvi; lvi.mask = LVIF_TEXT;
		ListBox2.InsertColumn(0,"N",LVCFMT_CENTER,40,0);
		ListBox2.InsertColumn(1,"X",LVCFMT_CENTER,50,1);
		ListBox2.InsertColumn(2,"Y",LVCFMT_CENTER,60,2);
		ListBox2.InsertColumn(3,"dY",LVCFMT_CENTER,60,3);	
		ListBox2.InsertColumn(4,"Type",LVCFMT_CENTER,60,3);		
		ListBox2.DeleteAllItems();

		for(i=0;i<graph->GetSize();i++)
		{
			lvi.iItem = i; lvi.iSubItem = 0; T.Format("%d",i);		
			lvi.pszText = (char*)LPCTSTR(T);
			ListBox2.InsertItem(&lvi);
			graph->FormatElement(i,T); 
			int j_last=0, j_cur;
			for(j=0;j<4;j++)
			{			
				if((j_cur=T.Find(9,j_last))>0)
				{
					T1=T.Mid(j_last,j_cur-j_last);
					ListBox2.SetItemText(i,j+1,(char*)LPCTSTR(T1));					
					j_last=j_cur+1;
				}
			}	
		}
	}
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:mar80nik,项目名称:TChart,代码行数:43,代码来源:SeriesValuesDlg.cpp


示例14: UpdateData

void CDlg_H323::PopupCallingDlg()
{
	if(!m_pCallingDlg)
		m_pCallingDlg = new CCallingDlg;
	if(m_pCallingDlg->GetSafeHwnd() == NULL)
		m_pCallingDlg->Create(IDD_DLG_H323_CALLING,this);
	m_pCallingDlg->ShowWindow(SW_SHOW);
	UpdateData(TRUE);
	m_pCallingDlg->ShowTip(LPCTSTR(m_strCalled));
}
开发者ID:tempbottle,项目名称:TestSet,代码行数:10,代码来源:Dlg_H323.cpp


示例15: _tcscpy

void CDlg_H323::SaveAdvSetup()
{
	LPCTSTR strFile = ".\\H323.ini";
	TCHAR strOpt[10];
	LPCTSTR strApp = "网守设置";

	if(m_bViaGK)
		_tcscpy(strOpt,"TRUE");
	else
		_tcscpy(strOpt,"FALSE");
	
	WritePrivateProfileString(strApp,"用网守呼叫",strOpt,strFile);
	if(m_bViaGK)
		WritePrivateProfileString(strApp,"网守",LPCTSTR(m_strGatekeeper),strFile);

	if(m_bName)
		_tcscpy(strOpt,"TRUE");
	else
		_tcscpy(strOpt,"FALSE");

	WritePrivateProfileString(strApp,"用账户名登录",strOpt,strFile);
	if(m_bName)
		WritePrivateProfileString(strApp,"账户名",LPCTSTR(m_strName),strFile);

	if(m_bNumber)
		_tcscpy(strOpt,"TRUE");
	else
		_tcscpy(strOpt,"FALSE");

	WritePrivateProfileString(strApp,"用电话号码登录",strOpt,strFile);
	if(m_bNumber)
		WritePrivateProfileString(strApp,"电话号码",LPCTSTR(m_strNumber),strFile);

	if(m_bViaGW)
		_tcscpy(strOpt,"TRUE");
	else
		_tcscpy(strOpt,"FALSE");

	WritePrivateProfileString("网关设置","使用网关呼叫",strOpt,strFile);
	if(m_bViaGW)
		WritePrivateProfileString("网关设置","网关",LPCTSTR(m_strGateway),strFile);

}
开发者ID:tempbottle,项目名称:TestSet,代码行数:43,代码来源:Dlg_H323.cpp


示例16: OnEditFind

void CTabbedTreeChild::OnEDITFindAgain()
{
	if(gsFindWhat.IsEmpty())
		OnEditFind();
	else
	{
		FINDREPLACE find;
#ifndef rde270
		LPCTSTR p = LPCTSTR(gsFindWhat);
		find.lpstrFindWhat = (LPTSTR)p;
#else   // rde270
		const char* p = LPCTSTR(gsFindWhat);
		find.lpstrFindWhat =const_cast<char*> (p);
#endif  // rde270
		find.Flags=gdwFindFlags;
		getTabBar()->doFindReplace(&find);
	}

}
开发者ID:StephenMcConnel,项目名称:CarlaLegacy,代码行数:19,代码来源:tabbedtreechild.cpp


示例17: GetDlgItem

LRESULT CDlg_H323::OnSendConnect(WPARAM wParam,LPARAM lParam)
{
	GetDlgItem(IDC_H323_HANGUP)->EnableWindow(TRUE);
	AddParty(myContext->remoteIP);
	if(!m_bName)
		AddParty(myContext->localIP);
	else
		AddParty(LPCTSTR(m_strName));
    return 0;
}
开发者ID:tempbottle,项目名称:TestSet,代码行数:10,代码来源:Dlg_H323.cpp


示例18: sprintf

void CHistoryDlg::UpdateHistoryInfoLabel()
{
	TCHAR szLabel[256];

	CString strResourceBundleString;
	strResourceBundleString.LoadString(IDS_ARTICLE_SUBJECT_LINE);

	sprintf(szLabel, LPCTSTR(strResourceBundleString), m_nEntries - m_nDeleted, m_nDeleted, m_nEntries);
	SetDlgItemText(IDC_LABEL_HISTORY_INFO, szLabel);
}
开发者ID:annatar,项目名称:YencPowerPost,代码行数:10,代码来源:HistoryDlg.cpp


示例19: colorDataToVar

void MColorDialog::OnBnClickedPreview()
{
	colorDataToVar(DIFFUSE);
	
	CString tmp;

	tmp.Format("Diffuse color: R %3d G %3d B %3d", m_clr_diffuse.r, m_clr_diffuse.g, m_clr_diffuse.b);

	AfxMessageBox(LPCTSTR(tmp));
}
开发者ID:ogurdima,项目名称:technion-234325-graphics-2013,代码行数:10,代码来源:MColorDialog.cpp


示例20: sError

// returns the path compressed into 8.3 format called a "short path"
CString CPathDescriptor::getShortPath() const
{
	if(!fileExists())	// GetShortPathName() won't work unless the file exists
	{
		//jdh 2/9/00 added an exception here, had just an assert
		CString sError("This file doesn't exist: ");
		sError += LPCTSTR(*this);
		throw(sError);

		//ASSERTX(FALSE);
		//return *this;	// at least this is better than returning junk
	}

	char shortPath[1001];
	*shortPath = 0; // testing
	int x = GetShortPathName( LPCTSTR(*this), shortPath, 1000);
	ASSERTX(x <1001 );
	return CString(shortPath);
}
开发者ID:StephenMcConnel,项目名称:CarlaLegacy,代码行数:20,代码来源:PathDescriptor.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ LPGEN函数代码示例发布时间:2022-05-30
下一篇:
C++ LPCSTR函数代码示例发布时间: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