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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cebtnst.cpp

?? irda communication on PPC. 和IrdaMobilePCSrc.zip一起使用。
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
	if (m_bIsFlat == FALSE)
	{
		if (m_bIsFocused || m_bIsDefault)
		{
			CBrush br(RGB(0,0,0));  
			pDC->FrameRect(&itemRect, &br);
			itemRect.DeflateRect(1, 1);
		} // if
	} // if

	// Prepare draw... paint button background
	OnDrawBackground(pDC, &itemRect);

	// Paint button border
	if (!m_bIsFlat || (m_bIsFlat && m_bDrawBorder))
		OnDrawBorder(pDC, &itemRect);

	// Read the button's title
	TCHAR	szTitle[256];
	GetWindowText(szTitle, sizeof(szTitle)/sizeof(TCHAR));

	CRect captionRect = lpDIS->rcItem;

	// Draw the icon
	if (m_csIcons[0].hIcon)
	{
		DrawTheIcon(pDC, _tcslen(szTitle), &lpDIS->rcItem, &captionRect, m_bIsPressed, m_bIsDisabled);
	} // if

	// Write the button title (if any)
	if (_tcslen(szTitle))
	{
		// Draw the button's title
		// If button is pressed then "press" title also
		if (m_bIsPressed && m_bIsCheckBox == FALSE)
			captionRect.OffsetRect(1, 1);
    
		// ONLY FOR DEBUG 
		//CBrush brBtnShadow(RGB(255, 0, 0));
		//pDC->FrameRect(&captionRect, &brBtnShadow);

		// Center text
		CRect centerRect = captionRect;
		pDC->DrawText(szTitle, -1, captionRect, DT_WORDBREAK | DT_CENTER | DT_CALCRECT);
		captionRect.OffsetRect((centerRect.Width() - captionRect.Width())/2, (centerRect.Height() - captionRect.Height())/2);
		/* RFU
		captionRect.OffsetRect(0, (centerRect.Height() - captionRect.Height())/2);
		captionRect.OffsetRect((centerRect.Width() - captionRect.Width())-4, (centerRect.Height() - captionRect.Height())/2);
		*/

		pDC->SetBkMode(TRANSPARENT);
		/*
		pDC->DrawState(captionRect.TopLeft(), captionRect.Size(), szTitle, (bIsDisabled ? DSS_DISABLED : DSS_NORMAL), 
						TRUE, 0, (CBrush*)NULL);
		*/
		if (m_bIsDisabled)
		{
			captionRect.OffsetRect(1, 1);
			pDC->SetTextColor(::GetSysColor(COLOR_3DHILIGHT));
			pDC->DrawText(szTitle, -1, captionRect, DT_WORDBREAK | DT_CENTER);
			captionRect.OffsetRect(-1, -1);
			pDC->SetTextColor(::GetSysColor(COLOR_3DSHADOW));
			pDC->DrawText(szTitle, -1, captionRect, DT_WORDBREAK | DT_CENTER);
		} // if
		else
		{
			if (m_bMouseOnButton || m_bIsPressed) 
			{
				pDC->SetTextColor(m_crColors[BTNST_COLOR_FG_IN]);
				pDC->SetBkColor(m_crColors[BTNST_COLOR_BK_IN]);
			} // if
			else 
			{
				pDC->SetTextColor(m_crColors[BTNST_COLOR_FG_OUT]);
				pDC->SetBkColor(m_crColors[BTNST_COLOR_BK_OUT]);
			} // else
			pDC->DrawText(szTitle, -1, captionRect, DT_WORDBREAK | DT_CENTER);
		} // if
	} // if

	if (m_bIsFlat == FALSE || (m_bIsFlat && m_bDrawFlatFocus))
	{
		// Draw the focus rect
		if (m_bIsFocused)
		{
			CRect focusRect = itemRect;
			focusRect.DeflateRect(3, 3);
			pDC->DrawFocusRect(&focusRect);
		} // if
	} // if
} // End of DrawItem

