91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 37.91MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2023-07-24
  • 語言: C/C++
  • 標簽: CButtonST??C++??mfc??

資源簡介

n內含中文教程讓你輕松上手,還有多個Demo用于學習參考。

資源截圖

代碼片段和文件信息

#include?“stdafx.h“
#include?“BtnST.h“

#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
//?CButtonST

CButtonST::CButtonST()
{
m_MouseOnButton?=?FALSE;

m_hIconIn?=?NULL;
m_hIconOut?=?NULL;
m_cxIcon?=?0;
m_cyIcon?=?0;
m_hCursor?=?NULL;
??
//?Default?type?is?“flat“?button
m_bIsFlat?=?TRUE;?
??
//?By?default?draw?border?in?“flat“?button?
m_bDrawBorder?=?TRUE;?
??
//?By?default?icon?is?aligned?horizontally
m_nAlign?=?ST_ALIGN_HORIZ;?
??
//?By?default?show?the?text?button
m_bShowText?=?TRUE;?
??
//?By?default?for?“flat“?button?don‘t?draw?the?focus?rect
m_bDrawFlatFocus?=?FALSE;

//?By?default?the?button?is?not?the?default?button
m_bIsDefault?=?FALSE;

SetDefaultInactiveBgColor();
SetDefaultInactiveFgColor();
SetDefaultActiveBgColor();
SetDefaultActiveFgColor();

//?No?tooltip?created
m_ToolTip.m_hWnd?=?NULL;

//?Do?not?draw?as?a?transparent?button
m_bDrawTransparent?=?FALSE;
m_pbmpOldBk?=?NULL;
}?//?End?of?CButtonST


CButtonST::~CButtonST()
{
//?Restore?old?bitmap?(if?any)
if?(m_dcBk.m_hDC?!=?NULL?&&?m_pbmpOldBk?!=?NULL)
{
m_dcBk.Selectobject(m_pbmpOldBk);
}

//?Destroy?the?icons?(if?any)
//?Note:?the?following?two?lines?MUST?be?here!?even?if
//?BoundChecker?says?they?are?unnecessary!
if?(m_hIconIn?!=?NULL)?::DestroyIcon(m_hIconIn);
if?(m_hIconOut?!=?NULL)?::DestroyIcon(m_hIconOut);
//?Destroy?the?cursor?(if?any)
if?(m_hCursor?!=?NULL)?::DestroyCursor(m_hCursor);
}?//?End?of?~CButtonST


BEGIN_MESSAGE_MAP(CButtonST?CButton)
????//{{AFX_MSG_MAP(CButtonST)
ON_WM_CAPTURECHANGED()
ON_WM_SETCURSOR()
ON_WM_KILLFOCUS()
ON_WM_MOUSEMOVE()
ON_WM_CTLCOLOR_REFLECT()
ON_WM_SYSCOLORCHANGE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()


