摘要:
http://apps.hi.baidu.com/share/detail/17141856其实LNK2005错误并不是一个很难解决的错误。弄清楚它形成的原因,就可以轻松解决它了。 造成LNK2005错误主要有以下几种情况: LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll)LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVC 阅读全文
该文被密码保护。 阅读全文
该文被密码保护。 阅读全文
摘要:
// 错误原因:CDocument继承自CCmdTarget类,只能接收WM_COMMAND,它的消息处理函数原形为//LRESULT CSuperEditDoc::OnFileProcess(WPARAM wParam, LPARAM lParam)//{// UINT pos = HIWORD(lParam);// UINT max = HIWORD(lParam);//// CBCGPStatusBar pBar = GetStatusBar();//// GetStatusBar().EnablePaneProgressBar(1, -1);//// GetStatusBar().En 阅读全文
摘要:
2007-06-05 17:24创建图形列表并和CListCtrl关联:m_image_list.Create(IDB_CALLER2, 16, 10, RGB(192,192, 192));m_image_list.SetBkColor( GetSysColor( COLOR_WINDOW ) );m_caller_list.SetImageList( &m_image_list, LVSIL_SMALL);为报表添加4列: char *szColumn[]={"昵称","IP地址","登陆时间","状态"}; int widths[]={100,98,70,55}; LV_COLUMN l 阅读全文
摘要:
// BOOL res = CDocument::OnSaveDocument(lpszPathName);//这句话会重写打开的文件,如果在序列化中没有操作,则文件以空文件的形势保存 阅读全文
摘要:
void CSkinAnalyseDoc::GetRectBmp(CBitmap *pDesBmp, CBitmap *pSrcBmp, CRect rc, CView *pParent){// CClientDC MemDC(pParent);// CDC showDC;// showDC.CreateCompatibleDC(&MemDC);//// CBitmap *pOldBmp1 = MemDC.SelectObject(pSrcBmp);// CBitmap *pOldBmp2 = showDC.SelectObject(pDesBmp);// showDC.BitBlt(0, 0 阅读全文
摘要:
按照以下方法解决void CTextCtrlPropertyPage02::OnButton1() {..... // clr CRichEditCtrl *pEdit = (CRichEditCtrl *)GetDlgItem(IDC_RICHEDIT1_TEXT); CHARFORMAT cf; ZeroMemory(&cf, sizeof(CHARFORMAT)); pEdit-SetSel(0, -1); cf.dwMask = CFM_COLOR; cf.cbSize = sizeof(CHARFORMAT); pEdit-GetSelectionCharFormat(cf); 阅读全文
摘要:
改用::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 阅读全文
摘要:
ds 阅读全文
摘要:
//test{int i;int width = 32;CString tmp;CString str0;for(i=0; ilen; i++){//tmp.Format(L"%6.6X", i);tmp.Format(L"%2.2X ", (unsigned char)pData[i]);str0+=tmp;}str0 = str0;TRACE("\r\n");TRACE(str0);} 阅读全文