//
// Parameters:
//		[IN]	bHasTitle
//				TRUE if the button has a text
//		[IN]	rpItem
//				A pointer to a RECT structure indicating the allowed paint area
//		[IN/OUT]rpTitle
//				A pointer to a CRect object indicating the paint area reserved for the
//				text. This structure will be modified if necessary.
//		[IN]	bIsPressed
//				TRUE if the button is currently pressed
//		[IN]	dwWidth
//				Width of the image (icon or bitmap)
//		[IN]	dwHeight
//				Height of the image (icon or bitmap)
//		[OUT]	rpImage
//				A pointer to a CRect object that will receive the area available to the image
//
void CCeButtonST::PrepareImageRect(BOOL bHasTitle, RECT* rpItem, CRect* rpTitle, BOOL bIsPressed, DWORD dwWidth, DWORD dwHeight, CRect* rpImage)
{
	CRect rBtn;

	rpImage->CopyRect(rpItem);

	switch (m_byAlign)
	{
		case ST_ALIGN_HORIZ:
			if (bHasTitle == FALSE)
			{
				// Center image horizontally
				rpImage->left += ((rpImage->Width() - dwWidth)/2);
			}
			else
			{
				// Image must be placed just inside the focus rect
				rpImage->left += 3;  
				rpTitle->left += dwWidth + 3;
			}
			// Center image vertically
			rpImage->top += ((rpImage->Height() - dwHeight)/2);
			break;

		case ST_ALIGN_HORIZ_RIGHT:
			GetClientRect(&rBtn);
			if (bHasTitle == FALSE)
			{
				// Center image horizontally
				rpImage->left += ((rpImage->Width() - dwWidth)/2);
			}
			else
			{
				// Image must be placed just inside the focus rect
				rpTitle->right = rpTitle->Width() - dwWidth - 3;
				rpTitle->left = 3;
				rpImage->left = rBtn.right - dwWidth - 3;
				// Center image vertically
				rpImage->top += ((rpImage->Height() - dwHeight)/2);
			}
			break;
		
		case ST_ALIGN_VERT:
			// Center image horizontally
			rpImage->left += ((rpImage->Width() - dwWidth)/2);
			if (bHasTitle == FALSE)
			{
				// Center image vertically
				rpImage->top += ((rpImage->Height() - dwHeight)/2);           
			}
			else
			{
				rpImage->top = 3;
				rpTitle->top += dwHeight;
			}
			break;
	}
    
	// If button is pressed then press image also
	if (bIsPressed && m_bIsCheckBox == FALSE)
		rpImage->OffsetRect(1, 1);
} // End of PrepareImageRect

void CCeButtonST::DrawTheIcon(CDC* pDC, BOOL bHasTitle, RECT* rpItem, CRect* rpTitle, BOOL bIsPressed, BOOL bIsDisabled)
{
	BYTE		byIndex		= 0;

	// Select the icon to use
	if (bIsDisabled)
		byIndex = (m_csIcons[2].hIcon == NULL ? 0 : 2);
	else
	{
		if ((m_bIsCheckBox && bIsPressed) || (!m_bIsCheckBox && (bIsPressed || m_bMouseOnButton)))
			byIndex = 0;
		else
			byIndex = (m_csIcons[1].hIcon == NULL ? 0 : 1);
	} // else

	CRect	rImage;
	PrepareImageRect(bHasTitle, rpItem, rpTitle, bIsPressed, m_csIcons[byIndex].dwWidth, m_csIcons[byIndex].dwHeight, &rImage);

	// Ole'!
	pDC->DrawIcon(rImage.TopLeft(), m_csIcons[byIndex].hIcon);
} // End of DrawTheIcon

