CString strDayofWeek = _T(""); 的意思 1.sComment是自定义的CString类型变量,代表什么意思自己说了算2._T是一个宏,作用是让你的程序支持Unicode编码。如果你的程序使用的是“多字节字符集”的话,他不起任何作用3._T("")表示把CString类型...
分类:
编程语言 时间:
2015-01-25 12:16:49
阅读次数:
132
// IPAddressCtrl中的IP地址转为CString CIPAddressCtrl* pIp = (CIPAddressCtrl*)GetDlgItem(IPADDRESS); BYTE bytIp1, bytIp2, bytIp3, bytIp4; pIp->GetA...
分类:
其他好文 时间:
2015-01-24 22:44:48
阅读次数:
194
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
①、线程同步的必要性: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
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
void GetPcNameAndIp(CString &strPCName,vector &vIp){ vIp.clear(); WSADATA wsadata; WORD dwVersionRequested; int err = WSAStartup(dwVersionRequeste...
分类:
其他好文 时间:
2015-01-21 22:11:18
阅读次数:
202
发送端:
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
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
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