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

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

?? btnst.cpp

?? 它是一個可以實時交互的嵌入式軟件系統
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
	} // if
	else
	{
		if (byRed + shOffset < 0)		shOffsetR = -byRed;
		if (byGreen + shOffset < 0)		shOffsetG = -byGreen;
		if (byBlue + shOffset < 0)		shOffsetB = -byBlue;

		shOffset = max(max(shOffsetR, shOffsetG), shOffsetB);
	} // else

	// Set new color
	m_crColors[byColorIndex] = RGB(byRed + shOffset, byGreen + shOffset, byBlue + shOffset);

	if (bRepaint)	Invalidate();

	return BTNST_OK;
} // End of OffsetColor

// 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 CButtonST::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 CButtonST::SetBtnCursor(int nCursorId, BOOL bRepaint)
{
	HINSTANCE	hInstResource = NULL;
	// Destroy any previous cursor
	if (m_hCursor)
	{
		::DestroyCursor(m_hCursor);
		m_hCursor = NULL;
	} // if

	// 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 control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CButtonST::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 CButtonST::DrawFlatFocus(BOOL bDrawFlatFocus, BOOL bRepaint)
{
	m_bDrawFlatFocus = bDrawFlatFocus;
	// Repaint the button
	if (bRepaint) Invalidate();

	return BTNST_OK;
} // End of DrawFlatFocus

void CButtonST::InitToolTip()
{
	if (m_ToolTip.m_hWnd == NULL)
	{
		// Create ToolTip control
		m_ToolTip.Create(this);
		// Create inactive
		m_ToolTip.Activate(FALSE);
		// Enable multiline
		m_ToolTip.SendMessage(TTM_SETMAXTIPWIDTH, 0, 400);
	} // if
} // End of InitToolTip

// This function sets the text to show in the button tooltip.
//
// Parameters:
//		[IN]	nText
//				ID number of the string resource containing the text to show.
//		[IN]	bActivate
//				If TRUE the tooltip will be created active.
//
void CButtonST::SetTooltipText(int nText, BOOL bActivate)
{
	CString sText;

	// Load string resource
	sText.LoadString(nText);
	// If string resource is not empty
	if (sText.IsEmpty() == FALSE) SetTooltipText((LPCTSTR)sText, bActivate);
} // End of SetTooltipText

// This function sets the text to show in the button tooltip.
//
// Parameters:
//		[IN]	lpszText
//				Pointer to a null-terminated string containing the text to show.
//		[IN]	bActivate
//				If TRUE the tooltip will be created active.
//
void CButtonST::SetTooltipText(LPCTSTR lpszText, BOOL bActivate)
{
	// We cannot accept NULL pointer
	if (lpszText == NULL) return;

	// Initialize ToolTip
	InitToolTip();

	// If there is no tooltip defined then add it
	if (m_ToolTip.GetToolCount() == 0)
	{
		CRect rectBtn; 
		GetClientRect(rectBtn);
		m_ToolTip.AddTool(this, lpszText, rectBtn, 1);
	} // if

	// Set text for tooltip
	m_ToolTip.UpdateTipText(lpszText, this, 1);
	m_ToolTip.Activate(bActivate);
} // End of SetTooltipText

// This function enables or disables the button tooltip.
//
// Parameters:
//		[IN]	bActivate
//				If TRUE the tooltip will be activated.
//
void CButtonST::ActivateTooltip(BOOL bActivate)
{
	// If there is no tooltip then do nothing
	if (m_ToolTip.GetToolCount() == 0) return;

	// Activate tooltip
	m_ToolTip.Activate(bActivate);
} // End of EnableTooltip

// 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 CButtonST::GetDefault()
{
	return m_bIsDefault;
} // End of GetDefault

// This function enables the transparent mode.
// Note: this operation is not reversible.
// DrawTransparent should be called just after the button is created.
// Do not use trasparent buttons until you really need it (you have a bitmapped
// background) since each transparent button makes a copy in memory of its background.
// This may bring unnecessary memory use and execution overload.
//
// Parameters:
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
void CButtonST::DrawTransparent(BOOL bRepaint)
{
	m_bDrawTransparent = TRUE;

	// Restore old bitmap (if any)
	if (m_dcBk.m_hDC != NULL && m_pbmpOldBk != NULL)
	{
		m_dcBk.SelectObject(m_pbmpOldBk);
	} // if

	m_bmpBk.DeleteObject();
	m_dcBk.DeleteDC();

	// Repaint the button
	if (bRepaint) Invalidate();
} // End of DrawTransparent

// 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 removed any previously specified URL.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CButtonST::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

// 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.
//
#ifndef	BTNST_USE_BCMENU
DWORD CButtonST::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
#endif

// This function associates a menu to the button.
// The menu will be displayed clicking the button.
// The menu will be handled by the BCMenu class.
//
// 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]	bWinXPStyle
//				If TRUE the menu will be displayed using the new Windows XP style.
//				If FALSE the menu will be displayed using the standard style.
//		[IN]	nToolbarID
//				Resource ID of the toolbar to be associated to the menu.
//		[IN]	sizeToolbarIcon
//				A CSize object indicating the size (in pixels) of each icon into the toolbar.
//				All icons into the toolbar must have the same size.
//		[IN]	crToolbarBk
//				A COLORREF value indicating the color to use as background for the icons into the toolbar.
//				This color will be used as the "transparent" color.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDRESOURCE
//			Failed loading the specified resource.
//
#ifdef	BTNST_USE_BCMENU
DWORD CButtonST::SetMenu(UINT nMenu, HWND hParentWnd, BOOL bWinXPStyle, UINT nToolbarID, CSize sizeToolbarIcon, COLORREF crToolbarBk, BOOL bRepaint)
{
	BOOL	bRetValue = FALSE;

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

	// Load menu
	if (nMenu)
	{
		m_menuPopup.SetMenuDrawMode(bWinXPStyle);
		// Load menu
		bRetValue = m_menuPopup.LoadMenu(nMenu);
		// If something wrong
		if (bRetValue == FALSE) return BTNST_INVALIDRESOURCE;

		// Load toolbar
		if (nToolbarID)
		{
			m_menuPopup.SetBitmapBackground(crToolbarBk);
			m_menuPopup.SetIconSize(sizeToolbarIcon.cx, sizeToolbarIcon.cy);

			bRetValue = m_menuPopup.LoadToolbar(nToolbarID);
			// If something wrong
			if (bRetValue == FALSE) 
			{
				m_menuPopup.DestroyMenu();
				return BTNST_INVALIDRESOURCE;
			} // if
		} // if

		m_hParentWndMenu = hParentWnd;
	} // if

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

	return BTNST_OK;
} // End of SetMenu
#endif

// This function is called every time the button background needs to be painted.
// If the button is in transparent mode this function will NOT be called.
// This is a virtual function that can be rewritten in CButtonST-derived classes
// to produce a whole range of buttons not available by default.
//
// 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 CButtonST::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.
// If the button is in standard (not flat) mode this function will NOT be called.
// This is a virtual function that can be rewritten in CButtonST-derived classes
// to produce a whole range of buttons not available by default.
//
// 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 CButtonST::OnDrawBorder(CDC* pDC, LPCRECT pRect)
{
	if (m_bIsPressed)
		pDC->Draw3dRect(pRect, ::GetSysColor(COLOR_BTNSHADOW), ::GetSysColor(COLOR_BTNHILIGHT));
	else
		pDC->Draw3dRect(pRect, ::GetSysColor(COLOR_BTNHILIGHT), ::GetSysColor(COLOR_BTNSHADOW));

	return BTNST_OK;
} // End of OnDrawBorder

#undef BS_TYPEMASK

void CButtonST::SetBmp(int bmp1, int bmp2)
{
	this->bmp[0]=bmp1;
	this->bmp[1]=bmp2;
}

void CButtonST::SetBmp1()
{
	this->SetBitmaps(this->bmp[0],0);
}

void CButtonST::SetBmp2()
{
	this->SetBitmaps(this->bmp[1],0);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1区2区3区| 波多野结衣视频一区| 中文字幕在线观看一区| 91精品国产91久久久久久最新毛片| 国产成人综合在线播放| 天天影视色香欲综合网老头| 亚洲视频一二三区| 精品国产乱码久久久久久夜甘婷婷 | www.在线成人| 日本中文字幕一区二区有限公司| 中文字幕一区二区三区视频 | 欧美另类videos死尸| 国产69精品久久777的优势| 日韩精品成人一区二区在线| 亚洲人成伊人成综合网小说| 久久婷婷国产综合国色天香| 69堂精品视频| 欧美视频一二三区| 色综合久久中文字幕综合网| 欧美精品xxxxbbbb| 一本一本久久a久久精品综合麻豆| 国产激情一区二区三区四区| 久久99国产精品尤物| 偷拍一区二区三区| 亚洲综合激情网| 综合电影一区二区三区| 国产精品高清亚洲| 欧美激情一区二区| 国产欧美一区二区精品性色超碰| 日韩久久久精品| 日韩三级精品电影久久久| 欧美日本一区二区三区四区 | 久久精品日产第一区二区三区高清版 | 国产清纯在线一区二区www| 日韩欧美在线不卡| 日韩欧美一二三| 日韩视频永久免费| 日韩欧美自拍偷拍| 日韩美女一区二区三区四区| 日韩视频免费直播| 日韩精品在线网站| 精品美女在线观看| 久久久综合九色合综国产精品| 日韩欧美一二区| 精品国产乱码久久久久久久| 精品久久久久一区| 久久精品一区二区三区不卡牛牛| 久久先锋资源网| 欧美激情一区二区三区蜜桃视频| 中文字幕亚洲精品在线观看| 亚洲区小说区图片区qvod| 亚洲三级在线看| 亚洲午夜精品久久久久久久久| 午夜精品久久久久久久| 男人操女人的视频在线观看欧美| 蜜桃久久久久久| 国产一区91精品张津瑜| 成人av网在线| 欧美日韩精品一二三区| 日韩一卡二卡三卡四卡| 久久久亚洲国产美女国产盗摄| 久久精品夜夜夜夜久久| 欧美激情综合五月色丁香小说| 亚洲天堂福利av| 日韩国产精品久久久| 久久国产成人午夜av影院| 国产91精品露脸国语对白| 97精品视频在线观看自产线路二| 欧美日韩在线播放三区四区| 精品福利在线导航| 中文字幕中文字幕一区| 亚洲h在线观看| 国产精品亚洲第一| 一本大道久久精品懂色aⅴ| 欧美一区二区性放荡片| 国产一区亚洲一区| 北条麻妃国产九九精品视频| 欧美二区三区的天堂| 久久久久亚洲蜜桃| 亚洲一区视频在线| 国精产品一区一区三区mba桃花| 波多野结衣中文字幕一区| 884aa四虎影成人精品一区| 国产农村妇女毛片精品久久麻豆 | 精品视频色一区| 精品久久五月天| 国产精品私人影院| 亚洲狠狠爱一区二区三区| 美女视频黄频大全不卡视频在线播放| 成人一区在线看| 欧美日韩一区二区三区免费看| 欧美成人精品福利| 亚洲精品美腿丝袜| 国产精品一区2区| 欧美日韩国产综合久久| 中文字幕二三区不卡| 天天影视色香欲综合网老头| 99麻豆久久久国产精品免费| 日韩西西人体444www| 亚洲黄色在线视频| 国产福利一区二区三区在线视频| 欧美日韩精品免费| 国产精品欧美久久久久无广告| 人人超碰91尤物精品国产| 91欧美一区二区| 日本一区二区三区dvd视频在线| 偷拍日韩校园综合在线| 99久久精品免费看| 久久久久97国产精华液好用吗| 午夜天堂影视香蕉久久| 91香蕉国产在线观看软件| 久久久久久亚洲综合影院红桃| 婷婷中文字幕综合| 在线一区二区三区四区五区| 国产欧美一区二区精品久导航| 免费成人av在线| 69p69国产精品| 亚洲va在线va天堂| 欧美在线观看视频一区二区三区| 国产精品久久久久久久午夜片| 国产在线看一区| 精品欧美黑人一区二区三区| 青青草国产成人av片免费| 欧美视频中文字幕| 亚洲精品国产无天堂网2021| 99热精品国产| 最新热久久免费视频| 成人av电影在线| 国产精品区一区二区三区| 国产精品888| 久久久久久毛片| 国产乱码精品一区二区三区av| 欧美哺乳videos| 国模少妇一区二区三区| 久久这里都是精品| 国产剧情一区二区| 国产清纯白嫩初高生在线观看91 | 欧美一区二区三区不卡| 成人性色生活片| 国产精品伦一区| 99久久精品国产一区| 国产精品初高中害羞小美女文| jizzjizzjizz欧美| 亚洲精品国产精品乱码不99 | 欧美色中文字幕| 首页国产欧美久久| 69av一区二区三区| 韩国一区二区在线观看| 国产日韩欧美不卡| 91美女在线观看| 亚洲最大的成人av| 制服丝袜在线91| 精品在线一区二区| 国产清纯白嫩初高生在线观看91 | 欧美精品一区二区三区蜜臀| 国产盗摄视频一区二区三区| 国产精品网友自拍| 欧美午夜免费电影| 久久99久久99小草精品免视看| 国产日韩欧美精品综合| 91老师国产黑色丝袜在线| 五月天激情小说综合| 欧美xxxx在线观看| av成人老司机| 午夜精品福利视频网站| 欧美电视剧在线观看完整版| 国产一区二区三区精品视频| 国产精品夫妻自拍| 欧美日韩亚洲丝袜制服| 久久精品国产77777蜜臀| 欧美高清在线精品一区| 在线观看一区二区精品视频| 另类小说视频一区二区| 国产精品毛片大码女人| 91 com成人网| 成人av电影在线网| 日韩电影免费在线| 国产精品亲子伦对白| 555夜色666亚洲国产免| www.欧美亚洲| 男女激情视频一区| 亚洲欧美经典视频| 欧美变态tickle挠乳网站| 91欧美激情一区二区三区成人| 免费人成网站在线观看欧美高清| 国产精品传媒入口麻豆| 日韩三级视频在线看| 色婷婷综合久久| 极品少妇xxxx偷拍精品少妇| 亚洲卡通欧美制服中文| 精品国产凹凸成av人网站| 色综合久久久久久久久| 国产精品888| 免费三级欧美电影| 亚洲最大色网站| 中文字幕一区二区三| 精品成人一区二区三区四区| 欧美男人的天堂一二区| 99久久综合色| 成人午夜电影久久影院|