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

C++ CStringA函数代码示例

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

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



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

示例1: CStringA

//-----  OnBnClickedBtViewColl()  ---------------------------------------------
void CFormChunkMergeView::OnBnClickedBtViewColl()
{
	// TODO: Add your control notification handler code here

	//  switch to form ModelView
	theApp.m_pMainWnd->PostMessage(WM_COMMAND, ID_TOOLS_MODELVIEWER);

	//  load model
	((CNifUtilsSuiteFrame*) theApp.m_pMainWnd)->BroadcastEvent(IBCE_SHOW_MODEL, (void*) CStringA(_fileNameColl).GetString());
}
开发者ID:skyfox69,项目名称:NifUtilsSuite,代码行数:11,代码来源:FormChunkMergeView.cpp


示例2: OnBnClickedOk

void CMissedCallsDlg::OnBnClickedOk()
{
	// TODO: Add your control notification handler code here
	CppSQLite3DB db;
	db.open(CStringA(OUTCALL_DB));
	try {
		db.execDML("update MissedCalls set NewCall=0 where NewCall=2");
	} catch (CppSQLite3Exception& e) { }

	OnOK();
}
开发者ID:bicomsystems,项目名称:outcall,代码行数:11,代码来源:MissedCallsDlg.cpp


示例3: OnCancel

void CMissedCallsDlg::OnCancel()
{
	CppSQLite3DB db;
	db.open(CStringA(OUTCALL_DB));

	try {
		db.execDML("update MissedCalls set NewCall=0 where NewCall=2");	
	} catch (CppSQLite3Exception& e) { }

	CDialog::OnCancel();
}
开发者ID:bicomsystems,项目名称:outcall,代码行数:11,代码来源:MissedCallsDlg.cpp


示例4: String2Bin

void String2Bin(CString str, CByteArray *res)
{
	res->RemoveAll();
	int k=str.GetLength();
	CStringA rab;
	for(int i=0;i<str.GetLength();i+=2) {
		rab = CStringA(str.Mid(i,2));
		char *p = NULL;
		unsigned long bin = strtoul(rab.GetBuffer(), &p, 16);
		res->Add(bin);
	}
}
开发者ID:iostrovs,项目名称:microsip-modified,代码行数:12,代码来源:global.cpp


示例5: CStringA

CStringA CUnicodeUtils::GetUTF8(const CStringA& string)
{
	WCHAR * buf;
	int len = string.GetLength();
	if (len==0)
		return CStringA();
	buf = new WCHAR[len*4 + 1];
	int lengthIncTerminator = MultiByteToWideChar(CP_ACP, 0, string, -1, buf, len * 4);
	CStringW temp = CStringW(buf, lengthIncTerminator - 1);
	delete [] buf;
	return (CUnicodeUtils::GetUTF8(temp));
}
开发者ID:tribis,项目名称:TortoiseGit,代码行数:12,代码来源:UnicodeUtils.cpp


示例6: GetDlgItemText

void CInsertDlg::save()
{
	ImageInfo item = album.record(fileno[cur]);
	ImageInfo newitem = item;
	string m[] = { "中国", "华师大", "null" };
	CString s;
	GetDlgItemText(IDC_EDIT2, s);
	newitem.set_textcn(string(CStringA(s)));
	GetDlgItemText(IDC_EDIT3, s);
	newitem.set_texten(string(CStringA(s)));
	GetDlgItemText(IDC_EDIT4, s);
	newitem.set_postion(string(CStringA(s)));
	GetDlgItemText(IDC_EDIT5, s);
	newitem.set_posl(string(CStringA(s)));
	GetDlgItemText(IDC_EDIT6, s);
	newitem.set_lname(string(CStringA(s)));
	GetDlgItemText(IDC_EDIT7, s);
	newitem.set_uper(string(CStringA(s)));

	int radio = GetCheckedRadioButton(IDC_RADIO_1, IDC_RADIO_3) - IDC_RADIO_1;
	newitem.set_map(m[radio]);
	item = newitem;
	album.update(item, newitem);
	init();
}
开发者ID:KaitoHH,项目名称:iPhotoBookManager,代码行数:25,代码来源:InsertDlg.cpp


