您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wcscpy_c函数代码示例

51自学网 2021-06-03 09:53:37
  C++
这篇教程C++ wcscpy_c函数代码示例写得很实用,希望能帮到您。

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

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

示例1: wcscpy_c

bool CConEmuUpdate::CanUpdateInstallation(){	if (UpdateDownloadSetup() == 1)	{		// Если через Setupper - то msi сам разберется и ругнется когда надо		return true;	}	// Раз дошли сюда - значит ConEmu был просто "распакован"	if (IsUserAdmin())	{		// ConEmu запущен "Под администратором", проверки не нужны		return true;	}	wchar_t szTestFile[MAX_PATH*2];	wcscpy_c(szTestFile, gpConEmu->ms_ConEmuExeDir);	wcscat_c(szTestFile, L"//ConEmuUpdate.check");	HANDLE hFile = CreateFile(szTestFile, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_TEMPORARY, NULL);	if (hFile == INVALID_HANDLE_VALUE)	{		DWORD nErr = GetLastError();		wcscpy_c(szTestFile, L"Can't update installation folder!/r/n");		wcscat_c(szTestFile, gpConEmu->ms_ConEmuExeDir);		DisplayLastError(szTestFile, nErr);		return false;	}	CloseHandle(hFile);	DeleteFile(szTestFile);	// OK	return true;}
开发者ID:NickLatysh,项目名称:conemu,代码行数:35,


示例2: wchar_t

bool TermX::GetSubstitute(const MOUSE_EVENT_RECORD& m, wchar_t (&szSubst)[16]){	if (m.dwEventFlags & MOUSE_WHEELED)	{		// If the high word of the dwButtonState member contains		// a positive value, the wheel was rotated forward, away from the user.		// Otherwise, the wheel was rotated backward, toward the user.		short dir = (short)HIWORD(m.dwButtonState);		// Ctrl/Alt/Shift		DWORD mods = (m.dwControlKeyState & (LEFT_ALT_PRESSED|LEFT_CTRL_PRESSED|RIGHT_ALT_PRESSED|RIGHT_CTRL_PRESSED|SHIFT_PRESSED));		if (mods == 0)		{			if (dir <= 0)				wcscpy_c(szSubst, L"/033[62~"); // <MouseDown>			else				wcscpy_c(szSubst, L"/033[63~"); // <MouseUp>			return true;		}		else if (mods == SHIFT_PRESSED)		{			if (dir <= 0)				wcscpy_c(szSubst, L"/033[64~"); // <S-MouseDown>			else				wcscpy_c(szSubst, L"/033[65~"); // <S-MouseUp>			return true;		}	}	return false;}
开发者ID:KubaBest,项目名称:ConEmu,代码行数:32,


示例3: wcscpy_c

void ConEmuAbout::OnInfo_WhatsNew(bool bLocal){	wchar_t sFile[MAX_PATH+80];	int iExec = -1;	if (bLocal)	{		wcscpy_c(sFile, gpConEmu->ms_ConEmuBaseDir);		wcscat_c(sFile, L"//WhatsNew-ConEmu.txt");		if (FileExists(sFile))		{			iExec = (int)ShellExecute(ghWnd, L"open", sFile, NULL, NULL, SW_SHOWNORMAL);			if (iExec >= 32)			{				return;			}		}	}	wcscpy_c(sFile, gsWhatsNew);	iExec = (int)ShellExecute(ghWnd, L"open", sFile, NULL, NULL, SW_SHOWNORMAL);	if (iExec >= 32)	{		return;	}	DisplayLastError(L"File 'WhatsNew-ConEmu.txt' not found, go to web page failed", iExec);}
开发者ID:Alexander-Shukaev,项目名称:ConEmu,代码行数:30,


示例4: while

void CConEmuUpdate::WaitAllInstances(){	while (true)	{		bool bStillExists = false;		wchar_t szMessage[255];		wcscpy_c(szMessage, L"Please, close all ConEmu instances before continue");		HWND hFind = FindWindowEx(NULL, NULL, VirtualConsoleClassMain, NULL);		if (hFind)		{			bStillExists = true;			DWORD nPID; GetWindowThreadProcessId(hFind, &nPID);			_wsprintf(szMessage+_tcslen(szMessage), SKIPLEN(64) L"/nConEmu still running, PID=%u", nPID);		}		if (!bStillExists)		{			TODO("Можно бы проехаться по всем модулям запущенных процессов на предмет блокировки файлов в папках ConEmu");		}		// Если никого запущенного не нашли - выходим из цикла		if (!bStillExists)			return;		// Ругнуться		int nBtn = MessageBox(NULL, szMessage, ms_DefaultTitle, MB_ICONEXCLAMATION|MB_OKCANCEL);		if (nBtn == IDCANCEL)			return; // "Cancel" - means stop checking	}}
开发者ID:NickLatysh,项目名称:conemu,代码行数:31,


示例5: GuiClientRetHook

LRESULT CALLBACK GuiClientRetHook(int nCode, WPARAM wParam, LPARAM lParam){	if (nCode == HC_ACTION)	{		CWPRETSTRUCT* p = (CWPRETSTRUCT*)lParam;		CREATESTRUCT* pc = NULL;		wchar_t szDbg[200]; szDbg[0] = 0;		wchar_t szClass[127]; szClass[0] = 0;		switch (p->message)		{			case WM_DESTROY:			{				user->getClassNameW(p->hwnd, szClass, countof(szClass));				msprintf(szDbg, countof(szDbg), L"WM_DESTROY on 0x%08X (%s)/n", (DWORD)p->hwnd, szClass);				break;			}			case WM_CREATE:			{				pc = (CREATESTRUCT*)p->lParam;				if (p->lResult == -1)				{					wcscpy_c(szDbg, L"WM_CREATE --FAILED--/n");				}				break;			}			case WM_SIZE:			case WM_MOVE:			case WM_WINDOWPOSCHANGED:			case WM_WINDOWPOSCHANGING:			{				WINDOWPOS *wp = (WINDOWPOS*)p->lParam;				WORD x = LOWORD(p->lParam);				WORD y = HIWORD(p->lParam);				if (p->hwnd == ghAttachGuiClient || p->hwnd == hMonitorWndPos)				{					int nDbg = 0;					if (p->message == WM_WINDOWPOSCHANGING || p->message == WM_WINDOWPOSCHANGED)					{						if ((wp->x > 0 || wp->y > 0) && !isPressed(VK_LBUTTON))						{							if (user->getParent(p->hwnd) == ghConEmuWndBack)							{								//_ASSERTEX(!(wp->x > 0 || wp->y > 0));								break;							}						}					}				}				break;			}		}		if (*szDbg)		{			DebugString(szDbg);		}	}	return user->callNextHookEx(ghGuiClientRetHook, nCode, wParam, lParam);}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:60,


示例6: ModuleName

LPCWSTR ModuleName(LPCWSTR asDefault){	if (asDefault && *asDefault)		return asDefault;	static wchar_t szFile[32];	if (szFile[0])		return szFile;	wchar_t szPath[MAX_PATH*2];	if (GetModuleFileNameW(NULL, szPath, countof(szPath)))	{		wchar_t *pszSlash = wcsrchr(szPath, L'//');		if (pszSlash)			pszSlash++;		else			pszSlash = szPath;		lstrcpynW(szFile, pszSlash, countof(szFile));	}	if (szFile[0] == 0)	{		wcscpy_c(szFile, L"Unknown");	}	return szFile;}
开发者ID:alexlav,项目名称:conemu,代码行数:31,


示例7: ZeroStruct

void CConEmuInside::SetInsideParentWND(HWND hParent){	mh_InsideParentWND = hParent;	if (!hParent || (hParent == INSIDE_PARENT_NOT_FOUND))	{		mh_InsideParentRel = NULL;	}	else	{		ZeroStruct(m_InsideParentInfo);		// Store basic information about parent process (reporting purposes)		DWORD nPID = 0;		if (GetWindowThreadProcessId(hParent, &nPID))		{			m_InsideParentInfo.ParentPID = nPID;			PROCESSENTRY32W PInfo = {};			if (GetProcessInfo(nPID, &PInfo))			{				m_InsideParentInfo.ParentParentPID = PInfo.th32ParentProcessID;				wcscpy_c(m_InsideParentInfo.ExeName, PInfo.szExeFile);			}		}		mh_InitialRoot = GetParentRoot();	}}
开发者ID:2asoft,项目名称:ConEmu,代码行数:29,


示例8: wcscpy_c

bool CConEmuStart::FindBashLocation(CEStr& lsBash){	wchar_t szRoot[MAX_PATH+32], *pszSlash;	wcscpy_c(szRoot, gpConEmu->ms_ConEmuExeDir);	LPCWSTR pszPlaces[] = {		L"//msys//1.0//bin//bash.exe",  // Msys/MinGW		L"//bin//bash.exe",             // Git-Bash		L"//usr//bin//bash.exe",        // Git-For-Windows		NULL	};	// Before ConEmu.exe was intended to be in /bin/ folder	// With Git-For-Windows it may be places in /opt/bin/ subfolder	// So we do searching with two steps	for (size_t i = 0; i <= 1; i++)	{		pszSlash = wcsrchr(szRoot, L'//');		if (pszSlash)			*pszSlash = 0;		for (size_t j = 0; pszPlaces[j]; j++)		{			lsBash = JoinPath(szRoot, pszPlaces[j]);			if (FileExists(lsBash))			{				return true;			}		}	}	// Last chance, without path	lsBash = L"bash.exe";	return false;}
开发者ID:Maximus5,项目名称:ConEmu,代码行数:35,


示例9: wcscpy_c

void MEvent::OnDebugNotify(MEventNotification Action){	wchar_t szInfo[MAX_PATH];	wcscpy_c(szInfo, L"MEvent: ");	switch (Action)	{	case evn_Create:		wcscat_c(szInfo, L"Create"); break;	case evn_Open:		wcscat_c(szInfo, L"Open"); break;	case evn_Set:		wcscat_c(szInfo, L"Set"); break;	case evn_Reset:		wcscat_c(szInfo, L"Reset"); break;	case evn_Close:		wcscat_c(szInfo, L"Close"); break;	default:		wcscat_c(szInfo, L"???");	}	wcscat_c(szInfo, L": ");	if (mb_NameIsNull)		_wsprintf(szInfo + _tcslen(szInfo), SKIPLEN(countof(szInfo) - _tcslen(szInfo)) L"Handle=0x%p", mh_Event);	else		wcscat_c(szInfo, ms_EventName);	DEBUGSTREVT(szInfo);	szInfo[0] = 0;}
开发者ID:1833183060,项目名称:ConEmu,代码行数:27,


示例10: wchar_t

void CConEmuUpdate::GetVersionsFromIni(LPCWSTR pszUpdateVerLocation, wchar_t (&szServer)[100], wchar_t (&szInfo)[100]){	wchar_t szTest[64]; // Дописать stable/preview/alpha	bool bDetected = false, bNewer;	wcscpy_c(szInfo, ms_CurVersion);	struct {		LPCWSTR szSect, szPref, szName;	} Vers[] = {		{sectionConEmuStable,    L"Stable:/t",  L" stable" },		{sectionConEmuPreview, L"/nPreview:/t", L" preview"},		{sectionConEmuDevel,   L"/nDevel:/t",   L" devel"  }	};	szServer[0] = 0;	for (size_t i = 0; i < countof(Vers); i++)	{		wcscat_c(szServer, Vers[i].szPref);		if (GetPrivateProfileString(Vers[i].szSect, L"version", L"", szTest, countof(szTest), pszUpdateVerLocation))		{			bNewer = (lstrcmp(szTest, ms_CurVersion) >= 0);			if (!bDetected && bNewer)			{				bDetected = true;				wcscat_c(szInfo, Vers[i].szName);			}			szTest[10] = 0; wcscat_c(szServer, szTest);			if (bNewer) wcscat_c(szServer, (lstrcmp(szTest, ms_CurVersion) > 0) ? L" (newer)" : L" (equal)");		}		else			wcscat_c(szServer, L"<Not found>");	}}
开发者ID:NickLatysh,项目名称:conemu,代码行数:35,


示例11: wcscpy_c

void CTabPanelBase::UpdateTabFontInt(){	if (!IsTabbarCreated())		return;	LOGFONT lf = {};	lf.lfWeight = FW_DONTCARE;	lf.lfCharSet = gpSet->nTabFontCharSet;	lf.lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;	wcscpy_c(lf.lfFaceName, gpSet->sTabFontFace);	gpFontMgr->EvalLogfontSizes(lf, gpSet->nTabFontHeight, 0);	wchar_t szInfo[100];	_wsprintf(szInfo, SKIPCOUNT(szInfo) L"Creating tab font name='%s' height=%i", lf.lfFaceName, lf.lfHeight);	LogString(szInfo);	// CreateFont	HFONT hFont = CreateFontIndirect(&lf);	// virtual	SetTabbarFont(hFont);	// Store new Font in member variable	if (mh_TabFont)		DeleteObject(mh_TabFont);	mh_TabFont = hFont;}
开发者ID:jslilly,项目名称:ConEmu,代码行数:27,


示例12: _ASSERTE

/// Update GroupBox title, replacing text *between* pszFrom and pszTo with current HotKey/// For example, gbPasteM1 has title "Paste mode #1 (Shift+Ins)", pszFrom=L"(", pszTo=L")"/// Than `Shift+Ins` would be replaced with current user defined hotkey valuevoid CSetPgBase::setCtrlTitleByHotkey(HWND hDlg, WORD nCtrlId, int iHotkeyId, LPCWSTR pszFrom, LPCWSTR pszTo){	if (!hDlg || !nCtrlId || (nCtrlId == (WORD)IDC_STATIC) || (iHotkeyId <= 0))	{		_ASSERTE(FALSE && "Invalid identifiers");		return;	}	if (!pszFrom || !*pszFrom)	{		_ASSERTE(FALSE && "Invalid anchors");		return;	}	wchar_t szKeyFull[128] = L"";	gpSet->GetHotkeyNameById(iHotkeyId, szKeyFull, true);	if (szKeyFull[0] == 0)	{		_ASSERTE(FALSE && "Failed to acquire HotKey");		wcscpy_c(szKeyFull, L"???");	}	CEStr lsLoc;	if (!CLngRc::getControl(nCtrlId, lsLoc))	{		if (GetString(hDlg, nCtrlId, &lsLoc.ms_Val) <= 0)		{			_ASSERTE(FALSE && "No title?");			return;		}	}	LPCWSTR ptr1, ptr2;	ptr1 = wcsstr(lsLoc, pszFrom);	if (!ptr1)	{		_ASSERTE(ptr1 && "pszFrom not found");		return;	}	ptr1 += wcslen(pszFrom);	if (pszTo && *pszTo)	{		ptr2 = wcsstr(ptr1, pszTo);	}	if (ptr2 == ptr1)	{		_ASSERTE(ptr2 != ptr1 && "Invalid source string");		return;	}	// Trim to hotkey beginning	lsLoc.ms_Val[(ptr1 - lsLoc.ms_Val)] = 0;	// And create new title	CEStr lsNew(lsLoc.ms_Val, szKeyFull, ptr2);	// Update control text	SetDlgItemText(hDlg, nCtrlId, lsNew);}
开发者ID:ChunHungLiu,项目名称:ConEmu,代码行数:60,


示例13: wcscpy_c

LRESULT CSetPgTasks::OnInitDialog(HWND hDlg, bool abForceReload){	mb_IgnoreCmdGroupEdit = true;	wchar_t szKey[128] = L"";	const ConEmuHotKey* pDefCmdKey = NULL;	if (!gpSet->GetHotkeyById(vkMultiCmd, &pDefCmdKey) || !pDefCmdKey)		wcscpy_c(szKey, gsNoHotkey);	else		pDefCmdKey->GetHotkeyName(szKey, true);	CEStr lsLabel(L"Default shell (", szKey, L")");	SetDlgItemText(hDlg, cbCmdGrpDefaultCmd, lsLabel);	// Not implemented yet	ShowWindow(GetDlgItem(hDlg, cbCmdGrpToolbar), SW_HIDE);	if (abForceReload)	{		int nTab = 4*4; // represent the number of quarters of the average character width for the font		SendDlgItemMessage(hDlg, lbCmdTasks, LB_SETTABSTOPS, 1, (LPARAM)&nTab);		LONG_PTR nStyles = GetWindowLongPtr(GetDlgItem(hDlg, lbCmdTasks), GWL_STYLE);		if (!(nStyles & LBS_NOTIFY))			SetWindowLongPtr(GetDlgItem(hDlg, lbCmdTasks), GWL_STYLE, nStyles|LBS_NOTIFY);	}	// Сброс ранее загруженного списка (ListBox: lbCmdTasks)	SendDlgItemMessage(hDlg, lbCmdTasks, LB_RESETCONTENT, 0,0);	//if (abForceReload)	//{	//	// Обновить группы команд	//	gpSet->LoadCmdTasks(NULL, true);	//}	int nGroup = 0;	wchar_t szItem[1024];	const CommandTasks* pGrp = NULL;	while ((pGrp = gpSet->CmdTaskGet(nGroup)))	{		swprintf_c(szItem, L"%i/t", nGroup+1);		int nPrefix = lstrlen(szItem);		lstrcpyn(szItem+nPrefix, pGrp->pszName, countof(szItem)-nPrefix);		INT_PTR iIndex = SendDlgItemMessage(hDlg, lbCmdTasks, LB_ADDSTRING, 0, (LPARAM)szItem);		UNREFERENCED_PARAMETER(iIndex);		//SendDlgItemMessage(hDlg, lbCmdTasks, LB_SETITEMDATA, iIndex, (LPARAM)pGrp);		nGroup++;	}	OnComboBox(hDlg, lbCmdTasks, LBN_SELCHANGE);	mb_IgnoreCmdGroupEdit = false;	return 0;}
开发者ID:Maximus5,项目名称:ConEmu,代码行数:57,


示例14: getWindowInfo

void getWindowInfo(HWND ahWnd, wchar_t (&rsInfo)[1024], bool bProcessName /*= false*/, LPDWORD pnPID /*= NULL*/){	DWORD nPID = 0;	if (!ahWnd)	{		wcscpy_c(rsInfo, L"<NULL>");	}	else if (!IsWindow(ahWnd))	{		msprintf(rsInfo, countof(rsInfo), L"0x%08X: Invalid window handle", LODWORD(ahWnd));	}	else	{		wchar_t szClass[256], szTitle[512];		wchar_t szProc[120] = L"";		if (!GetClassName(ahWnd, szClass, 256)) wcscpy_c(szClass, L"<GetClassName failed>");		if (!GetWindowText(ahWnd, szTitle, 512)) szTitle[0] = 0;		if (bProcessName || pnPID)		{			if (GetWindowThreadProcessId(ahWnd, &nPID))			{				PROCESSENTRY32 pi = {};				if (bProcessName && GetProcessInfo(nPID, &pi))				{					pi.szExeFile[100] = 0;					msprintf(szProc, countof(szProc), L" - %s [%u]", pi.szExeFile, nPID);				}			}		}		msprintf(rsInfo, countof(rsInfo), L"0x%08X: %s - '%s'%s", LODWORD(ahWnd), szClass, szTitle, szProc);	}	if (pnPID)		*pnPID = nPID;}
开发者ID:BigVal71,项目名称:ConEmu,代码行数:39,


示例15: wcscpy_c

CBackgroundInfo::CBackgroundInfo(LPCWSTR inPath){	wcscpy_c(ms_BgImage, inPath ? inPath : L"");	ZeroStruct(ftBgModified);	nBgModifiedTick = 0;	//mb_IsFade = bFade;	//mb_NeedBgUpdate = false;	mb_IsBackgroundImageValid = false;	mp_BgImgData = NULL;	CBackgroundInfo* p = this;	g_Backgrounds.push_back(p);}
开发者ID:ForNeVeR,项目名称:ConEmu,代码行数:14,


示例16: UnitExpandTest

void UnitExpandTest(){	CmdArg szExe;	wchar_t szChoc[MAX_PATH] = L"powershell -NoProfile -ExecutionPolicy unrestricted -Command /"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))/" && SET PATH=%PATH%;%systemdrive%//chocolatey//bin";	wchar_t* pszExpanded = ExpandEnvStr(szChoc);	int nLen = pszExpanded ? lstrlen(pszExpanded) : 0;	BOOL bFound = FileExistsSearch(szChoc, szExe, false);	wcscpy_c(szChoc, gpConEmu->ms_ConEmuExeDir);	wcscat_c(szChoc, L"//Tests//Executables//abcd");	bFound = FileExistsSearch(szChoc, szExe, false);	// TakeCommand	ConEmuComspec tcc = {cst_AutoTccCmd};	FindComspec(&tcc, false);}
开发者ID:michaellukashov,项目名称:ConEmu,代码行数:14,


示例17: apiQuerySessionID

LPCWSTR apiQuerySessionID(){	static wchar_t szSessionId[16] = L"";	if (!*szSessionId)	{		DWORD nSessionId = 0;		BOOL bSucceeded = apiQuerySessionID(GetCurrentProcessId(), nSessionId);		if (bSucceeded)			swprintf_c(szSessionId, L"%u", nSessionId);		else			wcscpy_c(szSessionId, L"?");	}	return szSessionId;}
开发者ID:Maximus5,项目名称:ConEmu,代码行数:14,


示例18: GetDlgItem

void CSetPgDebug::debugLogCommand(LogCommandsData* apData){	if (!apData)		return;	/*		struct LogCommandsData		{			BOOL  bInput, bMainThread;			DWORD nTick, nDur, nCmd, nSize, nPID;			wchar_t szPipe[64];		};	*/	wchar_t szText[128];	HWND hList = GetDlgItem(mh_Dlg, lbActivityLog);	wcscpy_c(szText, apData->bInput ? L"In" : L"Out");	LVITEM lvi = {LVIF_TEXT|LVIF_STATE};	lvi.state = lvi.stateMask = LVIS_SELECTED|LVIS_FOCUSED;	lvi.pszText = szText;	int nItem = ListView_InsertItem(hList, &lvi);	int nMin = apData->nTick / 60000; apData->nTick -= nMin*60000;	int nSec = apData->nTick / 1000;	int nMS = apData->nTick % 1000;	_wsprintf(szText, SKIPLEN(countof(szText)) L"%02i:%02i:%03i", nMin, nSec, nMS);	ListView_SetItemText(hList, nItem, lcc_Time, szText);	_wsprintf(szText, SKIPLEN(countof(szText)) apData->bInput ? L"" : L"%u", apData->nDur);	ListView_SetItemText(hList, nItem, lcc_Duration, szText);	_wsprintf(szText, SKIPLEN(countof(szText)) L"%u", apData->nCmd);	ListView_SetItemText(hList, nItem, lcc_Command, szText);	_wsprintf(szText, SKIPLEN(countof(szText)) L"%u", apData->nSize);	ListView_SetItemText(hList, nItem, lcc_Size, szText);	_wsprintf(szText, SKIPLEN(countof(szText)) apData->nPID ? L"%u" : L"", apData->nPID);	ListView_SetItemText(hList, nItem, lcc_PID, szText);	ListView_SetItemText(hList, nItem, lcc_Pipe, apData->szPipe);	free(apData);}
开发者ID:ForNeVeR,项目名称:ConEmu,代码行数:46,


示例19: wcscpy_c

void CommandTasks::SetName(LPCWSTR asName, int anCmdIndex){	wchar_t szCmd[16];	if (anCmdIndex == -1)	{		wcscpy_c(szCmd, AutoStartTaskName);		asName = szCmd;	}	else if (!asName || !*asName)	{		_wsprintf(szCmd, SKIPLEN(countof(szCmd)) L"Group%i", (anCmdIndex+1));		asName = szCmd;	}	// Для простоты дальнейшей работы - имя должно быть заключено в угловые скобки	size_t iLen = wcslen(asName);	if (!pszName || ((iLen+2) >= cchNameMax))	{		SafeFree(pszName);		cchNameMax = iLen+16;		pszName = (wchar_t*)malloc(cchNameMax*sizeof(wchar_t));		if (!pszName)		{			_ASSERTE(pszName!=NULL);			return;		}	}	if (asName[0] == TaskBracketLeft)	{		_wcscpy_c(pszName, iLen+1, asName);	}	else	{		*pszName = TaskBracketLeft;		_wcscpy_c(pszName+1, iLen+1, asName);	}	if (asName[iLen-1] != TaskBracketRight)	{		iLen = wcslen(pszName);		pszName[iLen++] = TaskBracketRight; pszName[iLen] = 0;	}}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:45,


示例20: FindBashLocation

void CConEmuStart::SetDefaultCmd(LPCWSTR asCmd){	// !!! gpConEmu may be NULL due starting time !!!	if (gpConEmu && gpConEmu->isMingwMode() && gpConEmu->isMSysStartup())	{		CEStr szSearch;		FindBashLocation(szSearch);		swprintf_c(szDefCmd,			(wcschr(szSearch, L' ') != NULL)				? L"/"%s/" --login -i" /* -new_console:n" */				: L"%s --login -i" /* -new_console:n" */,			(LPCWSTR)szSearch);	}	else	{		wcscpy_c(szDefCmd, asCmd ? asCmd : L"cmd");	}}
开发者ID:Maximus5,项目名称:ConEmu,代码行数:19,


示例21: RemoveOldComSpecC

void RemoveOldComSpecC(){	wchar_t szComSpec[MAX_PATH], szComSpecC[MAX_PATH], szRealComSpec[MAX_PATH];	//110202 - comspec более не переопределяется, поэтому вернем "cmd",	// если был переопреден и унаследован от старой версии conemu	if (GetEnvironmentVariable(L"ComSpecC", szComSpecC, countof(szComSpecC)) && szComSpecC[0] != 0)	{		szRealComSpec[0] = 0;		if (!GetEnvironmentVariable(L"ComSpec", szComSpec, countof(szComSpec)))			szComSpec[0] = 0;		#ifndef __GNUC__		#pragma warning( push )		#pragma warning(disable : 6400)		#endif		LPCWSTR pwszName = PointToName(szComSpec);		if (lstrcmpiW(pwszName, L"ConEmuC.exe")==0 || lstrcmpiW(pwszName, L"ConEmuC64.exe")==0)		{			pwszName = PointToName(szComSpecC);			if (lstrcmpiW(pwszName, L"ConEmuC.exe")!=0 && lstrcmpiW(pwszName, L"ConEmuC64.exe")!=0)			{				wcscpy_c(szRealComSpec, szComSpecC);			}		}		#ifndef __GNUC__		#pragma warning( pop )		#endif		if (szRealComSpec[0] == 0)		{			///system32/cmd.exe			GetComspecFromEnvVar(szRealComSpec, countof(szRealComSpec));		}		SetEnvironmentVariable(L"ComSpec", szRealComSpec);		SetEnvironmentVariable(L"ComSpecC", NULL);	}}
开发者ID:Alexander-Shukaev,项目名称:ConEmu,代码行数:41,


示例22: IsConEmuExeExist

// Вернуть путь к папке, содержащей ConEmuC.exeBOOL IsConEmuExeExist(LPCWSTR szExePath, wchar_t (&rsConEmuExe)[MAX_PATH+1]){	BOOL lbExeFound = FALSE;	BOOL isWin64 = WIN3264TEST(IsWindows64(),TRUE);	//if (szExePath[lstrlen(szExePath)-1] != L'//')	//	wcscat_c(szExePath, L"//");	_ASSERTE(szExePath && *szExePath && (szExePath[lstrlen(szExePath)-1] == L'//'));	wcscpy_c(rsConEmuExe, szExePath);	wchar_t* pszName = rsConEmuExe+lstrlen(rsConEmuExe);	LPCWSTR szGuiExe[2] = {L"ConEmu64.exe", L"ConEmu.exe"};	for (size_t s = 0; !lbExeFound && (s < countof(szGuiExe)); s++)	{		if (!s && !isWin64) continue;		wcscpy_add(pszName, rsConEmuExe, szGuiExe[s]);		lbExeFound = FileExists(rsConEmuExe);	}	return lbExeFound;}
开发者ID:Alexander-Shukaev,项目名称:ConEmu,代码行数:22,


示例23: checkDlgButton

LRESULT CSetPgDebug::OnInitDialog(HWND hDlg, bool abInitial){	if (abInitial)	{		checkDlgButton(hDlg, rbActivityDisabled, BST_CHECKED);		HWND hList = GetDlgItem(hDlg, lbActivityLog);		ListView_SetExtendedListViewStyleEx(hList,LVS_EX_FULLROWSELECT,LVS_EX_FULLROWSELECT);		ListView_SetExtendedListViewStyleEx(hList,LVS_EX_LABELTIP|LVS_EX_INFOTIP,LVS_EX_LABELTIP|LVS_EX_INFOTIP);		LVCOLUMN col = {			LVCF_WIDTH|LVCF_TEXT|LVCF_FMT, LVCFMT_LEFT,			gpSetCls->EvalSize(60, esf_Horizontal|esf_CanUseDpi)};		wchar_t szTitle[4]; col.pszText = szTitle;		wcscpy_c(szTitle, L" ");		ListView_InsertColumn(hList, 0, &col);		HWND hTip = ListView_GetToolTips(hList);		SetWindowPos(hTip, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);	}	return 0;}
开发者ID:ForNeVeR,项目名称:ConEmu,代码行数:22,


示例24: GetClientRect

void CFindPanel::OnCreateFont(){	if (!mh_Edit)		return;	HFONT hOldFont = mh_Font;	RECT rcEdit = {};	GetClientRect(mh_Edit, &rcEdit);	// CreateFont	LOGFONT lf = {};	lf.lfWeight = FW_DONTCARE;	lf.lfCharSet = gpSet->nTabFontCharSet;	lf.lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;	wcscpy_c(lf.lfFaceName, gpSet->sTabFontFace);	lf.lfHeight = -klMax(6,(int)(rcEdit.bottom - gpSetCls->EvalSize(3, esf_Vertical|esf_CanUseDpi)));	mh_Font = CreateFontIndirect(&lf);	SendMessage(mh_Edit, WM_SETFONT, (WPARAM)mh_Font, FALSE);	SafeDeleteObject(hOldFont);}
开发者ID:Alexander-Shukaev,项目名称:ConEmu,代码行数:22,


示例25: GetProcessInfo

void CConEmuInside::SetInsideParentWND(HWND hParent){	mh_InsideParentWND = hParent;	if (!hParent || (hParent == INSIDE_PARENT_NOT_FOUND))	{		mh_InsideParentRoot = NULL;		mh_InsideParentRel = NULL;	}	else	{		// Store basic information about parent process (reporting purposes)		DWORD nPID; PROCESSENTRY32W PInfo = {};		if (GetWindowThreadProcessId(hParent, &nPID)			&& GetProcessInfo(nPID, &PInfo))		{			m_InsideParentInfo.ParentPID = PInfo.th32ProcessID;			m_InsideParentInfo.ParentParentPID = PInfo.th32ParentProcessID;			wcscpy_c(m_InsideParentInfo.ExeName, PInfo.szExeFile);		}		else		{			ZeroStruct(m_InsideParentInfo);		}		// Detect top parent window, to call isMeForeground		HWND hRootParent = hParent;		while ((GetWindowLong(hRootParent, GWL_STYLE) & WS_CHILD) != 0)		{			HWND hNext = GetParent(hRootParent);			if (!hNext)				break;			hRootParent = hNext;		}		mh_InsideParentRoot = hRootParent;	}}
开发者ID:BigVal71,项目名称:ConEmu,代码行数:36,


示例26: _ASSERTE

//.........这里部分代码省略.........	if (pTab->Flags() & fwt_Renamed)	{		if (wcsstr(pszFmt, L"%s") == NULL)		{			if (wcsstr(pszFmt, L"%n") != NULL)				bRenamedTab = true;			else				pszFmt = _T("%s");		}	}	TCHAR szTmp[64];	CmdArg szArg;	bool  bAppendAdmin = gpSet->isAdminSuffix() && (pTab->Flags() & fwt_Elevated);	while (*pszFmt && pszDst < pszEnd)	{		if (*pszFmt == _T('%'))		{			pszFmt++;			LPCTSTR pszText = NULL;			switch (*pszFmt)			{				case _T('s'): case _T('S'):					pszText = fileName;					break;				case _T('i'): case _T('I'):					_wsprintf(szTmp, SKIPLEN(countof(szTmp)) _T("%i"), pTab->Info.nIndex);					pszText = szTmp;					break;				case _T('p'): case _T('P'):					if (!apVCon || !apVCon->RCon())					{						wcscpy_c(szTmp, _T("?"));					}					else					{						_wsprintf(szTmp, SKIPLEN(countof(szTmp)) _T("%u"), apVCon->RCon()->GetActivePID());					}					pszText = szTmp;					break;				case _T('c'): case _T('C'):					{						int iCon = gpConEmu->isVConValid(apVCon);						if (iCon > 0)							_wsprintf(szTmp, SKIPLEN(countof(szTmp)) _T("%u"), iCon);						else							wcscpy_c(szTmp, _T("?"));						pszText = szTmp;					}					break;				case _T('n'): case _T('N'):					{						pszText = bRenamedTab ? fileName : pRCon ? pRCon->GetActiveProcessName() : NULL;						wcscpy_c(szTmp, (pszText && *pszText) ? pszText : L"?");						pszText = szTmp;					}					break;				case _T('d'): case _T('D'):					{						pszText = pRCon ? pRCon->GetConsoleCurDir(szArg) : NULL;						if (!pszText || !*pszText)							pszText = L"?";					}					break;				case _T('a'): case _T('A'):
开发者ID:negadj,项目名称:ConEmu,代码行数:67,



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


C++ wcscpy_s函数代码示例
C++ wcschr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。