码迷,mamicode.com
首页 >  
搜索关键字:cstring    ( 6726个结果
C++零散知识点
CString strDayofWeek = _T(""); 的意思 1.sComment是自定义的CString类型变量,代表什么意思自己说了算2._T是一个宏,作用是让你的程序支持Unicode编码。如果你的程序使用的是“多字节字符集”的话,他不起任何作用3._T("")表示把CString类型...
分类:编程语言   时间:2015-01-25 12:16:49    阅读次数:132
CIPAddress中获取的IP地址与CString的互相转换
// IPAddressCtrl中的IP地址转为CString CIPAddressCtrl* pIp = (CIPAddressCtrl*)GetDlgItem(IPADDRESS); BYTE bytIp1, bytIp2, bytIp3, bytIp4; pIp->GetA...
分类:其他好文   时间:2015-01-24 22:44:48    阅读次数:194
VC,VB操作XML
TCHAR buffer[MAX_PATH] = {0}; ::GetModuleFileName(NULL, buffer, MAX_PATH); CString strPath = buffer; int nIndex = strPath.ReverseFind(_T('\\')); strPa...
分类:其他好文   时间:2015-01-23 13:01:22    阅读次数:142
vc++高级班之多线程篇[6]---线程间的同步机制①
①、线程同步的必要性:int g_Num = 0;UINT __cdecl ThreadProc(LPVOID lpParameter){for (int idx = 0; idx < 100; ++idx) { g_Num = g_Num+1; CString strNum; strNum.For...
分类:编程语言   时间:2015-01-23 11:09:38    阅读次数:243
获取本地计算机的操作系统
OSVERSIONINFO os; os.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&os); CString strOS; if(os.dwPlatformId == 0) { strOS = "Win32"; } els....
分类:其他好文   时间:2015-01-23 10:56:36    阅读次数:123
hdu 1811 Rank of Tetris(拓扑排序+并查集)
1 #include "cstdio" 2 #include "iostream" 3 #include "cstring" 4 #include "vector" 5 #include "queue" 6 using namespace std; 7 const int N = 10005; 8....
分类:编程语言   时间:2015-01-22 23:20:23    阅读次数:296
VC获取计算机名和IP地址
void GetPcNameAndIp(CString &strPCName,vector &vIp){ vIp.clear(); WSADATA wsadata; WORD dwVersionRequested; int err = WSAStartup(dwVersionRequeste...
分类:其他好文   时间:2015-01-21 22:11:18    阅读次数:202
使用sendto发送CString类型数据
发送端: int len = m_strSend.GetLength(); if (0 == len) { strState.Format(L"请填写需要发送的数据!"); GetDlgItem(IDC_STATIC_SEND_STATE)->SetWindowText(strState); //动态指定static text显示内容 return; } int byteLe...
分类:其他好文   时间:2015-01-19 23:41:05    阅读次数:544
VC中使用CFile正确的追加写中文数据到文件不出现乱码-unicode字符集
CFile saveFile; CString file_name = getFileName(); BOOL isOpenOK = saveFile.Open(file_name, CFile::modeCreate | CFile::modeWrite | CFile::modeNoTruncate, NULL); if (false == isOpenOK) { Messa...
分类:其他好文   时间:2015-01-19 23:40:33    阅读次数:521
VC点击按键弹出文件路径选择对话框
void CServerDlg::OnBnClickedButtonSavePath() { CString str; BROWSEINFO bi; ZeroMemory(&bi, sizeof(BROWSEINFO));     //作用为给所有参数都设为0,即NULL bi.hwndOwner = GetSafeHwnd();   //bi.hwndOwner = m...
分类:其他好文   时间:2015-01-19 23:38:40    阅读次数:460
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!