资源简介
经过修改后适合vs2010使用的cbuttonst类,好东西应该少限制..
代码片段和文件信息
//*************************************************************************
// 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);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-07-14 20:33 VS2010下CButtonST的使用\
文件 149890 2014-07-14 20:33 VS2010下CButtonST的使用\CButtonST使用技巧.pdf
文件 176 2014-07-14 20:24 VS2010下CButtonST的使用\使用步骤.txt
目录 0 2014-07-13 23:51 VS2010下CButtonST的使用\源文件\
文件 88833 2014-07-13 23:37 VS2010下CButtonST的使用\源文件\BCMenu.cpp
文件 16478 2002-03-31 12:20 VS2010下CButtonST的使用\源文件\BCMenu.h
文件 52099 2009-08-12 14:22 VS2010下CButtonST的使用\源文件\BtnST.cpp
文件 8392 2014-07-13 23:22 VS2010下CButtonST的使用\源文件\BtnST.h
文件 123 2014-07-14 00:03 VS2010下CButtonST的使用\源文件修改说明.txt
评论
共有 条评论