随笔分类 -  VC++/GDI

Bitblt (Bit Block Transfer) Everything
摘要:Keywords: GDI+ , VC++ , CString , WCHAR , FontFamily , ConvertAs we all know,in GID plus, when we want to create a new font , we should do something like this : FontFamily fontFamily(L"隶书"); Font f... 阅读全文
posted @ 2009-07-10 17:21 RayG 阅读(488) 评论(0) 推荐(0)
摘要:(1) 如何通过代码获得应用程序主窗口的 指针?主窗口的 指针保存在CWinThread::m_pMainWnd中,调用AfxGetMainWnd实现。AfxGetMainWnd() ->ShowWindow(SW_SHOWMAXMIZED)//使程序最大化.(2) 确定应用程序的路径Use GetModuleFileName 获得应用程序的路径,然后去掉可执行文件名。Example:TCH... 阅读全文
posted @ 2009-06-08 10:23 RayG 阅读(1079) 评论(0) 推荐(0)
摘要:The Default Coordinate SystemWhen drawing on MicrosoftWindows, the coordinates of the drawing area are located on the upper-left corner of the screen. Everything positioned on the screen takes it... 阅读全文
posted @ 2009-06-04 11:02 RayG 阅读(359) 评论(0) 推荐(0)
摘要:When i played DOTA game in VS platform  , too many cheater use hack program , this makes me really upset. So i decide to make a program to stop this, i suggest the poeple worked in VS platfo... 阅读全文
posted @ 2009-05-07 17:28 RayG 阅读(217) 评论(0) 推荐(0)
摘要:Original Author: 贾暾 然而在VC中使用CBitmap类必须将BMP位图装入资源中,然后通过类 CBitmap的成员函数使用它,在通过CDC类的成员函数操作它。这样做有两点缺陷:将位图装入资源导致可执行文件增大,不利于软件发行;只能使用资源中有限的位图,无法选取其它位图。而且BMP位图文件是以DIB(设备无关位图)方式保存,BMP位图装入资源后被转换为DDB(设备相关位图),类CB... 阅读全文
posted @ 2007-08-07 10:53 RayG 阅读(617) 评论(0) 推荐(0)
摘要:Key Words: VC++, SubClass , Control Note: The VC++ project GuanRuiPaint make a big progress, all UI related tasks have been done already ! CDC * pDC=CDC::FromHandle(lpDrawItemStruct->hDC); int... 阅读全文
posted @ 2007-08-07 10:51 RayG 阅读(534) 评论(2) 推荐(0)
摘要:(一) 关于如何结合RectTracker类实现一个绘图区的大小Resizable的问题想做到和MSPAINT一摸一样的功能的话,如何对客户区中的DIB块(画布)进行处理就是关键了。而且,想编程实现多层的设计,也需要深入理解这一块。想在客户区中的DIB块中添加Hit Button, 也就是小点,拖动该点可以重新设置画布的大小。下图:我现在的想法是,使用CRectTracker来实现一个带HitBu... 阅读全文
posted @ 2007-07-20 15:54 RayG 阅读(499) 评论(0) 推荐(0)