示例7: CStringA

bool CDBAdo::CheckStation(string totalStr[],CString currentStr, CString &lastStr)
{
	string strCurrent;
	strCurrent = CStringA(currentStr);

	for (int i=0; i<32; i++)
	{
		if (strstr(totalStr[i].c_str(),strCurrent.c_str()))
		{
			if (i == 0)
			{
				return false;
			}
			else
			{
				for (int k=0; k<32; k++)
				{
					if (strstr(totalStr[i-1].c_str(),"二维码"))
					{
						lastStr = L"打印二维码界面";
					}
					else if (strstr(totalStr[i-1].c_str(),"功能"))
					{
						lastStr = L"功能测试界面";
					}
					else if (strstr(totalStr[i-1].c_str(),"OQC"))
					{
						lastStr = L"OQC界面";
					}
					else if (strstr(totalStr[i-1].c_str(),"PalletID"))
					{
						lastStr = L"PalletID界面";
					}
					else if (strstr(totalStr[i-1].c_str(),"出货"))
					{
						lastStr = L"出货界面";
					}
					else if (strstr(totalStr[i-1].c_str(),"激活"))
					{
						lastStr = L"激活界面";
					}
				}
				break;
			}
		}
	}
	if (lastStr.GetLength() <= 0)
	{
		return false;
	}
	return true;
}
开发者ID:HanoiGuo,项目名称:BoJay-SFIS,代码行数:52,代码来源:DBAdo.cpp


示例8: m_pD3DXCompileShader

