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

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

?? btnst.cpp

?? 經過測試確實可行
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
    }
    else
    {
      // Disegno i bordi a sinistra e in alto
      // White line
      pOldPen = pDC->SelectObject(&penBtnHiLight);
      pDC->MoveTo(itemRect.left, itemRect.bottom-1);
      pDC->LineTo(itemRect.left, itemRect.top);
      pDC->LineTo(itemRect.right, itemRect.top);
      // Light gray line
      pDC->SelectObject(pen3DLight);
      pDC->MoveTo(itemRect.left+1, itemRect.bottom-1);
      pDC->LineTo(itemRect.left+1, itemRect.top+1);
      pDC->LineTo(itemRect.right, itemRect.top+1);
      // Disegno i bordi a destra e in basso
      // Black line
      pDC->SelectObject(pen3DDKShadow);
      pDC->MoveTo(itemRect.left, itemRect.bottom-1);
      pDC->LineTo(itemRect.right-1, itemRect.bottom-1);
      pDC->LineTo(itemRect.right-1, itemRect.top-1);
      // Dark gray line
      pDC->SelectObject(penBtnShadow);
      pDC->MoveTo(itemRect.left+1, itemRect.bottom-2);
      pDC->LineTo(itemRect.right-2, itemRect.bottom-2);
      pDC->LineTo(itemRect.right-2, itemRect.top);
      //
      pDC->SelectObject(pOldPen);
    }
  }

  // Read the button's title
  CString sTitle;
  GetWindowText(sTitle);

  // If we don't want the title displayed
  if (m_bShowText == FALSE) sTitle.Empty();

  CRect captionRect = lpDIS->rcItem;

  // Draw the icon
  if (m_hIconIn != NULL)
  {
    DrawTheIcon(pDC, &sTitle, &lpDIS->rcItem, &captionRect, bIsPressed, bIsDisabled);
  }

  // Write the button title (if any)
  if (sTitle.IsEmpty() == FALSE)
  {
    // Disegno la caption del bottone
    // Se il bottone e' premuto muovo la captionRect di conseguenza
    if (bIsPressed)
      captionRect.OffsetRect(1, 1);
    
    // ONLY FOR DEBUG 
    // Evidenzia il rettangolo in cui verra' centrata la caption 
    //CBrush brBtnShadow(RGB(255, 0, 0));
    //pDC->FrameRect(&captionRect, &brBtnShadow);

#ifdef ST_USE_MEMDC
	// Get dialog's font
    CFont *pCurrentFont = GetFont(); 
    CFont *pOldFont = pDC->SelectObject(pCurrentFont);
#endif
    if ((m_MouseOnButton == TRUE) || (bIsPressed)) 
	{
      pDC->SetTextColor(GetActiveFgColor());
      pDC->SetBkColor(GetActiveBgColor());
    } 
	else 
	{
      pDC->SetTextColor(GetInactiveFgColor());
      pDC->SetBkColor(GetInactiveBgColor());
    }
    // Center text
    CRect centerRect = captionRect;
    pDC->DrawText(sTitle, -1, captionRect, DT_SINGLELINE|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(), (LPCTSTR)sTitle, (bIsDisabled ? DSS_DISABLED : DSS_NORMAL), 
                   TRUE, 0, (CBrush*)NULL);
#ifdef ST_USE_MEMDC
    pDC->SelectObject(pOldFont);
#endif
  }

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


void CButtonST::DrawTheIcon(CDC* pDC, CString* title, RECT* rcItem, CRect* captionRect, BOOL IsPressed, BOOL IsDisabled)
{
  CRect iconRect = rcItem;

  switch (m_nAlign)
  {
    case ST_ALIGN_HORIZ:
         if (title->IsEmpty())
         {
           // Center the icon horizontally
           iconRect.left += ((iconRect.Width() - m_cxIcon)/2);
         }
         else
         {
           // L'icona deve vedersi subito dentro il focus rect
           iconRect.left += 3;  
           captionRect->left += m_cxIcon + 3;
         }
         // Center the icon vertically
         iconRect.top += ((iconRect.Height() - m_cyIcon)/2);
         break;
    case ST_ALIGN_VERT:
         // Center the icon horizontally
         iconRect.left += ((iconRect.Width() - m_cxIcon)/2);
         if (title->IsEmpty())
         {
           // Center the icon vertically
           iconRect.top += ((iconRect.Height() - m_cyIcon)/2);           
         }
         else
         {
           captionRect->top += m_cyIcon;
         }
         break;
  }
    
  // If button is pressed then press the icon also
  if (IsPressed) iconRect.OffsetRect(1, 1);
  // Ole'!
  pDC->DrawState(iconRect.TopLeft(), 
	               iconRect.Size(), 
				         (m_MouseOnButton == TRUE || IsPressed) ? m_hIconIn : m_hIconOut, 
				         (IsDisabled ? DSS_DISABLED : DSS_NORMAL), 
                 (CBrush*)NULL);
} // End of DrawTheIcon


