- 博客(4)
- 收藏
- 关注
原创 GDI+ 保存指定的窗口为JPEG文件(X Y轴镜像功能可选)
#include #include #include #include using namespace Gdiplus; #pragma comment(lib, "gdiplus.lib") struct _GdiplusToken { Gdiplus::GdiplusStartupInput gdiplusStartupI
2012-08-09 21:09:20 3152 1
原创 CColorDialog的非模态实现
早上看到论坛上有人发问CColorDialog怎么实现非模态,仔细追踪了一下,CColorDialog继承自CCommonDialog,而CCommonDialog在构造时给CDialog类的对话框资源ID是0, //CColorDialog构造函数CColorDialog::CColorDialog(COLORREF clrInit, DWORD dwFlags, CWnd* pPa
2012-08-07 17:06:46 3069
原创 WINAPI 拷贝指定的hDC的lpRect部分到文件Dstfile中(BMP文件格式)
#include #include //WINAPI 拷贝指定的hDC的lpRect部分到文件Dstfile中(BMP文件格式)BOOL SaveHDCToFile(HDC hDC, LPRECT lpRect, LPCTSTR Dstfile){ int Width = lpRect->right - lpRect->left; int Height = lpR
2012-08-05 11:31:07 1822 1
原创 gethostbyname获取IP地址
#include int GetIPAddr(LPCSTR hostname){ int nAdapter = 0; if(AfxSocketInit()) { HOSTENT *pHostEnt = gethostbyname(hostname); if(pHostEnt) { if(pHostEnt->h_addrtype ==
2012-08-03 13:40:50 5809
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人