
MFC
文章平均质量分 51
yyxaf
这个作者很懒,什么都没留下…
展开
-
如何获取View的句柄
SDI: ((CFrameWnd*)(AfxGetApp()-> m_pMainWnd))-> GetActiveView(); MDI: ((CFrameWnd*)(AfxGetApp()-> m_pMainWnd))-> GetActiveFrame()-> GetActiveView();转载 2012-02-25 12:27:42 · 958 阅读 · 0 评论 -
修改主窗口风格
AppWizard生成的应用程序框架的主窗口具有缺省的窗口风格,比如在窗口标题条中自动添加文档名、窗口是叠加型的、可改变窗口大小等。要修改窗口的缺省风格,需要重载CWnd::PreCreateWindow(CREATESTRUCT& cs)函数,并在其中修改CREATESTRUCT型参数cs。CWnd::PreCreateWindow 函数先于窗口创建函数执行。如果该函数被重载,则转载 2012-02-21 13:31:28 · 1284 阅读 · 0 评论 -
vc 显示PNG
转载地址:http://blog.youkuaiyun.com/happy5856/article/details/2626509Graphics graphics(GetDC()-> m_hDC); Image image(L"walkman.png", FALSE); graphics.DrawImage(&image, 10,10, 100, 100); 在VC7.1中转载 2012-02-21 12:17:34 · 2967 阅读 · 0 评论 -
VC编译选项里面如何增加 win32 unicode release项
为vc工程添加Unicode Debug和Unicode Release 通过使用unicode编译,软件可以适应多种情况,如何在自己的工程中添加这两种编译方式呢?下面是一个简单的步骤 1、新建一个工程; 2、选择“Build-> Configurations”菜单 3、点击“Add”按钮,添加“Unico转载 2012-03-04 15:10:04 · 2385 阅读 · 0 评论 -
CString、LPCTSTR、LPTSTR、TCHAR、WCHAR、string、wchar_t、char解析
转载地址:http://www.cnblogs.com/magic-cube/archive/2011/05/12/2044713.html 一.类型简介1.CString:动态的TCHAR数组。它是一个完全独立的类,封装了“+”等操作符和字符串操作方法,换句话说就是CString是对TCHAR操作的方法的集合。2.LPCTSTR:常量的TCHAR指针,其定义为转载 2012-03-13 08:58:51 · 771 阅读 · 0 评论 -
CStdioFile类输出中文字
转载地址:http://apps.hi.baidu.com/share/detail/327384491.CStdioFile file(filepath,CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);即打开属性加上CFile::typeBinary。但在输出时对\n不是换行而是一个黑的方块,能否解决没仔细研究(\r\n?)。转载 2012-03-15 20:36:05 · 822 阅读 · 0 评论 -
MFC常用类--CTime类
转载地址:http://blog.youkuaiyun.com/piaoxue820/article/details/6219079CTime类1.构造和初始化CTime类对象CTime类有下列构造函数:CTime( );CTime( const CTime& timeSrc );CTime( time_t time );CTime( int nYear, int nMonth转载 2012-03-17 01:17:33 · 5342 阅读 · 0 评论