void CButtonST::PreSubclassWindow() 
{
	UINT nBS;

	nBS = GetButtonStyle();

	// Check if this is the default button
	if (nBS & BS_DEFPUSHBUTTON) m_bIsDefault = TRUE;

	// Add BS_OWNERDRAW style
	SetButtonStyle(nBS | BS_OWNERDRAW);

	CButton::PreSubclassWindow();
} // End of PreSubclassWindow


BOOL CButtonST::PreTranslateMessage(MSG* pMsg) 
{
	InitToolTip();
	m_ToolTip.RelayEvent(pMsg);
	
	return CButton::PreTranslateMessage(pMsg);
} // End of PreTranslateMessage


LRESULT CButtonST::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) 
{
	if (message == WM_LBUTTONDBLCLK)
	{
		message = WM_LBUTTONDOWN;
	}
	return CButton::DefWindowProc(message, wParam, lParam);
} // End of DefWindowProc


void CButtonST::SetDefaultInactiveBgColor(BOOL bRepaint)
{
	m_crInactiveBg = ::GetSysColor(COLOR_BTNFACE); 
	if (bRepaint == TRUE) Invalidate();
} // End of SetDefaultInactiveBgColor


void CButtonST::SetInactiveBgColor(COLORREF crNew, BOOL bRepaint)
{
	m_crInactiveBg = crNew; 
	if (bRepaint == TRUE) Invalidate();
} // End of SetInactiveBgColor


const COLORREF CButtonST::GetInactiveBgColor()
{
	return m_crInactiveBg;
} // End of GetInactiveBgColor


void CButtonST::SetDefaultInactiveFgColor(BOOL bRepaint)
{
	m_crInactiveFg = ::GetSysColor(COLOR_BTNTEXT); 
	if (bRepaint == TRUE) Invalidate();
} // End of SetDefaultInactiveFgColor


void CButtonST::SetInactiveFgColor(COLORREF crNew, BOOL bRepaint)
{
	m_crInactiveFg = crNew; 
	if (bRepaint == TRUE) Invalidate();
} // End of SetInactiveFgColor


const COLORREF CButtonST::GetInactiveFgColor()
{
	return m_crInactiveFg;
} // End of GetInactiveFgColor


void CButtonST::SetDefaultActiveBgColor(BOOL bRepaint)
{
	m_crActiveBg = ::GetSysColor(COLOR_BTNFACE); 
	if (bRepaint == TRUE) Invalidate();
} // End of SetDefaultActiveBgColor


void CButtonST::SetActiveBgColor(COLORREF crNew, BOOL bRepaint)
{
	m_crActiveBg = crNew; 
	if (bRepaint == TRUE) Invalidate();
} // End of SetActiveBgColor


const COLORREF CButtonST::GetActiveBgColor()
{
	return m_crActiveBg;
} // End of GetActiveBgColor


void CButtonST::SetDefaultActiveFgColor(BOOL bRepaint)
{
	m_crActiveFg = ::GetSysColor(COLOR_BTNTEXT); 
	if (bRepaint == TRUE) Invalidate();
} // End of SetDefaultActiveFgColor


void CButtonST::SetActiveFgColor(COLORREF crNew, BOOL bRepaint)
{
	m_crActiveFg = crNew; 
	if (bRepaint == TRUE) Invalidate();
} // End of SetActiveFgColor


const COLORREF CButtonST::GetActiveFgColor()
{
	return m_crActiveFg;
} // End of GetActiveFgColor


void CButtonST::SetFlatFocus(BOOL bDrawFlatFocus, BOOL bRepaint)
{
	m_bDrawFlatFocus = bDrawFlatFocus;
	
	// Repaint the button
	if (bRepaint == TRUE) Invalidate();
} // End of SetFlatFocus


BOOL CButtonST::GetFlatFocus()
{
	return m_bDrawFlatFocus;
} // End of GetFlatFocus


