资源简介
轻松获取exe,dll中的资源图片,并可以保存位ico,位图(BMP)格式

代码片段和文件信息
//CAutoFont class implementation
#include “stdafx.h“
#include “AutoFont.h“
CAutoFont::CAutoFont()
{
lf.lfHeight=-12;
lf.lfWidth=0;
lf.lfEscapement=0;
lf.lfOrientation=0;
lf.lfWeight=FW_NORMAL;
lf.lfItalic=0;
lf.lfUnderline=0;
lf.lfStrikeOut=0;
lf.lfCharSet=DEFAULT_CHARSET; //ANSI_CHARSET;
lf.lfOutPrecision=OUT_DEFAULT_PRECIS;
lf.lfClipPrecision=CLIP_DEFAULT_PRECIS;
lf.lfQuality=PROOF_QUALITY;
lf.lfPitchAndFamily=VARIABLE_PITCH | FF_ROMAN;
strcpy(lf.lfFaceName “Times New Roman“);
CreateFontIndirect(&lf);
fontColor=0;
hDC=NULL;
}
CAutoFont::CAutoFont(CString facename)
{
lf.lfHeight=-12;
lf.lfWidth=0;
lf.lfEscapement=0;
lf.lfOrientation=0;
lf.lfWeight=FW_NORMAL;
lf.lfItalic=0;
lf.lfUnderline=0;
lf.lfStrikeOut=0;
lf.lfCharSet=DEFAULT_CHARSET; //ANSI_CHARSET;
lf.lfOutPrecision=OUT_DEFAULT_PRECIS;
lf.lfClipPrecision=CLIP_DEFAULT_PRECIS;
lf.lfQuality=PROOF_QUALITY;
lf.lfPitchAndFamily=VARIABLE_PITCH | FF_ROMAN;
strcpy(lf.lfFaceName (LPCTSTR)facename);
CreateFontIndirect(&lf);
fontColor=0;
hDC=NULL;
}
CAutoFont::CAutoFont(LOGFONT& logfont)
{
lf=logfont;
CreateFontIndirect(&lf);
fontColor=0;
hDC=NULL;
}
CAutoFont::CAutoFont(CFont font)
{
HFONT hFont=(HFONT)font;
Attach((HFONT)hFont);
GetLogFont(&lf);
fontColor=0;
hDC=NULL;
}
CAutoFont::~CAutoFont()
{
}
LONG CAutoFont::SetHeight(LONG height)
{
LONG l=lf.lfHeight;
Deleteobject();
lf.lfHeight=height;
CreateFontIndirect(&lf);
return l;
}
LONG CAutoFont::SetHeightA(LONG height)
{
LONG l=lf.lfHeight;
Deleteobject();
if (height>0)
height=0-height;
lf.lfHeight=height;
CreateFontIndirect(&lf);
return l;
}
LONG CAutoFont::SetWidth(LONG width)
{
LONG l=lf.lfWidth;
Deleteobject();
lf.lfWidth=width;
CreateFontIndirect(&lf);
return l;
}
LONG CAutoFont::SetEscapement(LONG esc)
{
LONG l=lf.lfEscapement;
Deleteobject();
lf.lfEscapement=esc;
CreateFontIndirect(&lf);
return l;
}
LONG CAutoFont::SetOrientation(LONG or)
{
LONG l=lf.lfOrientation;
Deleteobject();
lf.lfOrientation=or;
CreateFontIndirect(&lf);
return l;
}
LONG CAutoFont::SetWeight(LONG weight)
{
LONG l=lf.lfWeight;
Deleteobject();
lf.lfWeight=weight;
CreateFontIndirect(&lf);
return l;
}
BYTE CAutoFont::SetCharset(BYTE charset)
{
BYTE b=lf.lfCharSet;
Deleteobject();
lf.lfCharSet=charset;
CreateFontIndirect(&lf);
return b;
}
BYTE CAutoFont::SetOutPrecision(BYTE op)
{
BYTE b=lf.lfOutPrecision;
Deleteobject();
lf.lfOutPrecision=op;
CreateFontIndirect(&lf);
return b;
}
BYTE CAutoFont::SetClipPrecision(BYTE cp)
{
BYTE b=lf.lfClipPrecision;
Deleteobject();
lf.lfClipPrecision=cp;
CreateFontIndirect(&lf);
return b;
}
BYTE CAutoFont::SetQuality(BYTE qual)
{
BYTE b=lf.lfQuality;
Deleteobject();
lf.lfQuality=qual;
CreateFontIndirect(&lf);
return b;
}
BY
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 251 2001-08-31 16:12 File_ID.txt
目录 0 2001-09-23 16:51 res\
文件 400 2001-09-22 09:17 res\IconSnap.rc2
文件 18270 2001-09-26 21:50 res\ButtonsWin3000.bmp
文件 214 1999-09-17 12:11 res\Check.bmp
文件 1270 1999-09-17 12:11 res\middlecheck.bmp
文件 214 1999-09-17 12:11 res\UnCheck.bmp
文件 1078 2001-09-26 23:43 res\IconSnap.ico
文件 7542 2000-05-22 10:57 AutoFont.cpp
文件 2340 1999-11-30 08:48 AutoFont.h
文件 31677 1999-09-17 12:11 ChkListBox.cpp
文件 5719 1999-09-17 12:11 ChkListBox.h
文件 19722 2001-09-26 21:56 Dib.cpp
文件 1328 2001-09-26 21:56 Dib.h
文件 27744 2001-09-27 00:01 Icons.cpp
文件 5361 2001-09-26 21:55 Icons.h
文件 2556 2001-09-26 22:10 IconSnap.cpp
文件 4751 2001-09-26 22:37 IconSnap.dsp
文件 539 2001-09-22 09:17 IconSnap.dsw
文件 1581 2001-09-23 20:41 IconSnap.h
文件 6117 2001-09-27 00:11 IconSnap.rc
文件 12222 2001-09-27 00:03 IconSnapDlg.cpp
文件 2160 2001-09-26 22:37 IconSnapDlg.h
文件 2866 2001-02-14 00:16 MemDC.h
文件 932 2001-09-20 00:25 ReadMe.txt
文件 958 2001-09-26 22:06 Resource.h
文件 210 2001-09-22 09:17 StdAfx.cpp
文件 999 2001-09-22 09:17 StdAfx.h
文件 8681 2001-09-26 22:07 WBButton.cpp
文件 4265 2001-07-13 00:30 WBButton.h
相关资源
- bp神经网络源代码,可直接运行
- 随机森林R语言代码
- 计算机图形学 边填充算法实现代码
- 直流无刷电机方波驱动 stm32 例程代码
- 仿知乎界面小程序源代码
- 贪吃蛇源代码.fla
- 周立功开发板ProASIC3实验-syn_FIFO代码
- IMX385驱动代码.zip
- dotnet 写字板 实验 源代码 不好请要不
- 图像二维小波变换的实现源代码
- 八三编码器设计 VHDL代码 简单,包附
- linux应用层的华容道游戏源代码
- 交通咨询模拟系统完整代码
- http请求状态代码
- 数值分析所有实验代码
- 网上拍卖系统完整源代码
- 音乐代码转换软件 单片机编程时用
- CSMA/CD等动画演示加源代码
- silicon lab公司的收音IC SI47XX全套开发工
- 用51单片机实现G代码翻译
- 合同管理系统的源代码(附数据库)
- 用VC 编写的仿QQ聊天室程序源代码
- web班级网站设计代码
- 38k单片机红外发送代码、keil
- STM32F103 串口程序(完整版)
- 网络唤醒代码
- VPC3_DPV1源代码,Profibus
- PB做的托盘程序(最小化后在左下角显
- RSA算法源码
- ubuntu9.10 可加载内核模块和字符设备驱
评论
共有 条评论