1.比较好的博客:http://blog.csdn.net/qing666888/article/month/2017/09
问: OnEraseBkgnd函数中返回TRUE或FALSE有什么区别?
答: WM_ERASEBKGNDReturn ValuesAn application should return nonzero if it erases the background;
otherwise, it should return zero. A:true表示已处理背景刷新,false表示需要在OnPaint里处理
答: WM_ERASEBKGNDReturn ValuesAn application should return nonzero if it erases the background;
otherwise, it should return zero. A:true表示已处理背景刷新,false表示需要在OnPaint里处理
2.OnEraseBkgnd是在界面大小发生变化时响应
3. GetClipBox 该函数得到一个能够完整包含当前可见区域的最小矩形的大小
4. LoadFromResource( hInstance, MAKEINTRESOURCE( nIDResource ) );
5.WS_CLIPCHILDREN 用于父窗口,设置父窗口不重绘被覆盖部分
WS_CLIPSIBLINGS用于子窗口,设置子窗口不重绘被覆盖部分.
6. SS_NOTIFY和SS_OWNERDRAW
7. COPYDATASTRUCT 在发送WM_COPYDATA 消息时结构体必须全部赋值
COPYDATASTRUCT CopyDataStruct;
CopyDataStruct.lpData=NULL;
CopyDataStruct.cbData=0;
CopyDataStruct.dwData=WM_CUSTOMMESSAGE;
::SendMessage(hCutomWnd,WM_COPYDATA,(LPARAM)::AfxGetMainWnd()->GetSafeHwnd(),(WPARAM) &CopyDataStruct);
8. WaitForInputIdle(pRoomServerInfo->ProcessInfo.hProcess, 5000); //等待进程
9 OpenProcess()
DWORD dwProcessId = 0;
GetWindowThreadProcessId(hWnd, &dwProcessId);
HANDLE hProcessHandle = ::OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwProcessId);
::TerminateProcess(hProcessHandle, 4);
CloseHandle(hProcessHandle);
10
COleDateTimeSpan::
3. GetClipBox 该函数得到一个能够完整包含当前可见区域的最小矩形的大小
4. LoadFromResource( hInstance, MAKEINTRESOURCE( nIDResource ) );
5.WS_CLIPCHILDREN 用于父窗口,设置父窗口不重绘被覆盖部分
WS_CLIPSIBLINGS用于子窗口,设置子窗口不重绘被覆盖部分.
6. SS_NOTIFY和SS_OWNERDRAW
7. COPYDATASTRUCT 在发送WM_COPYDATA 消息时结构体必须全部赋值
COPYDATASTRUCT CopyDataStruct;
CopyDataStruct.lpData=NULL;
CopyDataStruct.cbData=0;
CopyDataStruct.dwData=WM_CUSTOMMESSAGE;
::SendMessage(hCutomWnd,WM_COPYDATA,(LPARAM)::AfxGetMainWnd()->GetSafeHwnd(),(WPARAM) &CopyDataStruct);
8. WaitForInputIdle(pRoomServerInfo->ProcessInfo.hProcess, 5000); //等待进程
9 OpenProcess()
DWORD dwProcessId = 0;
GetWindowThreadProcessId(hWnd, &dwProcessId);
HANDLE hProcessHandle = ::OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, dwProcessId);
::TerminateProcess(hProcessHandle, 4);
CloseHandle(hProcessHandle);
10
COleDateTimeSpan::
11 富文本编辑
要加 AfxInitRichEdit2();