123456

 

2011年12月13日

DirectUI代码分析1:

摘要: 今天学习了DirectUI最初的版本http://www.viksoe.dk/code/windowless1.htm,尝试着自己把它提取出来,写成一个更简单的DEMO,所以做一个小笔记:主程序是基于CFrameWindowWnd创建的1.CWindowWnd:是所有窗口的基类,它包含了RegisterWindowClass用于注册窗口,在注册中设置窗口过程函数__WndProcCreate中调用CreateWindowEx,CreateWindowEx最后一个参数传入this,CFrameWindowWnd基于CWindowWnd注册创建,下面具体说下这个窗口的实现:1.RegisterWi 阅读全文

posted @ 2011-12-13 20:31 hgy413 阅读(184) 评论(0) 推荐(0) 编辑

QT学习9:绘制函数

摘要: void CannonField::paintEvent(QPaintEvent *){ // ------------------------------------- // QPaintEvent包含一个必须被刷新的窗口部件的区域 // QPainter默认只能在paintEvent里面调用 // ------------------------------------- //QString s = "Angle = " + QString::number(ang); //QPainter p(this); //p.drawText(200, 200, s); QPai 阅读全文

posted @ 2011-12-13 10:42 hgy413 阅读(732) 评论(0) 推荐(0) 编辑

导航