这篇教程C++ wcscat_c函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wcscat_c函数的典型用法代码示例。如果您正苦于以下问题:C++ wcscat_c函数的具体用法?C++ wcscat_c怎么用?C++ wcscat_c使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wcscat_c函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: _wsprintfDWORD CDragDrop::DragStart(IDropSource *pDropSource, const DWORD dwAllowedEffects, DWORD& dwEffect){ DWORD dwResult = E_UNEXPECTED; wchar_t szStep[255]; _wsprintf(szStep, SKIPLEN(countof(szStep)) L"DoDragDrop(Eff=0x%X, DataObject=0x%08X, DropSource=0x%08X)", dwAllowedEffects, (DWORD)mp_DataObject, (DWORD)pDropSource); //-V205 DebugLog(szStep); SAFETRY { dwResult = DoDragDrop(mp_DataObject, pDropSource, dwAllowedEffects, &dwEffect); } SAFECATCH { dwResult = DRAGDROP_S_CANCEL; MBoxA(L"Exception in DoDragDrop/nConEmu restart is recommended"); } _wsprintf(szStep, SKIPLEN(countof(szStep)) L"DoDragDrop finished, Code=0x%08X", dwResult); switch(dwResult) { case S_OK: wcscat_c(szStep, L" (S_OK)"); break; case DRAGDROP_S_DROP: wcscat_c(szStep, L" (DRAGDROP_S_DROP)"); break; case DRAGDROP_S_CANCEL: wcscat_c(szStep, L" (DRAGDROP_S_CANCEL)"); break; //case E_UNSPEC: lstrcat(szStep, L" (E_UNSPEC)"); break; } DebugLog(szStep, (dwResult!=S_OK && dwResult!=DRAGDROP_S_CANCEL && dwResult!=DRAGDROP_S_DROP)); return dwResult;}
开发者ID:BrunoMoreno,项目名称:ConEmu,代码行数:28,
示例2: wchar_tvoid 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,
示例3: wcscpy_cbool 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,
示例4: _wsprintfvoid CGestures::DumpGesture(LPCWSTR tp, const GESTUREINFO& gi){ wchar_t szDump[256]; _wsprintf(szDump, SKIPLEN(countof(szDump)) L"Gesture(x%08X {%i,%i} %s", (DWORD)gi.hwndTarget, gi.ptsLocation.x, gi.ptsLocation.y, tp); // tp - имя жеста switch (gi.dwID) { case GID_PRESSANDTAP: { DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" Dist={%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h)); break; } case GID_ROTATE: { DWORD h = LODWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" %i", (int)LOWORD(h)); break; } } if (gi.dwFlags&GF_BEGIN) wcscat_c(szDump, L" GF_BEGIN"); if (gi.dwFlags&GF_END) wcscat_c(szDump, L" GF_END"); if (gi.dwFlags&GF_INERTIA) { wcscat_c(szDump, L" GF_INERTIA"); DWORD h = HIDWORD(gi.ullArguments); _wsprintf(szDump+_tcslen(szDump), SKIPLEN(32) L" {%i,%i}", (int)(short)LOWORD(h), (int)(short)HIWORD(h)); } if (gpSetCls->isAdvLogging >= 2) { gpConEmu->LogString(szDump); } else { #ifdef USE_DUMPGEST wcscat_c(szDump, L")/n"); DEBUGSTR(szDump); #endif }}
开发者ID:rheostat2718,项目名称:conemu-maximus5,代码行数:53,
示例5: wcscpy_cvoid 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,
示例6: DEBUGSTRRECENTvoid CTabBarClass::PrintRecentStack(){#ifdef PRINT_RECENT_STACK if (!this) return; wchar_t szDbg[100]; DEBUGSTRRECENT(L"=== Printing recent tab stack ===/n"); for (INT_PTR i = 0; i < m_TabStack.size(); i++) { CTabID* p = m_TabStack[i]; if (p == mp_DummyTab) continue; if (!p) { _ASSERTE(p!=NULL); continue; } _wsprintf(szDbg, SKIPLEN(countof(szDbg)) L"%2u: %s", i+1, (p->Info.Status == tisPassive) ? L"<passive> " : (p->Info.Status == tisEmpty) ? L"<not_init> " : (p->Info.Status == tisInvalid) ? L"<invalid> " : L""); lstrcpyn(szDbg+lstrlen(szDbg), p->GetLabel(), 60); wcscat_c(szDbg, L"/n"); DEBUGSTRRECENT(szDbg); } DEBUGSTRRECENT(L"===== Recent tab stack done =====/n");#endif}
开发者ID:negadj,项目名称:ConEmu,代码行数:29,
示例7: countof// Issue 1191: ConEmu was launched instead of explorer from taskbar pinned library iconvoid CSetPgIntegr::UnregisterShellInvalids(){ HKEY hkDir; if (0 == RegOpenKeyEx(HKEY_CURRENT_USER, L"Software//Classes//LibraryFolder//shell", 0, KEY_READ, &hkDir)) { int iOthers = 0; MArray<wchar_t*> lsNames; for (DWORD i = 0; i < 512; i++) { wchar_t szName[MAX_PATH+32] = {}; wchar_t szCmd[MAX_PATH*4]; DWORD cchMax = countof(szName) - 32; if (0 != RegEnumKeyEx(hkDir, i, szName, &cchMax, NULL, NULL, NULL, NULL)) break; wchar_t* pszSlash = szName + _tcslen(szName); wcscat_c(szName, L"//command"); HKEY hkCmd = NULL; if (0 == RegOpenKeyEx(hkDir, szName, 0, KEY_READ, &hkCmd)) { DWORD cbMax = sizeof(szCmd)-2; if (0 == RegQueryValueEx(hkCmd, NULL, NULL, NULL, (LPBYTE)szCmd, &cbMax)) { szCmd[cbMax>>1] = 0; *pszSlash = 0; //LPCWSTR pszInside = StrStrI(szCmd, L"-inside"); LPCWSTR pszConEmu = StrStrI(szCmd, L"conemu"); if (pszConEmu) lsNames.push_back(lstrdup(szName)); else iOthers++; } RegCloseKey(hkCmd); }
开发者ID:amynbe,项目名称:ConEmu,代码行数:36,
示例8: wcscpy_cvoid 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,
示例9: EnableWindowvoid CSetPgBase::setHotkeyCheckbox(HWND hDlg, WORD nCtrlId, int iHotkeyId, LPCWSTR pszFrom, LPCWSTR pszTo, UINT uChecked){ wchar_t szKeyFull[128] = L""; gpSet->GetHotkeyNameById(iHotkeyId, szKeyFull, false); if (szKeyFull[0] == 0) { EnableWindow(GetDlgItem(hDlg, nCtrlId), FALSE); checkDlgButton(hDlg, nCtrlId, BST_UNCHECKED); } else { if (pszFrom) { wchar_t* ptr = (wchar_t*)wcsstr(szKeyFull, pszFrom); if (ptr) { *ptr = 0; if (pszTo) { wcscat_c(szKeyFull, pszTo); } } } CEStr lsText(GetDlgItemTextPtr(hDlg, nCtrlId)); LPCWSTR pszTail = lsText.IsEmpty() ? NULL : wcsstr(lsText, L" - "); if (pszTail) { CEStr lsNew(szKeyFull, pszTail); SetDlgItemText(hDlg, nCtrlId, lsNew); } checkDlgButton(hDlg, nCtrlId, uChecked); }}
开发者ID:ChunHungLiu,项目名称:ConEmu,代码行数:35,
示例10: _DEBUGSTRvoid _DEBUGSTR(LPCWSTR s){ MCHKHEAP; CHEKCDBGMODLABEL; SYSTEMTIME st; GetLocalTime(&st); wchar_t szDEBUGSTRTime[1040]; _wsprintf(szDEBUGSTRTime, SKIPLEN(countof(szDEBUGSTRTime)) L"%i:%02i:%02i.%03i(%s.%i.%i) ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds, gszDbgModLabel, GetCurrentProcessId(), GetCurrentThreadId()); LPCWSTR psz = s; int nSLen = lstrlen(psz); if (nSLen < 999) { wcscat_c(szDEBUGSTRTime, s); if (nSLen && psz[nSLen-1]!=L'/n') wcscat_c(szDEBUGSTRTime, L"/n"); OutputDebugString(szDEBUGSTRTime); } else { OutputDebugString(szDEBUGSTRTime); OutputDebugString(psz); if (nSLen && psz[nSLen-1]!=L'/n') OutputDebugString(L"/n"); }}
开发者ID:alexlav,项目名称:conemu,代码行数:22,
示例11: UnitExpandTestvoid 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,
示例12: msprintf// nPID = 0 when hooking is done (remove status bar notification)// sName is executable name or window class namebool CDefaultTerminal::NotifyHookingStatus(DWORD nPID, LPCWSTR sName){ wchar_t szInfo[200] = L""; if (nPID) { msprintf(szInfo, countof(szInfo), L"DefTerm setup: PID=%u", nPID); if (sName && *sName) { wcscat_c(szInfo, L", "); int nLen = lstrlen(szInfo); lstrcpyn(szInfo+nLen, sName, countof(szInfo)-nLen); } } gpConEmu->mp_Status->SetStatus(szInfo); // descendant must return true if status bar was changed return true;}
开发者ID:AshWilliams,项目名称:ConEmu,代码行数:21,
示例13: PrepareHookModuleint PrepareHookModule(wchar_t (&szModule)[MAX_PATH+16]){ int iRc = -251; wchar_t szNewPath[MAX_PATH+16] = {}, szAddName[32] = {}, szVer[2] = {}; INT_PTR nLen = 0; bool bAlreadyExists = false; // Copy szModule to CSIDL_LOCAL_APPDATA and return new path HRESULT hr = SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0/*SHGFP_TYPE_CURRENT*/, szNewPath); if ((hr != S_OK) || !*szNewPath) { iRc = -251; goto wrap; } szVer[0] = MVV_4a[0]; _wsprintf(szAddName, SKIPLEN(countof(szAddName)) L"//" CEDEFTERMDLLFORMAT /*L"ConEmuHk%s.%02u%02u%02u%s.dll"*/, WIN3264TEST(L"",L"64"), MVV_1, MVV_2, MVV_3, szVer); nLen = lstrlen(szNewPath); if (szNewPath[nLen-1] != L'//') { szNewPath[nLen++] = L'//'; szNewPath[nLen] = 0; } if ((nLen + lstrlen(szAddName) + 8) >= countof(szNewPath)) { iRc = -252; goto wrap; } wcscat_c(szNewPath, L"ConEmu"); if (!DirectoryExists(szNewPath)) { if (!CreateDirectory(szNewPath, NULL)) { iRc = -253; goto wrap; } } wcscat_c(szNewPath, szAddName); if ((bAlreadyExists = FileExists(szNewPath)) && FileCompare(szNewPath, szModule)) { // OK, file exists and match the required } else { if (bAlreadyExists) { _ASSERTE(FALSE && "Continue to overwrite existing ConEmuHk in AppLocal"); // Try to delete or rename old version if (!DeleteFile(szNewPath)) { //SYSTEMTIME st; GetLocalTime(&st); wchar_t szBakPath[MAX_PATH+32]; wcscpy_c(szBakPath, szNewPath); wchar_t* pszExt = (wchar_t*)PointToExt(szBakPath); msprintf(pszExt, 16, L".%u.dll", GetTickCount()); DeleteFile(szBakPath); MoveFile(szNewPath, szBakPath); } } if (!CopyFile(szModule, szNewPath, FALSE)) { iRc = -254; goto wrap; } } wcscpy_c(szModule, szNewPath); iRc = 0;wrap: return iRc;}
开发者ID:NickLatysh,项目名称:conemu,代码行数:78,
示例14: UM_USER_CONTROLS//.........这里部分代码省略......... wchar_t szRbCaption[MAX_PATH*3]; lstrcpy(szRbCaption, L"Run as current &user: "); lstrcat(szRbCaption, pDlg->ms_CurUser); SetDlgItemText(hDlg, rbCurrentUser, szRbCaption); wchar_t szOtherUser[MAX_PATH*2+1]; szOtherUser[0] = 0; CVConGuard VCon; CVirtualConsole* pVCon = (gpConEmu->GetActiveVCon(&VCon) >= 0) ? VCon.VCon() : NULL; if ((pArgs->pszUserName && *pArgs->pszUserName) || ((pArgs->aRecreate == cra_RecreateTab) && pVCon && pVCon->RCon()->GetUserPwd(&pszUser, &pszDomain, &bResticted))) { nChecked = rbAnotherUser; if (bResticted) { CheckDlgButton(hDlg, cbRunAsRestricted, BST_CHECKED); } else { if (pArgs->pszUserName && *pArgs->pszUserName) lstrcpyn(szOtherUser, pArgs->pszUserName, countof(szOtherUser)); else lstrcpyn(szOtherUser, pDlg->ms_CurUser, countof(szOtherUser)); if (pszDomain) { if (wcschr(pszDomain, L'.')) { // Если в имени домена есть точка - используем нотацию [email C++ wcschr函数代码示例 C++ wcscat函数代码示例
|