// This function assigns icons to the button.
// Any previous icon will be removed.
//
// Parameters:
//		[IN]	nIconIn
//				ID number of the icon resource to show when the mouse is over the button.
//				Pass NULL to remove any icon from the button.
//		[IN]	sizeIn
//				Size of the icon.
//		[IN]	nIconOut
//				ID number of the icon resource to show when the mouse is outside the button.
//				Can be NULL.
//		[IN]	sizeOut
//				Size of the icon.
//		[IN]	nIconDis
//				ID number of the icon resource to show when the button is disabled.
//				Can be NULL.
//		[IN]	sizeDis
//				Size of the icon.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetIcon(int nIconIn, CSize sizeIn, int nIconOut, CSize sizeOut, int nIconDis, CSize sizeDis)
{
	HICON		hIconIn			= NULL;
	HICON		hIconOut		= NULL;
	HICON		hIconDis		= NULL;
	HINSTANCE	hInstResource	= NULL;

	// Find correct resource handle
	hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nIconIn), RT_GROUP_ICON);

	// Set icon when the mouse is IN the button
	hIconIn = (HICON)::LoadImage(hInstResource, MAKEINTRESOURCE(nIconIn), IMAGE_ICON, 0, 0, 0);
  	// Set icon when the mouse is OUT the button
	if (nIconOut)
		hIconOut = (HICON)::LoadImage(hInstResource, MAKEINTRESOURCE(nIconOut), IMAGE_ICON, 0, 0, 0);
  	// Set icon when the mouse is DISABLED
	if (nIconDis)
		hIconDis = (HICON)::LoadImage(hInstResource, MAKEINTRESOURCE(nIconDis), IMAGE_ICON, 0, 0, 0);

	return SetIcon(hIconIn, sizeIn, hIconOut, sizeOut, hIconDis, sizeDis);
} // End of SetIcon

// This function assigns icons to the button.
// Any previous icon or bitmap will be removed.
//
// Parameters:
//		[IN]	hIconIn
//				Handle fo the icon to show when the mouse is over the button.
//				Pass NULL to remove any icon from the button.
//		[IN]	sizeIn
//				Size of the icon.
//		[IN]	hIconOut
//				Handle to the icon to show when the mouse is outside the button.
//				Can be NULL.
//		[IN]	sizeOut
//				Size of the icon.
//		[IN]	hIconDis
//				ID number of the icon resource to show when the button is disabled.
//				Can be NULL.
//		[IN]	sizeDis
//				Size of the icon.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetIcon(HICON hIconIn, CSize sizeIn, HICON hIconOut, CSize sizeOut, HICON hIconDis, CSize sizeDis)
{
	// Free any loaded resource
	FreeResources();

	if (hIconIn)
	{
		// Icon when mouse over button?
		m_csIcons[0].hIcon = hIconIn;
		// Get icon dimension
		m_csIcons[0].dwWidth	= (DWORD)sizeIn.cx;
		m_csIcons[0].dwHeight	= (DWORD)sizeIn.cy;
		
		// Icon when mouse outside button?
		if (hIconOut)
		{
			m_csIcons[1].hIcon = hIconOut;
			// Get icon dimension
			m_csIcons[1].dwWidth	= (DWORD)sizeOut.cx;
			m_csIcons[1].dwHeight	= (DWORD)sizeOut.cy;
		} // if

		// Icon when button disabled?
		if (hIconDis)
		{
			m_csIcons[2].hIcon = hIconDis;
			// Get icon dimension
			m_csIcons[2].dwWidth	= (DWORD)sizeDis.cx;
			m_csIcons[2].dwHeight	= (DWORD)sizeDis.cy;
		} // if
	} // if

	Invalidate();

	return BTNST_OK;
} // End of SetIcon

// This functions sets the button to have a standard or flat style.
//
// Parameters:
//		[IN]	bFlat
//				If TRUE the button will have a flat style, else
//				will have a standard style.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetFlat(BOOL bFlat, BOOL bRepaint)
{
	m_bIsFlat = bFlat;
	if (bRepaint)	Invalidate();

	return BTNST_OK;
} // End of SetFlat

// This function sets the alignment type between icon/bitmap and text.
//
// Parameters:
//		[IN]	byAlign
//				Alignment type. Can be one of the following values:
//				ST_ALIGN_HORIZ			Icon/bitmap on the left, text on the right
//				ST_ALIGN_VERT			Icon/bitmap on the top, text on the bottom
//				ST_ALIGN_HORIZ_RIGHT	Icon/bitmap on the right, text on the left
//				By default, CButtonST buttons have ST_ALIGN_HORIZ alignment.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//		BTNST_INVALIDALIGN
//			Alignment type not supported.
//
DWORD CCeButtonST::SetAlign(BYTE byAlign, BOOL bRepaint)
{
	switch (byAlign)
	{    
		case ST_ALIGN_HORIZ:
		case ST_ALIGN_HORIZ_RIGHT:
		case ST_ALIGN_VERT:
			m_byAlign = byAlign;
			if (bRepaint)	Invalidate();
			return BTNST_OK;
			break;
	} // switch

	return BTNST_INVALIDALIGN;
} // End of SetAlign

