大约有 26,000 项符合查询结果(耗时:0.0222秒) [XML]
CMap用法 - C/C++ - 清泛网 - 专注C/C++及内核技术
...到好几个人说CMap在用CString做key类型时有问题,说用int和DWORD就可以,用CString就不行。因此很多人推荐使用MFC中的CMapStringToPtr之类。关键是ARG_KEY要选LPCTSTR,否则编译报错。
CMap<CString, LPCTSTR, int, int> typeMap;
typeMap.SetAt(_T("ONE"), 1)...
WSAAsyncSelect模型 - C/C++ - 清泛网 - 专注C/C++及内核技术
...INADDR_ANY;
if(bind(s,(sockaddr*)&sin,sizeof(sin))==SOCKET_ERROR)
{
DWORD error=GetLastError();
return TRUE;
}
WSAAsyncSelect(s,m_hWnd,WM_SOCKET,FD_ACCEPT|FD_CLOSE);
listen(s,5);
添加自定义消息函数的处理:
LRESULT CtestDlg::OnSocketMsg(WPARAM wParam,LPARAM lParam)
...
c++读注册表 - C/C++ - 清泛网 - 专注C/C++及内核技术
...;
if (ERROR_SUCCESS == rc)
{
WCHAR szBuffer[MAX_PATH];
DWORD dwBufferSize = sizeof(szBuffer);
rc = RegQueryValueEx(hKey, _T("Path"), NULL, NULL, (LPBYTE)szBuffer, &dwBufferSize);
if (ERROR_SUCCESS == rc)
{
path = szBuffer; //处理读...
CreateWindow()动态创建一个EditBox - C/C++ - 清泛网 - 专注C/C++及内核技术
...;
常见错误解决思路:
1.创建失败,不显示输入框等。DWORD errno = GetLastError() 查看错误代码。
2.不可在类的构造函数中创建Edit,因为此时主窗口还没有被创建出来,导致出现“Cannot create a top-level child window”错误。
---------...
CListCtrl 扩展风格设置方法:SetExtendedStyle和ModifyStyleEx 区别 - C/C...
...风格储存在GWL_EXSTYLE属性中,因为这个属性值为32位长的DWORD型,窗口的常规扩展属性即以WS_EX_作为前缀的属性,已经把它占完了,所以对listctrl 的扩展风格,微软只能把它放在其他地方了。
CListCtrl 扩展风格 SetExtendedStyle ModifySty...
获取控件的值的几种方法总结 - C/C++ - 清泛网 - 专注C/C++及内核技术
... nIDC, long& value );
void AFXAPI DDX_Text( CDataExchange* pDX, int nIDC, DWORD& value );
void AFXAPI DDX_Text( CDataExchange* pDX, int nIDC, CString& value );
void AFXAPI DDX_Text( CDataExchange* pDX, int nIDC, float& value );
void AFXAPI DDX_Text( CDataExchange* pDX, int nIDC, double& value );...
在ATL无窗口ActiveX 控件中如何使用定时器? - C/C++ - 清泛网 - 专注C/C++及内核技术
... // WM_TIMER 消息
INT_PTR idTimer, // 定时器标志
DWORD dwTime) // 当前系统启动计时
{
...
}
调用方法:
UINT nRet = SetTimer(NULL, // handle to main window
ID_TIMER, // 定时器标识
1000, ...
MFC Static透明背景色的实现、Static控件自绘、Static字体修改 - C/C++ - ...
... code here and/or call the base class
CStatic::PreSubclassWindow();
DWORD dwStyle = GetStyle();
SetWindowLong(GetSafeHwnd(),GWL_STYLE,dwStyle | SS_OWNERDRAW);
}
void CTransparentStatic::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CDC *pDC = CDC::FromHandle(lpDrawItemStruct->hDC);...
Difference between declaring variables before or in loop?
...lt;+1>: mov rbp,rsp
0x00000000004004ba <+4>: mov DWORD PTR [rbp-0x4],0x0
0x00000000004004c1 <+11>: jmp 0x4004cd <main+23>
0x00000000004004c3 <+13>: mov eax,DWORD PT
How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?
...rosoft\Windows\CurrentVersion\Internet Settings]
"MaxConnectionsPerServer"=dword:00000004
"MaxConnectionsPer1_0Server"=dword:00000004
share
|
improve this answer
|
follow
...
