摘要:
改用::GetLocalTime(…) 阅读全文
摘要:
{CDC *pDC = pParent-GetDC();……………… pParent-ReleaseDC(pDC);}Unless the device context belongs to a window class, the ReleaseDC member function must be called to release the context after painting. Since only five common device contexts are available at any given time, failure to release a device co 阅读全文
摘要:
CMainFrame *pWnd; pWnd-ScreenToClient(&pt);//ScreenToClient 由于ScreenToClient计算点相对CMainFrame客户区的偏移, 而不是相对CMainFrame窗口左上角的偏移,所以所有的值都为负,而且是以客户区左上角为零点,这就造成无法定位点在非客户区的位置,如果需要应该: CString StrTemp = ""; GetWindowRect(&rtWnd); //mouse坐标转化为本窗口坐标 重要 point.x = point.x - rtWnd.left; point.y = point.y - rtWnd.to 阅读全文
摘要:
void CDebugProfile::OutputMsg01(CString tag , CString str , BOOL clean){CString strFilePath = CDebugProfile::m_strFilePath;strFilePath = _T("c:\\output4.txt");CStdioFile file;BOOL res = FALSE;if (clean){res = file.Open(strFilePath, CFile::modeCreate|CFile::modeReadWrite);}else{res = file.Open(strFil 阅读全文
摘要:
void CClientWorkSpaceApp::ConfigGetAppPath(){ TCHAR path[MAX_PATH]; memset(path,0,sizeof(TCHAR)*MAX_PATH); GetModuleFileName( NULL,path, MAX_PATH ); TCHAR drive[MAX_PATH],dir[MAX_PATH],fname[MAX_PATH],ext[MAX_PATH]; _tsplitpath(path,drive,dir,fname,ext ); m_AppPath = drive; m_AppPath += dir;}<Env 阅读全文
摘要:
首页200607053200607030200607031200607032200607033200607034200607035200607036200607037 请问各位:怎样才能把 CStatic控件的背景色设为透明?主题:请问各位:怎样才能把CStatic控件的背景色设为透明? 顶楼内容: 我把对话框背景色设为一个图片,上面再放CStatic控件的时候,非常难看(因为CStatic有背景色,不透明,)请问怎么做才能把CStatic控件的背景色设为透明? 第3楼 HBRUSHCTestDllDlg::OnCtlColor(CDC*pDC,CWnd*pWnd,UINTnCtlColo 阅读全文
摘要:
每个模块(EXE或DLL)中,都存在一种全局的状态数据,MFC依靠这种全局的状态数据来区分不同的模块,以执行正确的操作。这种数据包括:Windows实例句柄(用于加载资源),指向应用程序当前的CWinApp和CWinThread对象的指针,OLE模块引用计数,以及维护Windows对象句柄与相应的MFC对象实例之间连接的各种映射等。但当应用程序使用多个模块时,每个模块的状态数据不是应用程序范围的。相反,每个模块具有自已的MFC状态数据的私有副本。这种全局的状态数据就叫做MFC模块状态。对于MFC Extension DLL(using shared MFC DLL)类型的MFC DLL,切换当 阅读全文
摘要:
way1:CFontDialog::getcharformatway2:void CTextLine::ChangeLogFontToCharFormat(CHARFORMAT &cf, const LOGFONT lf, const COLORREF textcolor){//CFE_AUTOCOLORcf.dwMask = CFM_BOLD|CFM_CHARSET|CFM_COLOR|CFM_FACE|CFM_ITALIC|\CFM_SIZE|CFM_UNDERLINE|CFM_STRIKEOUT; BOOL bIsItalic = lf.lfItalic ;BOOL bIsBold = 阅读全文
摘要:
d3dutility.cpp(237) : fatal error C1010: unexpected end of file while looking for precompiled header directivenot use precompileor include “stdafx.h” 阅读全文
摘要:
--------------------Configuration: LDCTextCtrl - Win32 Debug--------------------Compiling...LDCTextControl.cppd3dx9math.h(392) : error C2061: syntax error : identifier 'THIS_FILE'd3dx9math.h(392) : error C2091: function returns functiond3dx9math.h(392) : error C2802: static member 'operator new' has 阅读全文