亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cebtnst.cpp

?? WinCE開發技巧與實例的配套源碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
int CCeButtonST::GetCheck()
{
	return m_nCheck;
} // End of GetCheck

// This function sets all colors to a default value.
//
// Parameters:
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetDefaultColors(BOOL bRepaint)
{
	m_crColors[BTNST_COLOR_BK_IN]		= ::GetSysColor(COLOR_BTNFACE);
	m_crColors[BTNST_COLOR_FG_IN]		= ::GetSysColor(COLOR_BTNTEXT);
	m_crColors[BTNST_COLOR_BK_OUT]		= ::GetSysColor(COLOR_BTNFACE);
	m_crColors[BTNST_COLOR_FG_OUT]		= ::GetSysColor(COLOR_BTNTEXT);
	m_crColors[BTNST_COLOR_BK_FOCUS]	= ::GetSysColor(COLOR_BTNFACE);
	m_crColors[BTNST_COLOR_FG_FOCUS]	= ::GetSysColor(COLOR_BTNTEXT);

	if (bRepaint)	Invalidate();

	return BTNST_OK;
} // End of SetDefaultColors

// This function sets the color to use for a particular state.
//
// Parameters:
//		[IN]	byColorIndex
//				Index of the color to set. Can be one of the following values:
//				BTNST_COLOR_BK_IN		Background color when mouse is over the button
//				BTNST_COLOR_FG_IN		Text color when mouse is over the button
//				BTNST_COLOR_BK_OUT		Background color when mouse is outside the button
//				BTNST_COLOR_FG_OUT		Text color when mouse is outside the button
//				BTNST_COLOR_BK_FOCUS	Background color when the button is focused
//				BTNST_COLOR_FG_FOCUS	Text color when the button is focused
//		[IN]	crColor
//				New color.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDINDEX
//			Invalid color index.
//
DWORD CCeButtonST::SetColor(BYTE byColorIndex, COLORREF crColor, BOOL bRepaint)
{
	if (byColorIndex >= BTNST_MAX_COLORS)	return BTNST_INVALIDINDEX;

	// Set new color
	m_crColors[byColorIndex] = crColor;

	if (bRepaint)	Invalidate();

	return BTNST_OK;
} // End of SetColor

// This functions returns the color used for a particular state.
//
// Parameters:
//		[IN]	byColorIndex
//				Index of the color to get. Can be one of the following values:
//				BTNST_COLOR_BK_IN		Background color when mouse is over the button
//				BTNST_COLOR_FG_IN		Text color when mouse is over the button
//				BTNST_COLOR_BK_OUT		Background color when mouse is outside the button
//				BTNST_COLOR_FG_OUT		Text color when mouse is outside the button
//				BTNST_COLOR_BK_FOCUS	Background color when the button is focused
//				BTNST_COLOR_FG_FOCUS	Text color when the button is focused
//		[OUT]	crpColor
//				A pointer to a COLORREF that will receive the color.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDINDEX
//			Invalid color index.
//
DWORD CCeButtonST::GetColor(BYTE byColorIndex, COLORREF* crpColor)
{
	if (byColorIndex >= BTNST_MAX_COLORS)	return BTNST_INVALIDINDEX;

	// Get color
	*crpColor = m_crColors[byColorIndex];

	return BTNST_OK;
} // End of GetColor

// This function sets the hilight logic for the button.
// Applies only to flat buttons.
//
// Parameters:
//		[IN]	bAlwaysTrack
//				If TRUE the button will be hilighted even if the window that owns it, is
//				not the active window.
//				If FALSE the button will be hilighted only if the window that owns it,
//				is the active window.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetAlwaysTrack(BOOL bAlwaysTrack)
{
	m_bAlwaysTrack = bAlwaysTrack;
	return BTNST_OK;
} // End of SetAlwaysTrack

// This function sets the cursor to be used when the mouse is over the button.
//
// Parameters:
//		[IN]	nCursorId
//				ID number of the cursor resource.
//				Pass NULL to remove a previously loaded cursor.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDRESOURCE
//			Failed loading the specified resource.
//
DWORD CCeButtonST::SetBtnCursor(int nCursorId, BOOL bRepaint)
{
	HINSTANCE	hInstResource = NULL;
	// Restore old cursor (if any)
	if (m_hOldCursor)	::SetCursor(m_hOldCursor);
	// Destroy the cursor (if any)
	if (m_hCursor)	::DestroyCursor(m_hCursor);
	m_hCursor = NULL;
	m_hOldCursor = NULL;

	// Load cursor
	if (nCursorId)
	{
		hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nCursorId), RT_GROUP_CURSOR);
		// Load cursor resource
		m_hCursor = (HCURSOR)::LoadImage(hInstResource, MAKEINTRESOURCE(nCursorId), IMAGE_CURSOR, 0, 0, 0);
		// Repaint the button
		if (bRepaint) Invalidate();
		// If something wrong
		if (m_hCursor == NULL) return BTNST_INVALIDRESOURCE;
	} // if

	return BTNST_OK;
} // End of SetBtnCursor