HRESULT CPixelShaderCompiler::CompileShader(
    LPCSTR pSrcData,
    LPCSTR pFunctionName,
    LPCSTR pProfile,
    DWORD Flags,
    IDirect3DPixelShader9** ppPixelShader,
    CString* disasm,
    CString* errmsg)
{
    if (!m_pD3DXCompileShader || !m_pD3DXDisassembleShader) {
        return E_FAIL;
    }

    HRESULT hr;

    CComPtr<ID3DXBuffer> pShader, pDisAsm, pErrorMsgs;
    hr = m_pD3DXCompileShader(pSrcData, (UINT)strlen(pSrcData), NULL, NULL, pFunctionName, pProfile, Flags, &pShader, &pErrorMsgs, NULL);

    if (FAILED(hr)) {
        if (errmsg) {
            CStringA msg = "Unexpected compiler error";

            if (pErrorMsgs) {
                int len = pErrorMsgs->GetBufferSize();
                memcpy(msg.GetBufferSetLength(len), pErrorMsgs->GetBufferPointer(), len);
            }

            *errmsg = msg;
        }

        return hr;
    }

    if (ppPixelShader) {
        if (!m_pD3DDev) {
            return E_FAIL;
        }
        hr = m_pD3DDev->CreatePixelShader((DWORD*)pShader->GetBufferPointer(), ppPixelShader);
        if (FAILED(hr)) {
            return hr;
        }
    }

    if (disasm) {
        hr = m_pD3DXDisassembleShader((DWORD*)pShader->GetBufferPointer(), FALSE, NULL, &pDisAsm);
        if (SUCCEEDED(hr) && pDisAsm) {
            *disasm = CStringA((const char*)pDisAsm->GetBufferPointer());
        }
    }

    return S_OK;
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:52,代码来源:PixelShaderCompiler.cpp


示例9: _T

void CSettingDlg::OnBnClickedButtonPath()
{
	// 在此添加控件通知处理程序代码
	TCHAR szFilter[] = _T("图片文件(*.jpg;*.jpeg;*.bmp;*.png)|*.jpg;*.jpeg;*.bmp;*.png||");
	CFileDialog fileDlg(true, NULL, NULL, 0, szFilter, this);
	CString strFilePath;
	if (IDOK == fileDlg.DoModal()){
		strFilePath = fileDlg.GetPathName();
		CStatic *m_pic = (CStatic *)GetDlgItem(IDC_IMAGE);
		show_avator(strFilePath, m_pic);
		setting.avatorpath = CStringA(strFilePath);
	}
}
开发者ID:KaitoHH,项目名称:iPhotoBookManager,代码行数:13,代码来源:SettingDlg.cpp


示例10: strncpy_s

CStringA ISOLang::ISO6391To6392(LPCSTR code)
{
    CHAR tmp[2 + 1];
    strncpy_s(tmp, code, 2);
    tmp[2] = 0;
    _strlwr_s(tmp);
    for (size_t i = 0, cnt = _countof(s_isolangs); i < cnt; i++) {
        if (!strcmp(s_isolangs[i].iso6391, tmp)) {
            return CStringA(s_isolangs[i].iso6392);
        }
    }
    return "";
}
开发者ID:Blitzker,项目名称:mpc-hc,代码行数:13,代码来源:ISOLang.cpp


示例11: pConfig

//-----  OnBnClickedBtPathNifxml()  -------------------------------------------
void COptionsPageGeneral::OnBnClickedBtPathNifxml()
{
	Configuration*	pConfig(Configuration::getInstance());

	UpdateData(TRUE);
	_pathNifXML = FDFileHelper::getFile(_pathNifXML, _T("Nif-XML (nif.xml)|nif.xml||"), _T("xml"), false, _T("Please select Nif.xml file"), OFN_FILEMUSTEXIST);
	UpdateData(FALSE);
	m_ToolTip.AddTool(GetDlgItem(IDC_ED_PATH_NIFXML), _pathNifXML);

	//  re-initialize material list
	delete NifUtlMaterialList::getInstance();
	NifUtlMaterialList::initInstance(CStringA(_pathNifXML).GetString(), pConfig->_matScanTag, pConfig->_matScanName);
}
开发者ID:skyfox69,项目名称:NifUtilsSuite,代码行数:14,代码来源:OptionsPageGeneral.cpp


示例12: CString

void CPPageFormats::AddAutoPlayToRegistry(autoplay_t ap, bool fRegister)
{
	TCHAR buff[_MAX_PATH];
	if (::GetModuleFileName(AfxGetInstanceHandle(), buff, _MAX_PATH) == 0) {
		return;
	}
	CString exe = buff;

	int i = (int)ap;
	if (i < 0 || i >= countof(handlers)) {
		return;
	}

	CRegKey key;

	if (fRegister) {
		if (ERROR_SUCCESS != key.Create(HKEY_CLASSES_ROOT, _T("MediaPlayerClassic.Autorun"))) {
			return;
		}
		key.Close();

		if (ERROR_SUCCESS != key.Create(HKEY_CLASSES_ROOT,
										CString(CStringA("MediaPlayerClassic.Autorun\\Shell\\Play") + handlers[i].verb + "\\Command"))) {
			return;
		}
		key.SetStringValue(NULL, _T("\"") + exe + _T("\"") + handlers[i].cmd);
		key.Close();

		if (ERROR_SUCCESS != key.Create(HKEY_LOCAL_MACHINE,
										CString(CStringA("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\AutoplayHandlers\\Handlers\\MPCPlay") + handlers[i].verb + "OnArrival"))) {
			return;
		}
		key.SetStringValue(_T("Action"), ResStr(handlers[i].action));
		key.SetStringValue(_T("Provider"), _T("Media Player Classic"));
		key.SetStringValue(_T("InvokeProgID"), _T("MediaPlayerClassic.Autorun"));
		key.SetStringValue(_T("InvokeVerb"), CString(CStringA("Play") + handlers[i].verb));
		key.SetStringValue(_T("DefaultIcon"), exe + _T(",0"));
		key.Close();

		if (ERROR_SUCCESS != key.Create(HKEY_LOCAL_MACHINE,
										CString(CStringA("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\AutoplayHandlers\\EventHandlers\\Play") + handlers[i].verb + "OnArrival"))) {
			return;
		}
		key.SetStringValue(CString(CStringA("MPCPlay") + handlers[i].verb + "OnArrival"), _T(""));
		key.Close();
	} else {
		if (ERROR_SUCCESS != key.Create(HKEY_LOCAL_MACHINE,
										CString(CStringA("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\AutoplayHandlers\\EventHandlers\\Play") + handlers[i].verb + "OnArrival"))) {
			return;
		}
		key.DeleteValue(CString(CStringA("MPCPlay") + handlers[i].verb + "OnArrival"));
		key.Close();
	}
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:54,代码来源:PPageFormats.cpp


示例13: CTrace

CControl::CControl()
{
	m_ControlState = NO_INICIADO;

	m_Traces = new CTrace();
	m_cfgProxy = CConfigProxy::GetInstance();

	m_numClientSockets = 12 + (10 * m_cfgProxy->getTunersNumber());
	m_clientSockets = new InfoClientSocket[m_numClientSockets];

	wdControlErr = 0;
	wdControlErr_Count = 10;
	
	m_clientSocket = 0; //Current socket
	m_NumMsg = 0;

	m_HDHRClientIP = new char[16];
	strcpy(m_HDHRClientIP, "");
	m_HDHRClientPort = 0;
	strcpy(m_location, CStringA(m_cfgProxy->lineup_location));
	m_libHDHR.setLocation(m_location);

	m_numTuners = m_cfgProxy->getTunersNumber();

	//Initilize Tuners
	m_infoTuners = new CTuner[m_numTuners];

	for (int i = 0; i < m_numTuners; i++)
	{
		m_infoTuners[i].setTuner(i);
		m_infoTuners[i].transportTuner->setTuner(i);
	}

	//Initialization structure for the treatment of messages HDHR
	m_infoMsg = new InfoMessageHDHR;
	m_infoMsg->tipoMsg = ERROR_MSG;
	m_infoMsg->setMsg = 0;
	m_infoMsg->RequestMsg = new char[50];
	m_infoMsg->peticionMsg = new char[50];
	m_infoMsg->setValue = (char*)malloc(200);
	strcpy(m_infoMsg->setValue, "");
	strcpy(m_infoMsg->unknownMsg, "");
	m_infoMsg->numTuner = 0;
	m_infoMsg->seqUpgrade = 0;
	m_infoMsg->upgradeMsg = 0;
	m_infoMsg->IDLockkeyReceived = 0;


	pObject = this;
	SetTimer(NULL, NULL, 10000, TimerProcTuners_Wrapper);
}
开发者ID:vdomin,项目名称:HDHRProxyIPTV,代码行数:51,代码来源:Control.cpp


示例14: OnBnClickedButtonRemove

void CMissedCallsDlg::OnBnClickedButtonRemove()
{
	// TODO: Add your control notification handler code here
	CString sDate, sTime, callee, callerID;
	int nItem = m_list.GetNextItem(-1, LVNI_SELECTED);
	if (nItem==-1)
		return;
	if (MessageBox(_("Are you sure you want to delete the selected items?"), APP_NAME, MB_YESNO | MB_ICONQUESTION)==IDYES) {		
		CppSQLite3DB db;
		db.open(CStringA(OUTCALL_DB));			
		
		CString query, table;
		if (m_cboShow.GetCurSel()==0)
			table="MissedCalls";
		else if (m_cboShow.GetCurSel()==1)
			table="RecivedCalls";
		else
			table="PlacedCalls";		

		int nIndex;

		try {

			db.execDML("begin transaction");

			while (nItem!=-1) { //from to time date
				callerID = m_list.GetItemText(nItem, 0);
				callee = m_list.GetItemText(nItem, 1);
				sDate = m_list.GetItemText(nItem, 2);
				nIndex = sDate.Find(_T(", "));
				sTime = sDate.Mid(nIndex+2);
				sDate = sDate.Mid(0, nIndex);

				query = "delete from " + table + " where (CallerID='" + EscapeSQLString(callerID) + "' and Callee='" + 
					EscapeSQLString(callee) + "' and Date='" + sDate +"' and Time='" + sTime + "')";
				db.execDML(query.GetBuffer());
				
				m_list.DeleteItem(nItem);
				nItem--;
				nItem = m_list.GetNextItem(nItem, LVNI_SELECTED);
			}

			db.execDML("end transaction");		

		} catch (CppSQLite3Exception& e) { }
	}
	BOOL bEnable = (m_list.GetNextItem(-1, LVNI_SELECTED)!=-1)?TRUE:FALSE;
	GetDlgItem(IDC_BUTTON_REMOVE)->EnableWindow(bEnable);
	GetDlgItem(IDC_BUTTON_CALL)->EnableWindow(bEnable);	
	m_btnAddContact.EnableWindow(bEnable && (::theApp.GetProfileInt("Settings", "OutlookFeatures", 1)==1));
}
开发者ID:bicomsystems,项目名称:outcall,代码行数:51,代码来源:MissedCallsDlg.cpp


示例15: ReadMemoryStringA

CStringA ReadMemoryStringA(size_t address, SIZE_T max)
{
	auto buffer = std::make_unique<char[]>( max + 1 );
	SIZE_T bytesRead;
	
	if ( ReadMemory( (PVOID) address, buffer.get( ), max, &bytesRead ) != 0 )
	{
		for (int i = 0; i < bytesRead; i++)
		{
			if ( !( isprint( buffer[ i ] ) ) && buffer[ i ] != '\0' )
				buffer[i] = '.';
		}

		buffer[bytesRead] = '\0';

		return CStringA(buffer.get());
	} else {
#ifdef _DEBUG
		PrintOut( _T( "[ReadMemoryString]: Failed to read memory, GetLastError() = %s" ), Utils::GetLastErrorString( ).GetString( ) );
#endif
		return CStringA( ".." );
	}
}
开发者ID:ChunHungLiu,项目名称:Reclass-2015,代码行数:23,代码来源:stdafx.cpp


示例16: EVP_CIPHER_CTX_cleanup

STDMETHODIMP CBCipher::Create(BSTR bstrAlgo, short iMode)
{
	int i;

	EVP_CIPHER_CTX_cleanup(&m_ctx);

	int iAlgo = -1;
	for(i = 0; i < sizeof(s_CipherAlgos) / sizeof(s_CipherAlgos[0]); i ++)
		if(!_wcsicmp(s_CipherAlgos[i].Name, bstrAlgo))
		{
			iAlgo = i;
			break;
		}

	const EVP_CIPHER *pEVP;

	if(iAlgo == -1)
	{
		pEVP = EVP_get_cipherbyname(CStringA(bstrAlgo));

		if(!pEVP)
			return E_INVALIDARG;
	}else
	{
		switch(iMode)
		{
		case 0:
		case 1:
		case -1:pEVP = s_CipherAlgos[i].ecb();break;
		case 2:pEVP = s_CipherAlgos[i].cbc();break;
		case 3:pEVP = s_CipherAlgos[i].cfb();break;
		case 4:pEVP = s_CipherAlgos[i].ofb();break;
		default:return E_INVALIDARG;
		};
	}

	if(iMode != -1 && iMode != EVP_CIPHER_mode(pEVP))
		return E_INVALIDARG;

	m_iKeySize = EVP_CIPHER_key_length(pEVP);
	m_pKey.Allocate(m_iKeySize);
	m_pIV.Free();

	m_bPadding = TRUE;

	EVP_CipherInit_ex(&m_ctx, pEVP, NULL, m_pKey, m_pIV, 0);

	return S_OK;
}
开发者ID:2Quico,项目名称:netbox,代码行数:49,代码来源:BCipher.cpp


示例17: MessageBox

void CForeignStockDlg::OnBnClickedButtonSendforeignstock()
{
	// TODO: Add your control notification handler code here

	if( m_strAccount.IsEmpty() )
	{
		MessageBox(_T("OSAccount is not assigned"));
		return;
	}
	
	int nSize = 1024;
	TCHAR caBuf[1024] = {0};
	
	CString strStockNo;
	CString strPrice;
	CString strQty;
	int		nQty;

	GetDlgItemText(IDC_EDIT_STOCKNO,strStockNo);
	GetDlgItemText(IDC_EDIT_PRICE,strPrice);
	GetDlgItemText(IDC_EDIT_QTY,strQty);
	
	nQty = atoi( CStringA(strQty) );

	int nBuySell		= m_boxBuySell.GetCurSel();
	int nAccountType	= m_boxAccountType.GetCurSel()+1;

	CString strCurrency1;
	m_boxCurrency1.GetWindowTextA(strCurrency1);
	
	CString strCurrency2;
	m_boxCurrency2.GetWindowTextA(strCurrency2);
	
	CString strCurrency3;
	m_boxCurrency3.GetWindowTextA(strCurrency3);
	
	CString strExchangeNo;
	m_boxExchange.GetWindowTextA(strExchangeNo);

	int nCode = SendForeignStockOrder(m_strAccount,strStockNo,strExchangeNo,nBuySell,strPrice,nQty,strCurrency1,strCurrency2,strCurrency3,nAccountType,caBuf,&nSize);

	COrderTesterDlg* pDlg = (COrderTesterDlg*) AfxGetMainWnd();

	CString strMsg;
	strMsg.Format(_T("Return Code : %d  Message:%s"),nCode,caBuf);

	pDlg->AddReport( strMsg);

}
开发者ID:weini2,项目名称:Capital,代码行数:49,代码来源:ForeignStockDlg.cpp


示例18: OutputDebugString

void Socket_IOCP::RecvCB(DWORD dwStatus/*״̬*/,BYTE *pClient, BYTE* pBuf, DWORD dwSize, LPVOID pUserData)
{
	//printf("recvCB_%I64d_client=%x,pbuf=%s,dwSize=%d\r\n",g_iRecvCnt++,pClient,pBuf,dwSize);
	if(dwSize>1024)
	{
		//非法数据
		CString  slog;
		slog.Format(_T("recvCB_Error_size:%d\r\n"),dwSize);
		OutputDebugString(slog);
	//	return;
	}

	Socket_IOCP *pThis = (Socket_IOCP*)pUserData;
	LISTITEMINFOEX *pItem = NULL;
	int nwaitCnt = 300;
	while(pItem==NULL && nwaitCnt-->0)
	{
		pItem=pThis->m_pDataList->FetchEmptyHeadItem(dwSize,0,0,0);
		if(pItem ==NULL)
			Sleep(10);
	}
	CString strLog;
	if(pItem==NULL)
	{
		strLog.Format(_T("Lost Data %s--%d,dataCnt=%d"),CStringA(pBuf),dwSize,pThis->m_pDataList->GetSizeOfDataList());
		OutputDebugString(strLog);
		return;
	}
	//if(dwSize >100)dwSize = 100;

// 	char g_tempbuf[1024];
// 	ZeroMemory(g_tempbuf,1024);
// 	buf2HexStr((const char*)pBuf,g_tempbuf,dwSize);
// 	CStringA ss;
// 	ss.Format(("recvCB__client=%x,pbuf=%s---%s,dwSize=%d--%d"),pClient,CStringA(pBuf),CStringA(g_tempbuf),dwSize,pThis->m_pDataList->GetSizeOfDataList());
// 	OutputDebugStringA(ss);
// 	CString ss1;
// 	ss1.Format(_T("recvCB__client=%x,pbuf=%s---%s,dwSize=%d--%d"),pClient,CStringA(pBuf),CStringA(g_tempbuf),dwSize,pThis->m_pDataList->GetSizeOfDataList());
// 
// 	WriteLog(_T("iocp"),logLevelInfo,ss1);

	memcpy(pItem->pBufV0,pBuf,dwSize);
	pItem->nBufSizeUsedV0 = dwSize;
	//memcpy(&pItem->curSocketInfo.tcpSocketHandle,&pClient,sizeof(DWORD));
	pItem->curSocketInfo.tcpSocketHandle =(DWORD) pClient;
	
	pThis->m_pDataList->AddItem2DataTail(pItem);
	
}
开发者ID:daiybh,项目名称:GPSGater,代码行数:49,代码来源:Socket_IOCP.cpp


示例19: MQGetPlugInName

//---------------------------------------------------------------------------
//  MQGetPlugInName
//    プラグイン名を返す。
//    この関数は[プラグインについて]表示時に呼び出される。
//---------------------------------------------------------------------------
MQPLUGIN_EXPORT const char* MQGetPlugInName(void)
{
	TCHAR dllFilePath[MAX_PATH] = {};
	::GetModuleFileName(AfxGetInstanceHandle(), dllFilePath, MAX_PATH);

	MyUtils::VersionInfoStringPack verinfo;
	verinfo.QueryVersionInfoAsStrings(dllFilePath);

	const auto pluginFullName = verinfo.ProductName + _T("  Ver.") + verinfo.ProductVersion + _T("    ") + verinfo.LegalCopyright;

	// 複数のスレッドから同時に呼び出されることは決してないという前提。
	static CStringA name;
	name = CStringA(pluginFullName);
	return name;
}
开发者ID:sygh-JP,项目名称:SyghMQPlugins,代码行数:20,代码来源:SyghMQUVImplant.cpp


示例20: gitPath

void CRepositoryBrowser::OpenFile(const CString path, eOpenType mode, bool isSubmodule, CGitHash itemHash)
{
	CTGitPath gitPath(path);

	CString temppath;
	CString file;
	GetTempPath(temppath);
	CGitHash hash;
	if (g_Git.GetHash(hash, m_sRevision))
	{
		MessageBox(g_Git.GetGitLastErr(_T("Could not get hash of ") + m_sRevision + _T(".")), _T("TortoiseGit"), MB_ICONERROR);
		return;
	}

	file.Format(_T("%s%s_%s%s"), temppath, gitPath.GetBaseFilename(), hash.ToString().Left(g_Git.GetShortHASHLength()), gitPath.GetFileExtension());

	if (isSubmodule)
	{
		file += _T(".txt");
		CFile submoduleCommit(file, CFile::modeCreate | CFile::modeWrite);
		CStringA commitInfo = "Subproject commit " + CStringA(itemHash.ToString());
		submoduleCommit.Write(commitInfo, commitInfo.GetLength());
	}
	else if (g_Git.GetOneFile(m_sRevision, gitPath, file))
	{
		CString out;
		out.Format(IDS_STATUSLIST_CHECKOUTFILEFAILED, gitPath.GetGitPathString(), m_sRevision, file);
		MessageBox(out, _T("TortoiseGit"), MB_OK);
		return;
	}

	if (mode == ALTERNATIVEEDITOR)
	{
		CAppUtils::LaunchAlternativeEditor(file);
		return;
	}
	else if (mode == OPEN)
	{
		int ret = HINSTANCE_ERROR;
		ret = (int)ShellExecute(this->m_hWnd, NULL, file, NULL, NULL, SW_SHOW);

		if (ret > HINSTANCE_ERROR)
			return;
	}

	CString cmd = _T("RUNDLL32 Shell32,OpenAs_RunDLL ") + file;
	CAppUtils::LaunchApplication(cmd, NULL, false);
}
开发者ID:3F,项目名称:tortoisegit-mdc,代码行数:48,代码来源:RepositoryBrowser.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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