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

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

      ?? gradientprogressctrl.cpp

      ?? VC寫的文件分割器
      ?? CPP
      字號:
      /*
      Modified by 徐景周 2000.12
      功能:漸變色進度條顯示效果
      */
      
      #include "stdafx.h"
      #include "GradientProgressCtrl.h"
      
      #ifdef _DEBUG
      #define new DEBUG_NEW
      #undef THIS_FILE
      static char THIS_FILE[] = __FILE__;
      #endif
      
      /////////////////////////////////////////////////////////////////////////////
      // CGradientProgressCtrl
      
      CGradientProgressCtrl::CGradientProgressCtrl()
      {
      	// Defaults assigned by CProgressCtrl()
      	m_nLower = 0;
      	m_nUpper = 100;
      	m_nCurrentPosition = 0;
      	m_nStep = 10;	
      	
      	// Initial colors
      	m_clrStart	= COLORREF(RGB(255, 0,0));
      	m_clrEnd =	 COLORREF(RGB(0,0,255));
      	//改變漸變色進度條背景色
      	m_clrBkGround = ::GetSysColor(COLOR_3DFACE);
      	m_clrText = COLORREF(RGB(255, 255, 255));
      
      	// Initial show percent
      	m_bShowPercent = true;
      }
      
      CGradientProgressCtrl::~CGradientProgressCtrl()
      {
      }
      
      
      BEGIN_MESSAGE_MAP(CGradientProgressCtrl, CProgressCtrl)
      	//{{AFX_MSG_MAP(CGradientProgressCtrl)
      	ON_WM_PAINT()
      	ON_WM_ERASEBKGND()
      	//}}AFX_MSG_MAP
      END_MESSAGE_MAP()
      
      /////////////////////////////////////////////////////////////////////////////
      // CGradientProgressCtrl message handlers
      
      /////////////////////////////////////////////////////////////////////////////
      /* 
      	OnPaint
      
      	The main drawing routine.  Consists of two parts
      	(1) Call the DrawGradient routine to draw the visible part of the progress gradient
      	(2) If needed, show the percentage text
      
       */
      /////////////////////////////////////////////////////////////////////////////
      void CGradientProgressCtrl::OnPaint() 
      {
      	CPaintDC dc(this); // device context for painting
      
      	// TODO: Add your message handler code here
      	CRect rectClient;
      	GetClientRect(&rectClient);
      	// If the current positionis  invalid then we should fade into the  background
      	if (m_nCurrentPosition <= m_nLower || m_nCurrentPosition > m_nUpper)
      	{
      		CRect rect;
      		GetClientRect(rect);
      		CBrush brush;
      		//重畫時漸變色進度條設(shè)為自定義顏色
      		brush.CreateSolidBrush(m_clrBkGround);//::GetSysColor(COLOR_3DFACE));
      		dc.FillRect(&rect, &brush);
      		VERIFY(brush.DeleteObject());
      		return;
      	}
      	
      	// The actions to take depend on whether or not we are a vertical control
      	DWORD dwStyles = GetStyle();
      	BOOL bVertical = (BOOL)(dwStyles & PBS_VERTICAL);
      	
      	
      	// Figure out what part should be visible so we can stop the gradient when needed
      	float maxWidth;
      	if (bVertical)
      		maxWidth = ((float)m_nCurrentPosition/(float)m_nUpper * (float)rectClient.bottom);		
      	else
      		maxWidth = ((float)m_nCurrentPosition/(float)m_nUpper * (float)rectClient.right);
      	
      	
      	// Draw the gradient
      		DrawGradient(&dc, rectClient, (int)maxWidth, bVertical);
      
      	// Show percent indicator if needed
      	if (m_bShowPercent)
      	{
      		CString strPercent;
      		float fp = 100.0f; 
      		fp *= (float)(m_nCurrentPosition-m_nLower); 
      		fp /= (float)(m_nUpper-m_nLower); 
      		strPercent.Format(_T("%3.0f %%"), fp);
      		
      		dc.SetTextColor(m_clrText);
      		dc.SetBkMode(TRANSPARENT);
      		dc.DrawText(strPercent, &rectClient, DT_VCENTER |  DT_CENTER | DT_SINGLELINE);
      	}
      
      	// Do not call CProgressCtrl::OnPaint() for painting messages
      }
      
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	SetRange
      
      	Overridden base class member to remember where the indicator thinks 
      	it is and the boundary range of the control.
      
      	Params
      		nLower		lower bound
      		nUpper		uppoer bound
      
      */
      /////////////////////////////////////////////////////////////////////////////
      void CGradientProgressCtrl:: SetRange(int nLower, int nUpper)
      {
      	m_nLower = nLower;
      	m_nUpper = nUpper;
      	m_nCurrentPosition = nLower;
      	CProgressCtrl::SetRange(nLower, nUpper);
      }
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      
      	SetRange32
      
      	Overridden base class member to remember where the indicator thinks 
      	it is and the boundary range of the control.
      
      	Params
      		nLower		lower bound
      		nUpper		uppoer bound
      
      */
      /////////////////////////////////////////////////////////////////////////////
      void CGradientProgressCtrl:: SetRange32( int nLower, int nUpper )
      {
      	m_nLower = nLower;
      	m_nUpper = nUpper;
      	m_nCurrentPosition = nLower;
      	CProgressCtrl::SetRange(nLower, nUpper);
      }
      
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	SetPos
      
      	Overridden base class member to retain where the current progress indicator
      	is located.
      
      	Params
      		nPos		Current position in range
      
      */
      /////////////////////////////////////////////////////////////////////////////
      int CGradientProgressCtrl:: SetPos(int nPos)
      {
      	m_nCurrentPosition = nPos;
      	return (CProgressCtrl::SetPos(nPos));
      }
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	SetStep
      
      	Overridden base class member to retain the step interval used when 
      	filling the progress control
      
      	Params
      		nStep		step interval for filling progress control
      
      */
      /////////////////////////////////////////////////////////////////////////////
      int CGradientProgressCtrl:: SetStep(int nStep)
      {
      	m_nStep = nStep;
      	return (CProgressCtrl::SetStep(nStep));
      }
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	StepIt
      
      	Overridden base class member to increment the control according to the
      	current position and the step interval
      
      	Params
      		nStep		step interval for filling progress control
      
      */
      /////////////////////////////////////////////////////////////////////////////
      int CGradientProgressCtrl:: StepIt(void)
      {
      	m_nCurrentPosition += m_nStep;
      	return (CProgressCtrl::StepIt());
      }
      
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	DrawGradient
      
      	Called from OnPaint, it does most of the work of filling in the client 
      	rectangle with the appropriate colors.  The normal routine would fill
      	the entire client rectangle, but we truncate the drawing to reflect
      	the current position in the progress control
      
      	Params
      		pDC			pointer to CPaintDC for rendering
      		rectClient	client rectangle where we should draw
      		nMaxWidth	where we should stop drawing the gradient
      */
      /////////////////////////////////////////////////////////////////////////////
      void CGradientProgressCtrl::DrawGradient(CPaintDC *pDC, const RECT &rectClient, const int &nMaxWidth, const BOOL &bVertical)
      {
      	RECT rectFill;			   // Rectangle for filling band
      	float fStep;              // How wide is each band?
      	CBrush brush;			// Brush to fill in the bar	
      
      	
      	CMemDC1 memDC(pDC);
      
      	// First find out the largest color distance between the start and end colors.  This distance
      	// will determine how many steps we use to carve up the client region and the size of each
      	// gradient rect.
      	int r, g, b;					// First distance, then starting value
      	float rStep, gStep, bStep;		// Step size for each color
      		
      	BOOL  bSameColor = FALSE;		// Handle case if start color == end color
      
      	// Get the color differences
      	r = (GetRValue(m_clrEnd) - GetRValue(m_clrStart));
      	g = (GetGValue(m_clrEnd) - GetGValue(m_clrStart));
      	b =  (GetBValue(m_clrEnd) - GetBValue(m_clrStart));
      
      	// Check to see if colors are same
      	if((r == 0) && (g == 0) && (b == 0))
      	{
      		bSameColor = TRUE;
      		//Added the three lines below to fix the drawing 
      		//problem which used to occur when both the start 
      		//and end colors are same.
      		r = GetRValue(m_clrStart);
      		g = GetGValue(m_clrStart);
      		b = GetBValue(m_clrStart);
      	}
      
      	int nSteps;
      	//Select max. possible value for nSteps if the colors are equal
      	if(bSameColor && m_clrStart == 0)
      		nSteps = 255;
      	else 	// Make the number of steps equal to the greatest distance
      		nSteps = max(abs(r), max(abs(g), abs(b)));	
      	
      	// Determine how large each band should be in order to cover the
      	// client with nSteps bands (one for every color intensity level)
      	if (bVertical)
      		fStep = (float)rectClient.bottom / (float)nSteps;	
      	else
      		fStep = (float)rectClient.right / (float)nSteps;
      
      	// Calculate the step size for each color
      	rStep = r/(float)nSteps;
      	gStep = g/(float)nSteps;
      	bStep = b/(float)nSteps;
      
      	// Reset the colors to the starting position
      	r = GetRValue(m_clrStart);
      	g = GetGValue(m_clrStart);
      	b = GetBValue(m_clrStart);
      	
      	// Start filling bands
      	for (int iOnBand = 0; iOnBand < nSteps; iOnBand++) 
      	{
      		// Fill the vertical control
      		if (bVertical)
      		{
      			::SetRect(&rectFill,
      						0,							// Upper left X
      						(int)(iOnBand * fStep),		// Upper left Y
      						rectClient.right+1,		// Lower right X
      						(int)((iOnBand+1) * fStep));// Lower right Y
      		
      			// CDC::FillSolidRect is faster, but it does not handle 8-bit color depth
      			VERIFY(brush.CreateSolidBrush(RGB(r+rStep*iOnBand, g + gStep*iOnBand, b + bStep *iOnBand)));
      			memDC.FillRect(&rectFill,&brush);
      			VERIFY(brush.DeleteObject());
      
      
      			// If we are past the maximum for the current position we need to get out of the loop.
      			// Before we leave, we repaint the remainder of the client area with the background color.
      			if (rectFill.bottom > nMaxWidth)
      			{
      				::SetRect(&rectFill, 0, rectFill.bottom, rectClient.right, rectClient.bottom);
      				VERIFY(brush.CreateSolidBrush(m_clrBkGround));
      				memDC.FillRect(&rectFill, &brush);
      				VERIFY(brush.DeleteObject());
      				return;
      			}
      		}
      
      		else // Fill the horizontal control
      		{
      			::SetRect(&rectFill,
      						(int)(iOnBand * fStep),     // Upper left X
      						 0,							// Upper left Y
      						(int)((iOnBand+1) * fStep), // Lower right X
      						rectClient.bottom+1);		// Lower right Y
      		
      			// CDC::FillSolidRect is faster, but it does not handle 8-bit color depth
      			VERIFY(brush.CreateSolidBrush(RGB(r+rStep*iOnBand, g + gStep*iOnBand, b + bStep *iOnBand)));
      			memDC.FillRect(&rectFill,&brush);
      			VERIFY(brush.DeleteObject());
      
      
      			// If we are past the maximum for the current position we need to get out of the loop.
      			// Before we leave, we repaint the remainder of the client area with the background color.
      			if (rectFill.right > nMaxWidth)
      			{
      				::SetRect(&rectFill, rectFill.right, 0, rectClient.right, rectClient.bottom);
      				VERIFY(brush.CreateSolidBrush(m_clrBkGround));
      				memDC.FillRect(&rectFill, &brush);
      				VERIFY(brush.DeleteObject());
      				return;
      			}
      		}
      
      	}
      }
      
      
      
      /////////////////////////////////////////////////////////////////////////////
      /*
      	OnEraseBkgnd
      
      	Overridden CWnd function so that all drawing is done in the OnPaint call.
      	We return TRUE so that CWnd doesn't try to erase our background.
      
      	Params
      		pDC			pointer to CDC for rendering
      */
      /////////////////////////////////////////////////////////////////////////////
      BOOL CGradientProgressCtrl::OnEraseBkgnd(CDC* pDC) 
      {
      	// TODO: Add your message handler code here and/or call default
      	return TRUE;
      }
      
      

      ?? 快捷鍵說明

      復(fù)制代碼 Ctrl + C
      搜索代碼 Ctrl + F
      全屏模式 F11
      切換主題 Ctrl + Shift + D
      顯示快捷鍵 ?
      增大字號 Ctrl + =
      減小字號 Ctrl + -
      亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
      国产欧美日韩在线| 91色porny| 精品久久久久久久人人人人传媒 | 九色综合国产一区二区三区| 日韩午夜电影在线观看| 久久99久久99精品免视看婷婷| 久久蜜桃香蕉精品一区二区三区| 成人精品视频.| 亚洲精品国产a| 日韩一区二区三| 丁香婷婷综合色啪| 亚洲综合清纯丝袜自拍| 91精品国产综合久久精品| 国产综合久久久久久鬼色| 国产精品福利电影一区二区三区四区| 91丨porny丨国产| 日韩黄色小视频| 国产午夜精品福利| 欧美色图天堂网| 九一九一国产精品| 亚洲人成电影网站色mp4| 91精品国产综合久久香蕉麻豆| 国产福利精品一区| 亚洲综合免费观看高清完整版在线 | 秋霞电影网一区二区| 久久久国产一区二区三区四区小说 | 91免费版在线看| 水蜜桃久久夜色精品一区的特点 | 国产精品久久久久久亚洲毛片| 欧美影院一区二区| 国产酒店精品激情| 亚洲成a人片在线观看中文| 国产亚洲精品中文字幕| 欧美色窝79yyyycom| 国产不卡一区视频| 午夜a成v人精品| 国产精品久久久久久一区二区三区 | 91视频免费看| 男女性色大片免费观看一区二区 | 国产高清精品在线| 亚洲国产精品久久人人爱| 久久综合色8888| 欧美精品亚洲一区二区在线播放| 国产一区二区福利| 蜜臀久久久久久久| 一区二区欧美国产| 欧美国产日韩在线观看| 日韩三级高清在线| 欧美日韩免费电影| 91色乱码一区二区三区| 成人一区二区三区中文字幕| 久久爱另类一区二区小说| 亚洲成人资源网| 亚洲精品少妇30p| 国产精品女上位| 久久综合久久鬼色中文字| 91精品国产91久久久久久一区二区 | 国产精品福利电影一区二区三区四区| 欧美一区二区高清| 欧美视频在线一区| 日本高清不卡视频| 色婷婷av一区| 色婷婷综合激情| 色综合久久综合网| 波多野结衣欧美| 成人精品免费视频| 成人午夜伦理影院| 成人h版在线观看| 成人sese在线| 99精品久久只有精品| 99在线热播精品免费| av激情成人网| 91在线视频18| 99热国产精品| 色综合网色综合| 色就色 综合激情| 欧美日韩在线电影| 在线不卡一区二区| 日韩一本二本av| 精品美女在线播放| 久久久久久夜精品精品免费| 久久久久久**毛片大全| 欧美激情自拍偷拍| 日韩一区中文字幕| 亚洲午夜电影网| 视频在线在亚洲| 久久精品国产精品青草| 激情丁香综合五月| www.亚洲在线| 在线视频你懂得一区| 欧美美女黄视频| 久久综合久久鬼色| 国产精品成人免费精品自在线观看| 中文字幕一区二区三| 亚洲国产一二三| 美女脱光内衣内裤视频久久影院| 国产一区二区三区国产| 成人99免费视频| 欧美色国产精品| 日韩欧美国产一区二区在线播放| 国产午夜三级一区二区三| 国产精品久久午夜夜伦鲁鲁| 亚洲精品国产高清久久伦理二区| 日本中文在线一区| 国产sm精品调教视频网站| 色呦呦国产精品| 欧美二区三区的天堂| 国产亚洲自拍一区| 一区二区成人在线| 一区二区三区在线看| 精品亚洲成av人在线观看| 不卡一二三区首页| 7777精品伊人久久久大香线蕉经典版下载 | 亚洲蜜臀av乱码久久精品| 全国精品久久少妇| 成人小视频免费观看| 7777精品伊人久久久大香线蕉的 | 日日夜夜精品视频免费| 国产精品亚洲人在线观看| 欧美自拍偷拍一区| 久久久久国色av免费看影院| 亚洲国产欧美另类丝袜| 国产一区二区三区蝌蚪| 欧美性受xxxx| 国产精品视频第一区| 免费成人结看片| 在线看一区二区| 国产人伦精品一区二区| 视频一区视频二区中文| 99久久99久久精品国产片果冻| 日韩你懂的电影在线观看| 亚洲综合免费观看高清在线观看| 国产成人午夜电影网| 日韩三级精品电影久久久| 亚洲一区av在线| www.av精品| 国产日韩欧美精品电影三级在线| 日韩成人精品视频| 色老汉一区二区三区| 国产精品嫩草99a| 国产一区二区三区黄视频 | 天堂av在线一区| 99久久精品99国产精品| 精品国产第一区二区三区观看体验 | 欧美电影免费观看高清完整版在| 亚洲色图清纯唯美| 国产精品996| 欧美精品一区二区精品网| 日韩黄色一级片| 欧美日韩国产在线观看| 亚洲国产综合人成综合网站| 99久久婷婷国产综合精品| 国产亚洲污的网站| 国产一区二区三区精品视频| 精品久久久久香蕉网| 麻豆久久一区二区| 日韩美女视频在线| 免费成人深夜小野草| 欧美日韩国产天堂| 亚洲电影第三页| 欧美日韩在线播放一区| 亚洲二区在线视频| 欧美日韩精品专区| 天天做天天摸天天爽国产一区| 欧美亚洲国产怡红院影院| 亚洲美女屁股眼交| 91国偷自产一区二区使用方法| 最新国产成人在线观看| 91在线免费视频观看| 亚洲同性同志一二三专区| 成年人午夜久久久| 亚洲精品高清在线| 欧美性三三影院| 午夜av一区二区三区| 91精品欧美一区二区三区综合在 | 国产精品欧美一区喷水| 成人爽a毛片一区二区免费| 中文字幕不卡在线| 白白色 亚洲乱淫| 亚洲欧洲中文日韩久久av乱码| 91成人免费网站| 日本欧美一区二区三区乱码| 精品日韩一区二区| 国产老妇另类xxxxx| 一区在线播放视频| 欧美日韩国产在线播放网站| 美女性感视频久久| 国产亚洲成aⅴ人片在线观看| av在线播放一区二区三区| 亚洲精品综合在线| 欧美一区日韩一区| 国产成人精品亚洲日本在线桃色 | 欧美xxxx在线观看| 处破女av一区二区| 亚洲线精品一区二区三区八戒| 日韩三级在线观看| 成人精品免费视频| 三级亚洲高清视频| 中文字幕 久热精品 视频在线 | 99精品在线观看视频|