// This function sets the state of the checkbox.
// If the button is not a checkbox, this function has no meaning.
//
// Parameters:
//		[IN]	nCheck
//				1 to check the checkbox.
//				0 to un-check the checkbox.
//		[IN]	bRepaint
//				If TRUE the control will be repainted.
//
// Return value:
//		BTNST_OK
//			Function executed successfully.
//
DWORD CCeButtonST::SetCheck(int nCheck, BOOL bRepaint)
{
	if (m_bIsCheckBox)
	{
		if (nCheck == 0) m_nCheck = 0;
		else m_nCheck = 1;

		if (bRepaint) Invalidate();
	} // if

	return BTNST_OK;
} // End of SetCheck

// This function returns the current state of the checkbox.
// If the button is not a checkbox, this function has no meaning.
//
// Return value:
//		The current state of the checkbox.
//			1 if checked.
//			0 if not checked or the button is not a checkbox.
//

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99国产精品99久久久久久| 在线观看91av| 成人ar影院免费观看视频| 国产一区二区三区视频在线播放 | 久久精品一级爱片| 国产欧美日韩在线看| 亚洲欧洲国产日本综合| 精品国产污网站| 中文字幕免费观看一区| 亚洲天堂福利av| 一区二区在线看| 亚洲中国最大av网站| 男女性色大片免费观看一区二区| 精品中文字幕一区二区| 成人av午夜电影| 一本久久精品一区二区| 91麻豆精品国产91久久久资源速度| 欧美成人乱码一区二区三区| 国产精品国产三级国产aⅴ原创| 国产精品欧美综合在线| 丝袜诱惑制服诱惑色一区在线观看 | 岛国av在线一区| 色综合天天综合给合国产| 成人精品鲁一区一区二区| 欧美日韩电影一区| 亚洲精品一区二区三区福利| 亚洲人成在线播放网站岛国| 男女性色大片免费观看一区二区 | 亚洲风情在线资源站| 捆绑变态av一区二区三区| 99免费精品在线| 久久亚洲捆绑美女| 日本亚洲电影天堂| 91黄色免费看| 亚洲日本电影在线| 国产成人av影院| 欧美精品自拍偷拍| 亚洲精品中文在线观看| 精品一区二区日韩| 欧美一卡2卡三卡4卡5免费| 亚洲精品免费一二三区| 99免费精品在线| 欧美高清在线视频| 国产xxx精品视频大全| 欧美mv和日韩mv的网站| 麻豆国产一区二区| 欧美日韩国产一区| 日韩精品中午字幕| 极品瑜伽女神91| 欧美成人午夜电影| 狠狠网亚洲精品| 日韩欧美一区二区视频| 精彩视频一区二区| 26uuu精品一区二区| 国产乱淫av一区二区三区| 久久精品免视看| 激情偷乱视频一区二区三区| 欧美久久久久久蜜桃| 青青国产91久久久久久| 精品国产一区二区三区忘忧草 | 91日韩在线专区| 国产精品一区二区你懂的| 一区在线观看视频| 中文字幕一区三区| 国产 日韩 欧美大片| 亚洲伦理在线免费看| 久久久久国产精品人| 欧美日韩一区小说| 色综合天天综合色综合av| 精品毛片乱码1区2区3区| 国产乱淫av一区二区三区| 国产日韩欧美麻豆| 在线中文字幕一区二区| 亚洲一区二区精品3399| 欧美色成人综合| 亚洲第一二三四区| 欧美tickling网站挠脚心| 国产一区二区福利| 国产欧美精品在线观看| 欧洲精品视频在线观看| 亚洲国产精品t66y| 99r国产精品| 男男成人高潮片免费网站| 精品欧美黑人一区二区三区| a美女胸又www黄视频久久| 黄网站免费久久| 亚洲综合成人在线视频| 久久嫩草精品久久久精品| 欧美高清视频一二三区| 成人网在线免费视频| 天堂影院一区二区| 欧美日韩二区三区| 99热国产精品| 成人精品免费视频| 国产伦精品一区二区三区免费迷| 亚洲欧美影音先锋| 中文久久乱码一区二区| 制服丝袜成人动漫| 欧美日韩一区二区不卡| 91日韩在线专区| av中文字幕在线不卡| 国产呦精品一区二区三区网站| 亚洲国产欧美在线人成| 久久人人爽爽爽人久久久| 久久久精品影视| 国产精品乱人伦一区二区| 国产精品乱码一区二三区小蝌蚪| 国产精品婷婷午夜在线观看| 国产欧美精品一区二区色综合 | 久久综合久久久久88| 国产精品美日韩| 国产精品入口麻豆九色| 欧美国产成人精品| 亚洲国产精品自拍| 激情偷乱视频一区二区三区| 国产成人高清在线| 国产激情视频一区二区三区欧美 | 日韩网站在线看片你懂的| 色狠狠一区二区三区香蕉| 欧美亚洲综合久久| 亚洲国产精品久久人人爱蜜臀| 午夜精品国产更新| 国产凹凸在线观看一区二区| 色悠悠久久综合| 日韩网站在线看片你懂的| 国产精品无圣光一区二区| 亚洲福中文字幕伊人影院| 日本欧美久久久久免费播放网| 国产成人啪午夜精品网站男同| 在线观看视频91| 国产偷国产偷亚洲高清人白洁| 亚洲天堂2016| 国产麻豆一精品一av一免费| 成人精品视频.| 精品毛片乱码1区2区3区| 日本一区二区不卡视频| 日本麻豆一区二区三区视频| 国产成人免费9x9x人网站视频| 91丝袜国产在线播放| 精品国产精品一区二区夜夜嗨| 国产精品久久99| 久久国产精品第一页| 在线视频综合导航| 国产亚洲一本大道中文在线| 天天av天天翘天天综合网色鬼国产 | 国内精品国产成人| 欧美日韩国产经典色站一区二区三区| 久久综合一区二区| 久久黄色级2电影| 制服丝袜亚洲精品中文字幕| 亚洲第一在线综合网站| 色天使色偷偷av一区二区| 亚洲日本乱码在线观看| 国产精品亚洲综合一区在线观看| 国产亚洲精品bt天堂精选| 国产在线一区观看| 久久久久久久久久美女| 国产乱码精品一品二品| 国产欧美一区二区在线| 成人看片黄a免费看在线| 综合分类小说区另类春色亚洲小说欧美 | 91麻豆精品国产自产在线观看一区 | 在线一区二区三区四区五区| 国产精品国产三级国产aⅴ入口| 国产一区二区福利视频| 国产精品久久久久影院亚瑟 | 国产综合色在线| 91麻豆精品国产91久久久 | 91在线国产观看| 亚洲高清在线精品| 精品1区2区在线观看| 不卡电影一区二区三区| 亚洲乱码国产乱码精品精可以看| 91天堂素人约啪| 日本不卡的三区四区五区| 久久综合九色综合欧美亚洲| www.亚洲色图| 免费精品视频最新在线| 国产精品麻豆一区二区| 欧美日韩国产天堂| 国产专区欧美精品| 亚洲黄色av一区| 国产亚洲va综合人人澡精品 | 欧美熟乱第一页| 福利电影一区二区三区| 美女看a上一区| 亚洲欧美另类在线| 久久久久久久久久久99999| 在线观看区一区二| 成人免费看黄yyy456| 亚洲成a人片在线观看中文| 26uuu国产在线精品一区二区| 欧美色手机在线观看| 成人免费视频免费观看| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲综合色成人| 亚洲欧洲av在线| 欧美国产激情二区三区 | 亚洲精品免费看| 亚洲乱码一区二区三区在线观看|