void?CButtonST::SetIcon(int?nIconInId?int?nIconOutId)
{
HICON?hIconIn;
HICON?hIconOut;
HINSTANCE?hInstResource?=?AfxFindResourceHandle(MAKEINTRESOURCE(nIconInId)?RT_GROUP_ICON);

//?Set?icon?when?the?mouse?is?IN?the?button
hIconIn?=?(HICON)::LoadImage(hInstResource/*AfxGetApp()->m_hInstance*/?MAKEINTRESOURCE(nIconInId)?IMAGE_ICON?0?0?0);
?? //?Set?icon?when?the?mouse?is?OUT?the?button
hIconOut?=?(nIconOutId?==?NULL)???NULL?:?(HICON)::LoadImage(hInstResource/*AfxGetApp()->m_hInstance*/?MAKEINTRESOURCE(nIconOutId)?IMAGE_ICON?0?0?0);

SetIcon(hIconIn?hIconOut);
/*
//?Note:?the?following?two?lines?MUST?be?here!?even?if
//?BoundChecker?says?they?are?unnecessary!
if?(m_hIconIn?!=?NULL)?::DestroyIcon(m_hIconIn);
if?(m_hIconOut?!=?NULL)?::DestroyIcon(m_hIconOut);

//?Set?icon?when?the?mouse?is?IN?the?button
m_hIconIn?=?(HICON)::LoadImage(hInstResource?MAKEINTRESOURCE(nIconInId)?IMAGE_ICON?0?0?0);
?? //?Set?icon?when?the?mouse?is?OUT?the?button
m_hIconOut?=?(nIconOutId?==?NULL)???m_hIconIn?:?(HICON)::LoadImage(hInstResource?MAKEINTRESOURCE(n

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-10-18?10:59??附件CButtonST\
?????文件???????22197??2005-03-19?11:22??附件CButtonST\BtnST.cpp
?????文件????????6589??2005-03-19?11:22??附件CButtonST\BtnST.h
?????目錄???????????0??2015-10-18?10:59??附件CButtonST\CButtonST_demo\
?????文件????????3135??1999-04-07?14:49??附件CButtonST\CButtonST_demo\BackgroundUtil.cpp
?????文件?????????512??1999-04-07?14:39??附件CButtonST\CButtonST_demo\BackgroundUtil.h
?????文件???????88816??2002-03-31?20:20??附件CButtonST\CButtonST_demo\BCMenu.cpp
?????文件???????16478??2002-03-31?20:20??附件CButtonST\CButtonST_demo\BCMenu.h
?????文件????????1188??1999-07-05?08:14??附件CButtonST\CButtonST_demo\BkDialog.cpp
?????文件????????1254??1999-07-05?08:14??附件CButtonST\CButtonST_demo\BkDialog.h
?????文件???????52295??2003-01-19?09:02??附件CButtonST\CButtonST_demo\BtnST.cpp
?????文件????????8471??2003-01-19?09:01??附件CButtonST\CButtonST_demo\BtnST.h
?????文件??????433892??2003-02-28?10:23??附件CButtonST\CButtonST_demo\CButtonST_Demo.aps
?????文件????????5354??2003-02-28?10:26??附件CButtonST\CButtonST_demo\CButtonST_Demo.clw
?????文件?????????976??2001-10-14?10:36??附件CButtonST\CButtonST_demo\CButtonST_Demo.cpp
?????文件???????12011??2002-04-18?17:38??附件CButtonST\CButtonST_demo\CButtonST_Demo.dsp
?????文件?????????551??2001-05-12?22:40??附件CButtonST\CButtonST_demo\CButtonST_Demo.dsw
?????文件?????????933??2001-05-12?22:49??附件CButtonST\CButtonST_demo\CButtonST_Demo.h
?????文件??????214016??2003-02-28?10:26??附件CButtonST\CButtonST_demo\CButtonST_Demo.ncb
?????文件???????56832??2003-09-05?15:56??附件CButtonST\CButtonST_demo\CButtonST_Demo.opt
?????文件????????1471??2003-01-19?11:13??附件CButtonST\CButtonST_demo\CButtonST_Demo.plg
?????文件???????13084??2003-01-19?08:10??附件CButtonST\CButtonST_demo\CButtonST_Demo.rc
?????文件????????2113??2002-04-17?08:21??附件CButtonST\CButtonST_demo\CButtonST_DemoDlg.cpp
?????文件????????1067??2001-05-12?23:14??附件CButtonST\CButtonST_demo\CButtonST_DemoDlg.h
?????文件????????8684??2001-12-04?09:54??附件CButtonST\CButtonST_demo\CeXDib.cpp
?????文件????????2328??2001-12-04?19:23??附件CButtonST\CButtonST_demo\CeXDib.h
?????目錄???????????0??2009-03-24?18:01??附件CButtonST\CButtonST_demo\Debug\
?????文件?????????657??2001-09-12?17:19??附件CButtonST\CButtonST_demo\Disclaimer.txt
?????文件????????1451??2002-04-18?09:20??附件CButtonST\CButtonST_demo\DlgAbout.cpp
?????文件?????????895??2001-05-14?11:25??附件CButtonST\CButtonST_demo\DlgAbout.h
?????文件????????2979??2003-01-19?11:08??附件CButtonST\CButtonST_demo\DlgAdvanced.cpp
............此處省略82個文件信息

評論

共有 條評論