大约有 48,000 项符合查询结果(耗时:0.0602秒) [XML]

https://www.tsingfun.com/it/cpp/1581.html 

MFC MDI程序的窗口菜单无法正确显示 - C/C++ - 清泛网 - 专注C/C++及内核技术

...uch as ID_WINDOW_NEW and ID_WINDOW_TILE_HORZ.Override this member function if you have a Window menu that does not use the standard menu command IDs. 所以,只需要覆盖函数CMDIFrameWnd::GetWindowMenuPopup就可以解决问题,这样,就可以利用mfc框架已有的机制实现窗口列...
https://www.tsingfun.com/it/cpp/1604.html 

CFormView 不显示、空白显示的问题 - C/C++ - 清泛网 - 专注C/C++及内核技术

...AP() ... afx_msg void OnPaint(); ... void CxxxView::OnPaint() { if (m_ListCtrl.GetSafeHwnd()) { //刷新列表,防止页面空白 m_ListCtrl.RedrawWindow(); } } CFormView
https://www.tsingfun.com/it/cpp/1622.html 

CString的截取字符串,截取ip:port - C/C++ - 清泛网 - 专注C/C++及内核技术

...7.0.0.1:8888"; CString strIp, strPort; int index = strIpPort.Find(':'); if (index > 0) { strIp = strIpPort.Left(index); strPort = strIpPort.Right(strIpPort.GetLength()-index-1); } else { AfxMessageBox("字符串格式不对"); } Left 函数从字符串头部开始截取到index位...
https://www.tsingfun.com/it/cpp/1916.html 

MFC 如何移动另一个进程中的窗口,实现窗口同步移动? - C/C++ - 清泛网 - ...

...上面创建进程并启动完毕 HWND hMain = NULL; while(1) { if (hMain = ::FindWindow(NULL, "登录 - xxx")) { CRect rect, rectDlg; pMainFrame->GetWindowRect(&rect); ::GetWindowRect(hMain, rectDlg); ::SetWindowPos(hMain, NULL, rect.right-10, rect.top, rectDlg.Width()...
https://www.tsingfun.com/it/cpp/1918.html 

CListCtrl 如何设置单元格颜色? - C/C++ - 清泛网 - 专注C/C++及内核技术

...ine %d-2",x); Head.Add(Linetitle); pos=m_ColListCtrl.AddItem(&Head); if (pos!=LISTCTRL_ERROR) ; } //设置背景色、前景色 m_ColListCtrl.SetItemBackgndColor(ITEM_COLOR(BackColIndex), int (m_IntItemPos), int (m_IntItemSubPos) ); m_ColListCtrl.SetItemTextColor(ITEM_COLOR(TextColIndex)...
https://www.tsingfun.com/it/cpp/1920.html 

MFC对话框中处理Enter或Esc按键事件方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...e(MSG* pMsg); //.cpp BOOL CxxxDlg::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_KEYDOWN) { switch(pMsg->wParam) { case VK_ESCAPE: //Esc按键事件 return TRUE; case VK_RETURN: //Enter按键事件 ...
https://www.tsingfun.com/it/cpp/2037.html 

warning C4172: returning address of local variable or temporary - C/C+...

... string,set<int> >::const_iterator it = m_mapWordLine.find(word); if(it != m_mapWordLine.end()) return it->second; else return set<int>();//emptyset } 解决方法:愿意是返回set对象的const引用以减轻复制set对象的负担,但是这里返...
https://www.tsingfun.com/it/cpp/2058.html 

CFileDialog用法及参数解释 - C/C++ - 清泛网 - 专注C/C++及内核技术

...EREADONLY|OFN_OVERWRITEPROMPT,"(*.avi;*.mp4;*.wmv)|*.avi;*.mp4;*.wmv||"); if(dlg.DoModal() == IDOK) { m_video = dlg.GetPathName(); } CString CFileDialog::GetPathName( ) 得到完整的文件名,包括目录名和扩展名如:c:\ test\test1.txt CString CFileDialog::GetFileName( ) 得...
https://www.tsingfun.com/it/cpp/2107.html 

[完整实例源码]C&C++修改文件只读属性 - C/C++ - 清泛网 - 专注C/C++及内核技术

...eAttributes(strPath); //空32,只读33,隐藏34,只读隐藏35 if (dwAttrs & FILE_ATTRIBUTE_READONLY && (dwAttrs < 34)) { //去掉文件只读属性 dwAttrs &= 0x3E; SetFileAttributes(strPath, dwAttrs); printf("File '%s' readonly attr is removed.\n", strPath); } else...
https://www.tsingfun.com/it/cpp/2112.html 

MFC 获取并移动其他应用程序窗口的方法 - C/C++ - 清泛网 - 专注C/C++及内核技术

...口的方法: //等待启动完毕 HWND hMain = NULL; while(1) { if (hMain = ::FindWindow(NULL, "窗口标题")) { CRect rect, rectDlg; pMainFrame->GetWindowRect(&rect); ::GetWindowRect(hMain, rectDlg); ::SetWindowPos(hMain, NULL, rect.right-10, rect.top, rectDlg.Width(), r...