2011年11月21日

高低位转换之法二---4字节篇

摘要: 对4字节变量转换例子// ConvertData.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"//#define cdr_int32_to(from) \// ( (((from) & (0xfful << 24)) >> 24) \// | (((from) & (0xfful << 16)) >> 8) \// | (((from) & (0xfful << 8)) << 8) \// | (((from) & 0xfful) & 阅读全文

posted @ 2011-11-21 14:18 媳妇是阿东 阅读(957) 评论(0) 推荐(0)

使用移位操作进行高低位转换

摘要: 在一个帖子里看到的,以备需要~ 1 # define cdr_int64_to(from) \ 2 ( (((from) & (0xffull << 56)) >> 56) \ 3 | (((from) & (0xffull << 48)) >> 40) \ 4 | (((from) & (0xffull << 40)) >> 24) \ 5 | (((from) & (0xffull << 32)) >> 8) \ 6 | (((from) & (0xffu 阅读全文

posted @ 2011-11-21 14:08 媳妇是阿东 阅读(582) 评论(1) 推荐(0)

2011年11月6日

使用CustomDraw来自绘CListCtrl控件

摘要: Custom Draw 基础 我将会尽我所能把Custom Draw的处理描述清楚,而不是简单的引用MSDN的文档。这些例子都需要你的程序有一个ListCtrl在对话框上,并且这个ListCtrl处于Report和多列模式。Custom draw可以被想象成一个轻量级的,容易使用的重绘方法(重绘方法还有几种,例如Owner Draw等)。这种容易来自于我们只需要处理一个消息(NM_CUSTOMDRAW),就可以让Windows为你干活了,你就不用被逼去处理"重绘过程"中所有的脏活了。Custom Draw 的消息映射入口 Custom draw 是一个类似于回调的处理过程,Windows在.. 阅读全文

posted @ 2011-11-06 19:42 媳妇是阿东 阅读(7988) 评论(1) 推荐(2)

导航