// This function sets if the button border must be drawn.
// Applies only to flat buttons.
//
// Parameters:
//		[IN]	bDrawBorder
//				If TRUE the border will be drawn.
//		[IN]	bRepaint
//				If TRUE the button will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::DrawBorder(BOOL bDrawBorder, BOOL bRepaint)
{
	m_bDrawBorder = bDrawBorder;
	// Repaint the button
	if (bRepaint) Invalidate();

	return BTNST_OK;
} // End of DrawBorder

// This function sets if the focus rectangle must be drawn for flat buttons.
//
// Parameters:
//		[IN]	bDrawFlatFocus
//				If TRUE the focus rectangle will be drawn also for flat buttons.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::DrawFlatFocus(BOOL bDrawFlatFocus, BOOL bRepaint)
{
	m_bDrawFlatFocus = bDrawFlatFocus;
	// Repaint the button
	if (bRepaint) Invalidate();

	return BTNST_OK;
} // End of DrawFlatFocus

// This function returns if the button is the default button.
//
// Return value:
//		TRUE
//			The button is the default button.
//		FALSE
//			The button is not the default button.
//
BOOL CCeButtonST::GetDefault()
{
	return m_bIsDefault;
} // End of GetDefault

// This function sets the URL that will be opened when the button is clicked.
//
// Parameters:
//		[IN]	lpszURL
//				Pointer to a null-terminated string that contains the URL.
//				Pass NULL to remove any previously specified URL.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetURL(LPCTSTR lpszURL)
{
	// Remove any existing URL
	memset(m_szURL, 0, sizeof(m_szURL));

	if (lpszURL)
	{
		// Store the URL
		_tcsncpy(m_szURL, lpszURL, _MAX_PATH);
	} // if

	return BTNST_OK;
} // End of SetURL

BOOL CCeButtonST::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
	HCURSOR	hOldCursor;

	// If a cursor was specified then use it!
	if (m_hCursor != NULL)
	{
		hOldCursor = ::SetCursor(m_hCursor);
		// Store old cursor
		if (!m_hOldCursor)	m_hOldCursor = hOldCursor;
		return TRUE;
	} // if

	return CButton::OnSetCursor(pWnd, nHitTest, message);
} // End of OnSetCursor

// This function associates a menu to the button.
// The menu will be displayed clicking the button.
//
// Parameters:
//		[IN]	nMenu
//				ID number of the menu resource.
//				Pass NULL to remove any menu from the button.
//		[IN]	hParentWnd
//				Handle to the window that owns the menu.
//				This window receives all messages from the menu.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDRESOURCE
//			Failed loading the specified resource.
//
DWORD CCeButtonST::SetMenu(UINT nMenu, HWND hParentWnd, BOOL bRepaint)
{
	HINSTANCE	hInstResource	= NULL;

	// Destroy any previous menu
	if (m_hMenu)
	{
		::DestroyMenu(m_hMenu);
		m_hMenu = NULL;
		m_hParentWndMenu = NULL;
		m_bMenuDisplayed = FALSE;
	} // if

	// Load menu
	if (nMenu)
	{
		// Find correct resource handle
		hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nMenu), RT_MENU);
		// Load menu resource
		m_hMenu = ::LoadMenu(hInstResource, MAKEINTRESOURCE(nMenu));
		m_hParentWndMenu = hParentWnd;
		// If something wrong
		if (m_hMenu == NULL) return BTNST_INVALIDRESOURCE;
	} // if

	// Repaint the button
	if (bRepaint) Invalidate();

	return BTNST_OK;
} // End of SetMenu

