摘要: 以下列代码为例 以上代码最后被注释的部分,按照MSDN上的说法,要将之前的GDI对象SelectObjec回去,防止CBitmap bmpMemBmp中的GDI对象删除失败。 CBitmap析构函数调用基类的~CGdiObject,~CGdiObject中会调用 ::DeleteObject函数来删 阅读全文
posted @ 2017-03-18 22:17 shanql 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 使用CreateCompatibleDC 创建了内存DC之后,要再调用SelectObject选择一张位图放入此DC,然后才可以使用此DC进行绘制,之后绘制的数据会保存在内存中, 详细说明看后文。 在MFC中使用内存DC例子: 以下内容来自msdn: CreateCompatibleDC The C 阅读全文
posted @ 2017-03-18 20:13 shanql 阅读(645) 评论(0) 推荐(0) 编辑
摘要: 1、用类CBitmap加载位图 2、创建内存DC, 将位图选进此内存DC 3、调用BitBlt将内存DC的内容拷贝到其它DC(通知是显示DC) 例子(来自MSDN): 阅读全文
posted @ 2017-03-18 16:22 shanql 阅读(1277) 评论(0) 推荐(0) 编辑
摘要: 在OnPaint函数中,用CClientDC dc(this)代替CPaintDC(this)后,界面不断闪烁。 说明:CClientDC是对GetDC的使用封装, CPaintDC是对BeginPaint/EndPaint的使用封装 原因:BeginPaint/EndPaint会将无效区域设置为N 阅读全文
posted @ 2017-03-18 15:39 shanql 阅读(619) 评论(0) 推荐(0) 编辑
摘要: Preprocesses C and C++ source files and writes the preprocessed output to a file. Preprocesses C and C++ source files and writes the preprocessed outp 阅读全文
posted @ 2017-02-11 12:08 shanql 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 原文出处:http://vim.wikia.com/wiki/Accessing_the_system_clipboard Please review this tip: This tip was imported from vim.org and needs general review. You 阅读全文
posted @ 2017-02-07 13:05 shanql 阅读(509) 评论(0) 推荐(0) 编辑
摘要: 一、设置.vimrc( windows下通常为_vimrc) 1、设置vim中tab的缩进 set ts=4 (注:ts是tabstop的缩写,设TAB宽4个空格) set expandtab (注:用4个空格代替一个TAB, 不设置的话就是一个宽为4的TAB) 二、插件 1、Vundle 插件安装 阅读全文
posted @ 2016-12-10 13:06 shanql 阅读(619) 评论(0) 推荐(0) 编辑
摘要: 使用cygwin时,一定要区分当前运行的是cygwin下的进程还是windows下的进程,如:使用vim, 假如cygwin下没安装vim, windows下安装了,那么你运行的就是windows下的vim了,因为windows下的环境变量会被cygwin继承,所以调用命令时,在cygwin下没找着 阅读全文
posted @ 2016-12-03 18:09 shanql 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 原文出处:http://gotgit.readthedocs.io/en/latest/01-meet-git/050-install-on-windows-cygwin.html 在Windows下安装和使用Git有两个不同的方案,通过安装msysGit或者通过安装Cygwin来使用Git。在这两 阅读全文
posted @ 2016-12-03 17:57 shanql 阅读(1571) 评论(0) 推荐(0) 编辑
摘要: 在cygwin下运行: ssh-keygen -C "634772208@qq.com" -t rsa 时,出现如下错误: cygwin Could not create directory '/home/Administrator/.ssh' 解决方案: In addition to answer 阅读全文
posted @ 2016-12-02 14:51 shanql 阅读(757) 评论(0) 推荐(0) 编辑