资源简介
这里有各种各样很漂亮的Button控件,有带位图的,有带图标的,有自绘的,你一定可以找到你想要的,而且是很简洁的源码。
代码片段和文件信息
//*************************************************************************
// BCMenu.cpp : implementation file
// Version : 3.02
// Date : March 2002
// Author : Brent Corkum
// Email : corkum@rocscience.com
// Latest Version : http://www.rocscience.com/~corkum/BCMenu.html
//
// Bug Fixes and portions of code supplied by:
//
// Ben AshleyGirish BharadwajJean-Edouard Lachand-Robert
// Robert Edward CaldecottKenny GoersLeonardo Zide
// Stefan KuhrReiner JungMartin VladicKim Yoo Chul
// Oz SolomonovichTongzhe CuiStephane ClogWarren Stevens
// Damir ValiulinDavid KinderMarc Loiry
//
// You are free to use/modify this code but leave this header intact.
// This class is public domain so you are free to use it any of
// your applications (FreewareSharewareCommercial). All I ask is
// that you let me know so that if you have a real winner I can
// brag to my buddies that some of my code is in your app. I also
// wouldn‘t mind if you sent me a copy of your application since I
// like to play with new stuff.
//*************************************************************************
#include “stdafx.h“ // Standard windows header file
#include “BCMenu.h“ // BCMenu class declaration
#include //SK: makes A2W and other spiffy AFX macros work
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define BCMENU_GAP 1
#ifndef OBM_CHECK
#define OBM_CHECK 32760 // from winuser.h
#endif
#if _MFC_VER <0x400
#error This code does not work on Versions of MFC prior to 4.0
#endif
static CPINFO CPInfo;
// how the menu‘s are drawn in win9x/NT/2000
UINT BCMenu::original_drawmode=BCMENU_DRAWMODE_ORIGINAL;
BOOL BCMenu::original_select_disabled=TRUE;
// how the menu‘s are drawn in winXP
UINT BCMenu::xp_drawmode=BCMENU_DRAWMODE_XP;
BOOL BCMenu::xp_select_disabled=FALSE;
BOOL BCMenu::xp_draw_3D_bitmaps=TRUE;
CImageList BCMenu::m_AllImages;
CArray BCMenu::m_AllImagesID;
enum Win32Type{
Win32s
WinNT3
Win95
Win98
WinME
WinNT4
Win2000
WinXP
};
Win32Type IsShellType()
{
Win32Type ShellType;
DWORD winVer;
OSVERSIONINFO *osvi;
winVer=GetVersion();
if(winVer<0x80000000){/*NT */
ShellType=WinNT3;
osvi= (OSVERSIONINFO *)malloc(sizeof(OSVERSIONINFO));
if (osvi!=NULL){
memset(osvi0sizeof(OSVERSIONINFO));
osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
GetVersionEx(osvi);
if(osvi->dwMajorVersion==4L)ShellType=WinNT4;
else if(osvi->dwMajorVersion==5L&&osvi->dwMinorVersion==0L)ShellType=Win2000;
else if(osvi->dwMajorVersion==5L&&osvi->dwMinorVersion==1L)ShellType=WinXP;
free(osvi);
}
}
else if (LOBYTE(LOWORD(winVer))<4)
ShellType=Win32s;
else{
ShellType=Win95;
osvi= (OSVERSIONINFO *)malloc(sizeof(OSVERSIONINFO));
if (osvi!=NULL){
memset(osvi0sizeof(OSVERSIONINFO));
osvi->dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 88816 2002-03-31 11:20 BCMenu.cpp
文件 16478 2002-03-31 11:20 BCMenu.h
文件 14076 2002-07-26 17:08 BkDialogST.cpp
文件 3712 2002-07-26 17:04 BkDialogST.h
文件 69988 2003-03-03 22:04 BtnST.cpp
文件 10401 2003-03-03 21:47 BtnST.h
文件 5461 2003-03-03 22:18 CButtonST_Demo.clw
文件 976 2001-10-13 17:36 CButtonST_Demo.cpp
文件 12144 2002-11-26 11:43 CButtonST_Demo.dsp
文件 551 2001-05-12 13:40 CButtonST_Demo.dsw
文件 933 2001-05-12 13:49 CButtonST_Demo.h
文件 48640 2003-03-03 22:19 CButtonST_Demo.opt
文件 13266 2003-03-03 22:01 CButtonST_Demo.rc
文件 2237 2002-07-09 08:56 CButtonST_DemoDlg.cpp
文件 1067 2001-05-12 14:14 CButtonST_DemoDlg.h
文件 8684 2001-12-03 16:54 CeXDib.cpp
文件 2328 2001-12-04 10:23 CeXDib.h
文件 659 2002-11-25 14:05 Disclaimer.txt
文件 1451 2002-04-17 16:20 DlgAbout.cpp
文件 895 2001-05-13 18:25 DlgAbout.h
文件 3777 2002-07-22 15:21 DlgAdvanced.cpp
文件 1248 2002-07-02 13:26 DlgAdvanced.h
文件 3806 2002-11-27 13:47 DlgBasic.cpp
文件 1175 2001-10-13 17:45 DlgBasic.h
文件 3044 2002-04-18 08:39 DlgShadeButtonST.cpp
文件 964 2001-06-14 18:47 DlgShadeButtonST.h
文件 2946 2002-11-27 13:53 DlgTransparent.cpp
文件 1184 2002-07-22 15:09 DlgTransparent.h
文件 14646 2000-03-31 12:05 Hyperli
文件 3637 2000-03-23 12:49 Hyperli
文件 3201 2001-06-14 18:45 MyTabCtrl.cpp
............此处省略57个文件信息
- 上一篇:C++实现的单片空间后方交会
- 下一篇:摆渡木马Visual C++ 源码
相关资源
- MFC 日历控件 万年历 Calendar自绘
- 自绘CListCtrl聊天列表MFC
- VC++界面换肤 界面自绘 内置滚动条自
- MFC 自定义位图按钮加文字
- MFC位图定时移动
- MFC多张位图连续动画显示程序练习
- listctrl加入BUTTON复选框,编辑框,调整
- mfc slider自绘类
- jpg图片、png图片、24位/32位位图转25
- 24位图转8位图像
- MFC读文件数据画波形,并作出分析
- 自绘按钮的实现,对VC++6.0控件派生学
- MFC编写一个交互式绘图程序
- MFC非客户区完美自绘
- MFC小游戏,背景位图,用键盘上的上
- MFC自绘按钮(Button)的dll加源码,也
- C++_MFC的CButtonST含使用说明书及多个
- visual c++ 自绘控件 菜单 MFC界面 资源
- MFC实现Button控件打开本地照片显示在
- MFC 之 CButton 控件重绘GDI+篇
- mfc 菜单、各控件、对话框自绘合集
- 自绘图软件MFC制作
- 全方位图像展开程序
- 异形窗体的win32 API实现
- C++实战源码-将PNG转换为位图
- MFC BUtton按钮自绘
- MFC自绘窗口的边框和标题
- VS2010 C++学习:BMP图像文件处理,放大
- 适用于MFC/VC(VC6.0版本)自绘groupbox
- png格式透明MFC自绘按钮
评论
共有 条评论