// This function is called every time the button background needs to be painted.
//
// Parameters:
//		[IN]	pDC
//				Pointer to a CDC object that indicates the device context.
//		[IN]	pRect
//				Pointer to a CRect object that indicates the bounds of the
//				area to be painted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::OnDrawBackground(CDC* pDC, LPCRECT pRect)
{
	COLORREF	crColor;

	if (m_bMouseOnButton || m_bIsPressed)
		crColor = m_crColors[BTNST_COLOR_BK_IN];
	else
	{
		if (m_bIsFocused)
			crColor = m_crColors[BTNST_COLOR_BK_FOCUS];
		else
			crColor = m_crColors[BTNST_COLOR_BK_OUT];
	} // else

	CBrush		brBackground(crColor);

	pDC->FillRect(pRect, &brBackground);

	return BTNST_OK;
} // End of OnDrawBackground

// This function is called every time the button border needs to be painted.
//
// Parameters:
//		[IN]	pDC
//				Pointer to a CDC object that indicates the device context.
//		[IN]	pRect
//				Pointer to a CRect object that indicates the bounds of the
//				area to be painted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::OnDrawBorder(CDC* pDC, LPCRECT pRect)
{
	if (m_bIsPressed)
		pDC->Draw3dRect(pRect, ::GetSysColor(COLOR_BTNSHADOW), ::GetSysColor(COLOR_BTNHIGHLIGHT));
	else
		if (m_bIsFlat == FALSE || (m_bIsFlat && m_bMouseOnButton))
			pDC->Draw3dRect(pRect, ::GetSysColor(COLOR_BTNHIGHLIGHT), ::GetSysColor(COLOR_BTNSHADOW));

	return BTNST_OK;
} // End of OnDrawBorder

void CALLBACK CCeButtonST::TimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
	POINT	csPos;
	RECT	csRect;

	::GetCursorPos(&csPos);
    ::ScreenToClient(hwnd, &csPos);

	::GetClientRect(hwnd, &csRect);

	if (!::PtInRect(&csRect, csPos))
	{
		::PostMessage(hwnd, WM_MOUSELEAVE, 0, 0);
		//m_bMouseOnButton = FALSE;
		//Invalidate();
	} // if
} // End of TimerProc

#undef BS_TYPEMASK
#undef WM_MOUSELEAVE

