资源简介
这是个带标题的CPropertySheet的例子,对CPropertySheet类进行了改写,有源码下载
代码片段和文件信息
// DialogHeader.cpp : implementation file
//
#include “stdafx.h“
#include “DialogHeader.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// DialogHeader.cpp : source file
//******************************************************************************
//Author : Jason Gurgel
//EMail : jmgurgel@attbi.com
//(C) : 7-14-2002
//
//Purpose: Provide a professional looking header area for dialog controls
// : that will display an icon a title phrase in bold and a
// : description phrase. And also provide a custom background color
// : and custom header height.
//
//Note : This code was insipired by Mustafa Demirhan‘s article about hacking
// : the CPropterySheet. See link below.
// : http://www.codeproject.com/property/hacking_the_cpropertyshee.asp#xx162207xx
//
//Disclaimer: This code is free to use as long as this information
// : is included. The author takes no responsibility for
// : the corretness of the code or any damage incured from it‘s use.
// : It is free so use at your own risk and enjoy!
// : Any commentssuggestions or additions would be appericated.
//******************************************************************************
/////////////////////////////////////////////////////////////////////////////
// CDialogHeader
CDialogHeader::CDialogHeader()
{
//Clear all display variables
m_hIcon=NULL;
m_stitle=““;
m_sDesc=““;
//Set font size
m_bFonts=FALSE;
m_ntitleFontSize=DEFAULTtitleFONTSIZE;
m_nDescFontSize=DEFAULTDESCFONTSIZE;
//Set default icon offset
m_nIconOffset=DEFAULTICONOFFSET;
//Set default title offset from icon
m_ntitleOffset=DEFAULTtitleOFFSET;
//Set default desc offset
m_nDescOffset=DEFAULTDESCOFFSET;
//Set default text alignment
m_uAlign=DEFAULTTEXTALIGN;
//Set default background color
m_cBackground=GetSysColor(COLOR_WINDOW);
//Set default header height
m_nHeaderHeight=DEFAULTHEADERHEIGHT;
//Get the default system icon dims
m_nIconWidth=::GetSystemMetrics(SM_CXICON);
m_nIconHeight=::GetSystemMetrics(SM_CYICON);
//Set default icon display mode
m_bBlankIcon=DEFAULTBLANKICON;
//Get system edge metrics
m_nxEdge=::GetSystemMetrics(SM_CXEDGE);
// m_nyEdge=::GetSystemMetrics(SM_CYEDGE);
m_nyEdge=1; //I think this edge looks better then system edge size
}
CDialogHeader::~CDialogHeader()
{
}
BEGIN_MESSAGE_MAP(CDialogHeader CWnd)
//{{AFX_MSG_MAP(CDialogHeader)
ON_WM_ERASEBKGND()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDialogHeader Operations
void CDialogHeader::Init(void* ptrWnd)
{
//Variables
CRect rect; //General purpose rect
CWnd* pWnd=(CWnd*)ptrWnd; //Ptr to calling window
//Check for valid ptr
if ((NULL == pWnd) || (NULL == pWnd->m_hWnd))
{
return;
}
//Ensure the heig
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 10895 2002-07-20 08:16 DialogHeaderDemo\DialogHeader.cpp
文件 9540 2002-07-20 09:39 DialogHeaderDemo\DialogHeader.h
文件 2456 2002-07-20 10:45 DialogHeaderDemo\DialogHeaderDemo.clw
文件 2203 2002-07-16 12:35 DialogHeaderDemo\DialogHeaderDemo.cpp
文件 5021 2002-07-18 16:36 DialogHeaderDemo\DialogHeaderDemo.dsp
文件 555 2002-07-16 12:35 DialogHeaderDemo\DialogHeaderDemo.dsw
文件 1434 2002-07-16 12:35 DialogHeaderDemo\DialogHeaderDemo.h
文件 7184 2002-07-18 16:35 DialogHeaderDemo\DialogHeaderDemo.rc
文件 5693 2002-07-20 10:44 DialogHeaderDemo\DialogHeaderDemoDlg.cpp
文件 1621 2002-07-18 16:32 DialogHeaderDemo\DialogHeaderDemoDlg.h
文件 10347 2002-07-20 08:16 DialogHeaderDemo\MyPropertySheet.cpp
文件 6751 2002-07-20 08:44 DialogHeaderDemo\MyPropertySheet.h
文件 1103 2002-07-17 20:26 DialogHeaderDemo\propPage1.cpp
文件 1329 2002-07-17 20:26 DialogHeaderDemo\propPage1.h
文件 1103 2002-07-17 20:14 DialogHeaderDemo\PropPage2.cpp
文件 1257 2002-07-17 20:17 DialogHeaderDemo\PropPage2.h
文件 3759 2002-07-16 12:35 DialogHeaderDemo\ReadMe.txt
文件 1078 2002-07-16 12:35 DialogHeaderDemo\res\DialogHeaderDemo.ico
文件 408 2002-07-16 12:35 DialogHeaderDemo\res\DialogHeaderDemo.rc2
文件 2238 2002-07-18 16:35 DialogHeaderDemo\res\Hard Drive.ico
文件 4608 2002-07-18 16:34 DialogHeaderDemo\res\Thumbs.db
文件 2238 2002-07-16 12:44 DialogHeaderDemo\res\ToolBox Red.ico
文件 1150 2002-07-18 16:35 DialogHeaderDemo\resource.h
文件 218 2002-07-16 12:35 DialogHeaderDemo\StdAfx.cpp
文件 1054 2002-07-16 12:35 DialogHeaderDemo\StdAfx.h
文件 25088 2002-07-18 20:26 DialogHeaderDemo\Thumbs.db
相关资源
- 磁盘分区隐藏 vc源码
- 传奇脱机挂VC源码.rar
- 自动聚焦源程序(基于openCV)
- VC ListCtrl添加超级连接
- VS2010~2017免注册调用大漠插件
- SK hynix UFS2 1 Product Family_ Datasheet_1.12
- mvc使用mongodb
- modis数据介绍及
- 超市订单管理系统基于springbootmybati
- VC 写的注册表监控程序.rar
- VC 开发的MIPS五级整数流水线模拟程序
- VC FTP文件上传程序.rar
- 百度地图类库 热力图.zip
- 带动画效果的VC 迷宫游戏源代码.ra
- VC 常用glut.lib glut.h glut32.lib glut32.l
- 精美的WEB在线文件管理源码.rar
- VC 6.0 用文字实现透明窗口范例代码
- VC 透明窗口效果的电子标尺源代码
- 仿163网盘无刷新文件上传系统.rar
- 维客亲源—极低心率监测芯片VC9S.do
- 翻译狗文档免费程序
- MFI配件Cp2.0Cdatasheet
- 前端项目-vConsole.zip
- 基于MVC实现的简单注册登录小Demo
- Configure EndNote.exe
- VC下使用画图库graphics.h
- vc编写中国象棋-详细源码+注释
- VCP-DCV认证题库 2V0-602
- PCL-1.8.0-AllInOne-msvc2013-win64
- LSI-2008
评论
共有 条评论