• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
张纯睿
博客园    首页    新随笔    联系   管理    订阅  订阅
2011年1月3日
error LNK2005
摘要: 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 阅读全文
posted @ 2011-01-03 23:09 张纯睿 阅读(165) 评论(0) 推荐(0)
Detours开发包02-实现对API的截获
该文被密码保护。 阅读全文
posted @ 2011-01-03 22:59 张纯睿 阅读(38) 评论(0) 推荐(0)
Detours开发包01-nmake文件
该文被密码保护。 阅读全文
posted @ 2011-01-03 22:53 张纯睿 阅读(23) 评论(0) 推荐(0)
CDocument继承自CCmdTarget类,只能接收WM_COMMAND
摘要: // 错误原因: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 阅读全文
posted @ 2011-01-03 13:29 张纯睿 阅读(159) 评论(0) 推荐(0)
CListCtrl使用指南
摘要: 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 阅读全文
posted @ 2011-01-03 13:28 张纯睿 阅读(165) 评论(0) 推荐(0)
软件打开文件,程序退出,结果文件变成空文件
摘要: // BOOL res = CDocument::OnSaveDocument(lpszPathName);//这句话会重写打开的文件,如果在序列化中没有操作,则文件以空文件的形势保存 阅读全文
posted @ 2011-01-03 13:27 张纯睿 阅读(107) 评论(0) 推荐(0)
如何从一个CBitmap或是资源位图中截取一部分到另一个CBitmp中
摘要: 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 阅读全文
posted @ 2011-01-03 13:27 张纯睿 阅读(321) 评论(0) 推荐(0)
CRichEdit文本控件属性下不能预览字体颜色
摘要: 按照以下方法解决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); 阅读全文
posted @ 2011-01-03 13:27 张纯睿 阅读(143) 评论(0) 推荐(0)
time.GetAsSystemTime(cmdheader.commandtime);//BOOL RES = time.GetAsSystemTime(timeDest);无效
摘要: 改用::GetLocalTime(…) 阅读全文
posted @ 2011-01-03 13:26 张纯睿 阅读(246) 评论(0) 推荐(0)
GetDC 与 释放DC
摘要: {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 阅读全文
posted @ 2011-01-03 13:26 张纯睿 阅读(262) 评论(0) 推荐(0)
ScreenToClient 与 CMainFrame非客户区坐标计算
摘要: 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 阅读全文
posted @ 2011-01-03 13:26 张纯睿 阅读(216) 评论(0) 推荐(0)
void CXX::OutputMsg01(CString tag, CString str, BOOL clean)
摘要: 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 阅读全文
posted @ 2011-01-03 13:25 张纯睿 阅读(181) 评论(0) 推荐(0)
theApp. m_AppPath 应用程序当前路径
摘要: 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 阅读全文
posted @ 2011-01-03 13:25 张纯睿 阅读(197) 评论(0) 推荐(0)
CStatic控件的背景色设为透明?
摘要: 首页200607053200607030200607031200607032200607033200607034200607035200607036200607037 请问各位:怎样才能把 CStatic控件的背景色设为透明?主题:请问各位:怎样才能把CStatic控件的背景色设为透明? 顶楼内容: 我把对话框背景色设为一个图片,上面再放CStatic控件的时候,非常难看(因为CStatic有背景色,不透明,)请问怎么做才能把CStatic控件的背景色设为透明? 第3楼 HBRUSHCTestDllDlg::OnCtlColor(CDC*pDC,CWnd*pWnd,UINTnCtlColo 阅读全文
posted @ 2011-01-03 13:25 张纯睿 阅读(206) 评论(0) 推荐(0)
Debug/Release Dll报错
摘要: 每个模块(EXE或DLL)中,都存在一种全局的状态数据,MFC依靠这种全局的状态数据来区分不同的模块,以执行正确的操作。这种数据包括:Windows实例句柄(用于加载资源),指向应用程序当前的CWinApp和CWinThread对象的指针,OLE模块引用计数,以及维护Windows对象句柄与相应的MFC对象实例之间连接的各种映射等。但当应用程序使用多个模块时,每个模块的状态数据不是应用程序范围的。相反,每个模块具有自已的MFC状态数据的私有副本。这种全局的状态数据就叫做MFC模块状态。对于MFC Extension DLL(using shared MFC DLL)类型的MFC DLL,切换当 阅读全文
posted @ 2011-01-03 13:24 张纯睿 阅读(229) 评论(0) 推荐(0)
LogFont与CharFormat互相转换
摘要: 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 = 阅读全文
posted @ 2011-01-03 13:23 张纯睿 阅读(504) 评论(0) 推荐(0)
Directx报错02
摘要: d3dutility.cpp(237) : fatal error C1010: unexpected end of file while looking for precompiled header directivenot use precompileor include “stdafx.h” 阅读全文
posted @ 2011-01-03 13:23 张纯睿 阅读(106) 评论(0) 推荐(0)
Directx报错01
摘要: --------------------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 阅读全文
posted @ 2011-01-03 13:23 张纯睿 阅读(153) 评论(0) 推荐(0)
如何使程序启动后以托盘图标形式存在
摘要: ds 阅读全文
posted @ 2011-01-03 13:23 张纯睿 阅读(113) 评论(0) 推荐(0)
char *内容输出
摘要: //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);} 阅读全文
posted @ 2011-01-03 13:21 张纯睿 阅读(281) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3