/*
void CCeButtonST::OnCaptureChanged(CWnd *pWnd) 
{
	if (m_bMouseOnButton)
	{
		ReleaseCapture();
		Invalidate();
	} // if

	CButton::OnCaptureChanged(pWnd);
} // End of OnCaptureChanged
*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色999日韩国产欧美一区二区| 91偷拍与自偷拍精品| 日韩你懂的在线播放| 激情综合色丁香一区二区| 精品国产三级电影在线观看| 国产精品自拍三区| 亚洲欧美综合色| 欧美撒尿777hd撒尿| 精品毛片乱码1区2区3区| 国产永久精品大片wwwapp| 国产视频亚洲色图| 91视视频在线观看入口直接观看www | 亚洲午夜精品一区二区三区他趣| 欧美视频一区在线| 亚洲va欧美va天堂v国产综合| 久久久久久久综合色一本| 麻豆精品视频在线观看视频| 久久精品网站免费观看| 成人福利视频在线| 亚洲高清中文字幕| 日韩美女一区二区三区四区| 国产精品自在在线| 亚洲欧美色综合| 91精品国产欧美一区二区18| 国产精品中文字幕日韩精品| 亚洲人成影院在线观看| 日韩精品久久久久久| 精品国产一区二区亚洲人成毛片| 成人a区在线观看| 午夜av一区二区| 久久久www成人免费无遮挡大片| 色婷婷激情综合| 久久精品av麻豆的观看方式| 成人欧美一区二区三区白人| 91精选在线观看| 成人免费看黄yyy456| 日韩经典中文字幕一区| 国产精品看片你懂得| 在线成人免费视频| 成熟亚洲日本毛茸茸凸凹| 视频一区欧美日韩| 欧美一级片在线| 色综合天天综合网国产成人综合天| 亚洲成人tv网| 国产人成亚洲第一网站在线播放| 欧美三级电影精品| 成人国产精品免费观看| 男女性色大片免费观看一区二区| 国产精品伦一区| 日韩免费成人网| 欧美性做爰猛烈叫床潮| 丁香婷婷综合色啪| 麻豆极品一区二区三区| 一区二区三区蜜桃网| 久久九九影视网| 91 com成人网| 99视频精品免费视频| 久久精品国产澳门| 亚洲国产精品一区二区www在线| 国产色产综合色产在线视频| 91精品久久久久久久久99蜜臂| 91在线观看视频| 久久久久久夜精品精品免费| 欧美揉bbbbb揉bbbbb| av亚洲产国偷v产偷v自拍| 久久不见久久见免费视频1| 亚洲一区免费观看| 亚洲欧洲色图综合| 国产欧美久久久精品影院| 日韩午夜电影av| 欧美探花视频资源| 91老司机福利 在线| 懂色av中文一区二区三区 | 天堂蜜桃91精品| 最好看的中文字幕久久| 色综合久久久网| 91麻豆精品国产91久久久资源速度 | 欧美日韩精品免费| 不卡的av在线| 国产美女娇喘av呻吟久久| 奇米777欧美一区二区| 亚洲国产成人91porn| 亚洲欧洲综合另类| 国产精品久久二区二区| 久久九九久久九九| 日韩欧美色综合| 欧美一区二区三区小说| 亚洲网友自拍偷拍| 亚洲另类春色校园小说| 国产精品日韩成人| 亚洲国产精品二十页| 久久久国产午夜精品| 精品国产91九色蝌蚪| 日韩欧美久久一区| 日韩欧美黄色影院| 日韩一区二区三区免费看 | 一区二区三区视频在线观看| 亚洲欧美综合色| 亚洲欧美日韩国产中文在线| 亚洲欧美综合在线精品| 亚洲人妖av一区二区| 亚洲美女屁股眼交| 亚洲精品亚洲人成人网在线播放| 亚洲天堂成人在线观看| 亚洲视频一区在线| 亚洲免费在线播放| 91香蕉视频污| 国产一区二区毛片| 天堂久久一区二区三区| 日韩在线一区二区| 日韩**一区毛片| 日本强好片久久久久久aaa| 日本人妖一区二区| 久久爱另类一区二区小说| 国产夜色精品一区二区av| 久久久99免费| 中文在线一区二区| 国产精品国产精品国产专区不蜜 | 精品国产乱码久久久久久闺蜜| 欧美成人video| 久久奇米777| 中文av字幕一区| 亚洲视频小说图片| 亚洲成人一区在线| 美女一区二区视频| 国产精品1区2区3区| 不卡一区二区中文字幕| 日本久久一区二区三区| 欧美日韩黄色一区二区| 日韩免费福利电影在线观看| 国产日韩欧美制服另类| 综合激情网...| 性做久久久久久久免费看| 蜜桃精品视频在线| 国产精品66部| 91麻豆.com| 欧美放荡的少妇| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美激情一区二区三区在线| 亚洲久草在线视频| 婷婷久久综合九色国产成人| 久久精品av麻豆的观看方式| 成人精品国产免费网站| 欧美在线一二三四区| 韩国毛片一区二区三区| 99精品欧美一区二区三区小说 | 日韩国产精品91| 91福利视频在线| 56国语精品自产拍在线观看| 精品少妇一区二区三区在线视频| 国产欧美日韩综合| 亚洲精品国产视频| 奇米精品一区二区三区在线观看| 风间由美一区二区三区在线观看| 色诱视频网站一区| 日韩视频在线一区二区| 亚洲欧洲国产日韩| 日本亚洲最大的色成网站www| 国产黄色精品视频| 欧美三级日韩在线| 国产欧美一区二区精品秋霞影院 | 日韩国产高清影视| 国产成人综合在线观看| 欧美怡红院视频| 久久综合久久综合九色| 一区二区三区精品视频| 精品在线你懂的| 色屁屁一区二区| 精品国产91洋老外米糕| 一区二区三区**美女毛片| 国产一区二区三区久久悠悠色av| 91福利在线导航| 国产亚洲欧洲997久久综合| 亚洲电影在线免费观看| 国产成人自拍网| 9191久久久久久久久久久| 国产精品萝li| 精品一区二区在线免费观看| 日本高清免费不卡视频| 久久这里只有精品6| 五月天亚洲婷婷| 91一区二区在线| 久久久国产午夜精品| 91.麻豆视频| 亚洲欧美在线视频观看| 日韩在线一区二区| 高清不卡一区二区| 欧美日韩国产综合视频在线观看| 中文字幕二三区不卡| 麻豆久久一区二区| 91精品91久久久中77777| 久久在线观看免费| 午夜欧美电影在线观看| 91影视在线播放| 中文字幕成人网| 理论电影国产精品| 在线播放亚洲一区| 亚洲综合在线五月| 99久久婷婷国产| 久久精品免视看|