BOOL CButtonST::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) 
{
	// If a cursor was specified then use it!
	if (m_hCursor != NULL)
	{
		::SetCursor(m_hCursor);
		return TRUE;
	}

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


void CButtonST::SetTooltipText(CString* spText, BOOL bActivate)
{
	// We cannot accept NULL pointer
	if (spText == 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, (LPCTSTR)*spText, rectBtn, 1);
	}

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


void CButtonST::SetTooltipText(int nId, BOOL bActivate)
{
	CString sText;

	// load string resource
	sText.LoadString(nId);
	// If string resource is not empty
	if (sText.IsEmpty() == FALSE) SetTooltipText(&sText, bActivate);
} // End of SetTooltipText


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


BOOL CButtonST::GetDefault()
{
	return m_bIsDefault;
} // End of GetDefault


void CButtonST::DrawTransparent()
{
	m_bDrawTransparent = TRUE;
} // End of DrawTransparent


void CButtonST::InitToolTip()
{
	if (m_ToolTip.m_hWnd == NULL)
	{
		// Create ToolTip control
		m_ToolTip.Create(this);
		// Create inactive
		m_ToolTip.Activate(FALSE);
	}
} // End of InitToolTip


void CButtonST::PaintBk(CDC * pDC)
{
	CClientDC clDC(GetParent());
	CRect rect;
	CRect rect1;

	GetClientRect(rect);

	GetWindowRect(rect1);
	GetParent()->ScreenToClient(rect1);

	if (m_dcBk.m_hDC == NULL)
	{
		m_dcBk.CreateCompatibleDC(&clDC);
		m_bmpBk.CreateCompatibleBitmap(&clDC, rect.Width(), rect.Height());
		m_pbmpOldBk = m_dcBk.SelectObject(&m_bmpBk);
		m_dcBk.BitBlt(0, 0, rect.Width(), rect.Height(), &clDC, rect1.left, rect1.top, SRCCOPY);
	}

	pDC->BitBlt(0, 0, rect.Width(), rect.Height(), &m_dcBk, 0, 0, SRCCOPY);
} // End of PaintBk


#undef ST_USE_MEMDC
#undef ST_LIKEIE

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品免费在线播放| 风间由美一区二区三区在线观看| 久久久久久久久久久99999| 国产欧美视频一区二区| 男女性色大片免费观看一区二区| 国产精品情趣视频| 国产精品九色蝌蚪自拍| 国产精品欧美经典| 亚洲丶国产丶欧美一区二区三区| 天天综合日日夜夜精品| 久久精品国产精品亚洲精品 | 日韩理论片一区二区| 亚洲天堂免费看| 婷婷成人激情在线网| 国产高清不卡二三区| 欧美日韩日本视频| 精品国产髙清在线看国产毛片| 亚洲精品一区二区三区福利| 亚洲视频香蕉人妖| 国产又粗又猛又爽又黄91精品| 成人av电影在线观看| 欧美一级淫片007| 最近日韩中文字幕| 国产成人午夜视频| 日韩欧美中文一区二区| 国产欧美日韩另类一区| 日本aⅴ精品一区二区三区| 国产69精品久久久久777| 日韩亚洲欧美综合| 亚洲高清在线精品| 色综合一个色综合| 国产精品伦一区二区三级视频| 久久电影网站中文字幕| 欧美精品丝袜中出| 亚洲国产视频一区| 91精品免费在线观看| 精品国产亚洲在线| 亚洲电影你懂得| 7777女厕盗摄久久久| 欧美激情一区二区三区| 国产福利一区在线| 国产日韩欧美一区二区三区综合| 午夜视频在线观看一区二区三区| 成人av在线一区二区三区| 久久久99久久精品欧美| 91一区二区在线| 国产精品国产三级国产aⅴ原创| 国产精品一二三区| 亚洲国产高清aⅴ视频| 福利视频网站一区二区三区| 国产精品欧美一区喷水| 在线视频国内自拍亚洲视频| 亚洲一区二区三区在线| 日韩欧美高清dvd碟片| 国产一区二区91| 一区精品在线播放| 欧美日韩一区精品| 国产精品系列在线播放| 亚洲欧洲日韩av| 欧美一区2区视频在线观看| 国产91清纯白嫩初高中在线观看 | 亚洲免费在线看| 欧美高清精品3d| 欧美精品久久天天躁| 国产成人在线视频网址| 欧美一区二区视频网站| 国产99精品国产| 丝袜美腿亚洲综合| 国产精品久久久久久久浪潮网站| 日韩欧美一区二区三区在线| 久久国产精品免费| 一区二区高清视频在线观看| 久久―日本道色综合久久| 欧美日韩亚洲综合一区 | 91精品久久久久久久91蜜桃| 成人一区二区在线观看| 韩国一区二区视频| 欧美a级理论片| 婷婷亚洲久悠悠色悠在线播放 | 九九九精品视频| 久久er精品视频| 免费在线观看成人| 日韩1区2区3区| 免费看精品久久片| 免费xxxx性欧美18vr| 免费视频一区二区| 精品一区二区三区影院在线午夜 | 日韩三级视频在线看| 亚洲午夜免费视频| 国产精品久久久久久久第一福利| 国产人妖乱国产精品人妖| 久久综合狠狠综合久久激情| 久久精品欧美日韩| 最新国产精品久久精品| 亚洲最新视频在线播放| 亚洲成a人片综合在线| 天天色 色综合| 日韩不卡免费视频| 粉嫩高潮美女一区二区三区| 成人精品视频一区| 欧美日韩电影在线| 久久精品在线免费观看| 亚洲毛片av在线| 蜜臀99久久精品久久久久久软件| 岛国精品在线观看| 欧美性色黄大片| 中文字幕第一区第二区| 亚洲一区二区三区自拍| 激情图片小说一区| 色婷婷综合激情| 欧美一级电影网站| 国产精品久久久久久久岛一牛影视| 免费成人深夜小野草| 国产成人av网站| xnxx国产精品| 日韩高清在线不卡| 亚洲自拍偷拍网站| 香蕉成人啪国产精品视频综合网 | 国产91精品精华液一区二区三区 | 青青青伊人色综合久久| 不卡欧美aaaaa| 日本一区二区三区国色天香 | 欧美精品 国产精品| 1000精品久久久久久久久| 国产高清不卡一区二区| 欧美成人精精品一区二区频| 亚洲国产一区视频| av一区二区三区在线| 中文字幕亚洲在| 欧美日韩你懂的| 亚洲精品免费电影| 91免费观看视频| 一区二区三区国产豹纹内裤在线| 91老师片黄在线观看| 国产精品欧美一区二区三区| a级精品国产片在线观看| 中文字幕欧美一| 欧美亚洲禁片免费| 丝袜美腿一区二区三区| 欧美大尺度电影在线| 国产美女精品一区二区三区| 久久久不卡网国产精品一区| 国产电影一区在线| 有码一区二区三区| 9191久久久久久久久久久| 蜜臀av一区二区| 中文字幕第一区综合| 欧美日韩国产一级片| 国产一区二区看久久| 亚洲精品第一国产综合野| 538在线一区二区精品国产| 国产精品一二三| 亚洲成人在线免费| 中文字幕日韩欧美一区二区三区| 欧美日韩中文字幕精品| 日本道免费精品一区二区三区| 亚洲精品日日夜夜| 国产午夜精品一区二区三区嫩草| 不卡区在线中文字幕| 九一九一国产精品| 午夜电影一区二区| 亚洲欧洲精品一区二区精品久久久| 欧美精品久久99| 一本大道av一区二区在线播放| 狠狠色伊人亚洲综合成人| 亚洲少妇中出一区| 国产精品电影一区二区| 国产亚洲精品aa| 久久久久久久久97黄色工厂| 日韩欧美一二区| 777久久久精品| 欧美日韩一二三区| 欧美精品自拍偷拍动漫精品| 在线亚洲高清视频| 在线观看日产精品| 91成人国产精品| 在线影视一区二区三区| 色偷偷成人一区二区三区91| 风流少妇一区二区| 91麻豆视频网站| 欧美狂野另类xxxxoooo| 欧美一区二区三区爱爱| 欧美一级精品大片| 久久这里只有精品6| 亚洲素人一区二区| 亚洲综合区在线| 香蕉久久一区二区不卡无毒影院| 日本不卡的三区四区五区| 精品在线免费视频| 91亚洲精品久久久蜜桃| 欧美日韩另类国产亚洲欧美一级| 欧美日本国产一区| 久久久久久99精品| 最新国产精品久久精品| 天堂久久久久va久久久久| 狠狠色综合色综合网络| 色av综合在线| 亚洲精品在线一区二区| 一区二区三区免费观看| 久久99精品久久久久久|