摘要: 示例代码:转自MSDN:CFileFind finder; BOOL bWorking = finder.FindFile("*.*"); while (bWorking) { bWorking = finder.FindNextFile(); cout << (LPCTSTR) finder.GetFileName() << endl; }若要获得文件具体信息(如文件名,文件路径等)则在调用FindFile后至少调用一次FindNextFile; FindFile函数可理解为“开始搜索” 阅读全文
posted @ 2013-06-14 17:52 ximenchuixie 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 添加头文件:#include <GdiPlus.h>using namespace Gdiplus;#pragma comment(lib, "gdiplus.lib")若编译出现错误,将stdafx.h中 "#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers "注释掉即可使用GDI+前要进行初始化GdiplusStartupInput gdiplusStartupInput;ULONG_PTR gdiplusToken;GdiplusSt 阅读全文
posted @ 2013-06-14 00:16 ximenchuixie 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 设备上下文(Device Context):位于程序和显示设备的中间层,方便编码,避免针对不同显示设备编写不同代码。win32通过DC画图.DC 通过SelectObject方法来设置属性,例如背景图,画笔颜色等等。特殊DC: 内存DC(位于内存中):例子:HDC Hdc;HBITMAP hBit2;hdc = CreateCompatibleDC(GetDC());hBit2 = CreateCompatibleBitmap(hdc,rct.right - rct.left,rct.bottom - rct.top);SelectObject(myHdc2,hBit2); ... 阅读全文
posted @ 2013-06-14 00:03 ximenchuixie 阅读(529) 评论(0) 推荐(0) 编辑