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

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

?? scroll.c

?? 功能強(qiáng)大的自制滾動(dòng)條
?? C
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):

	case HTSCROLL_THUMB: 

		//if the scrollbar is disabled, then do no further processing
		if(!IsScrollbarActive(sb))
			return 0;
		
		GetRealScrollRect(sb, &rect);
		RotateRect0(sb, &rect);
		CalcThumbSize(sb, &rect, &nThumbSize, &nThumbPos);
		RotateRect0(sb, &rect);
		
		//remember the bounding rectangle of the scrollbar work area
		rcThumbBounds = rect;
		
		sw->fThumbTracking = TRUE;
		sb->scrollInfo.nTrackPos = sb->scrollInfo.nPos;
		
		if(wParam == HTVSCROLL) 
			nThumbMouseOffset = pt.y - nThumbPos;
		else
			nThumbMouseOffset = pt.x - nThumbPos;

		nLastPos = -sb->scrollInfo.nPos;
		nThumbPos0 = nThumbPos;
	
		//if(sb->fFlatScrollbar)
		//{
			GetWindowRect(hwnd, &winrect);
			OffsetRect(&rect, -winrect.left, -winrect.top);
			hdc = GetWindowDC(hwnd);
			NCDrawScrollbar(sb, hwnd, hdc, &rect, HTSCROLL_THUMB);
			ReleaseDC(hwnd, hdc);
		//}

		break;

		//Any part of the scrollbar
	case HTSCROLL_LEFT:  
		if(sb->fScrollFlags & ESB_DISABLE_LEFT)		return 0;
		else										goto target1;
	
	case HTSCROLL_RIGHT: 
		if(sb->fScrollFlags & ESB_DISABLE_RIGHT)	return 0;
		else										goto target1;

		goto target1;	

	case HTSCROLL_PAGELEFT:  case HTSCROLL_PAGERIGHT:

		target1:

		//if the scrollbar is disabled, then do no further processing
		if(!IsScrollbarActive(sb))
			break;

		//ajust the horizontal rectangle to NOT include
		//any inserted buttons
		GetRealScrollRect(sb, &rect);

		SendScrollMessage(hwnd, uScrollTimerMsg, uCurrentScrollPortion, 0);

		// Check what area the mouse is now over :
		// If the scroll thumb has moved under the mouse in response to 
		// a call to SetScrollPos etc, then we don't hilight the scrollbar margin
		if(uCurrentScrollbar == SB_HORZ)
			uScrollTimerPortion = GetHorzScrollPortion(sb, hwnd, &rect, pt.x, pt.y);
		else
			uScrollTimerPortion = GetVertScrollPortion(sb, hwnd, &rect, pt.x, pt.y);

		GetWindowRect(hwnd, &winrect);
		OffsetRect(&rect, -winrect.left, -winrect.top);
		hdc = GetWindowDC(hwnd);
			
#ifndef HOT_TRACKING
		//if we aren't hot-tracking, then don't highlight 
		//the scrollbar thumb unless we click on it
		if(uScrollTimerPortion == HTSCROLL_THUMB)
			uScrollTimerPortion = HTSCROLL_NONE;
#endif
		NCDrawScrollbar(sb, hwnd, hdc, &rect, uScrollTimerPortion);
		ReleaseDC(hwnd, hdc);

		//Post the scroll message!!!!
		uScrollTimerPortion = uCurrentScrollPortion;

		//set a timer going on the first click.
		//if this one expires, then we can start off a more regular timer
		//to generate the auto-scroll behaviour
		uScrollTimerId = SetTimer(hwnd, COOLSB_TIMERID1, COOLSB_TIMERINTERVAL1, 0);
		break;
	default:
		return CallWindowProc(sw->oldproc, hwnd, WM_NCLBUTTONDOWN, wParam, lParam);
		//return 0;
	}
		
	SetCapture(hwnd);
	return 0;
}

//
//	Left button released
//
static LRESULT LButtonUp(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
{
	RECT rect;
	//UINT thisportion;
	HDC hdc;
	POINT pt;
	RECT winrect;
	UINT buttonIdx = 0;
	
	//current scrollportion is the button that we clicked down on
	if(uCurrentScrollPortion != HTSCROLL_NONE)
	{
		SCROLLBAR *sb = &sw->sbarHorz;
		lParam = GetMessagePos();
		ReleaseCapture();

		GetWindowRect(hwnd, &winrect);
		pt.x = LOWORD(lParam);
		pt.y = HIWORD(lParam);

		//emulate the mouse input on a scrollbar here...
		if(uCurrentScrollbar == SB_HORZ)
		{
			//get the total area of the normal Horz scrollbar area
			sb = &sw->sbarHorz;
			GetHScrollRect(sw, hwnd, &rect);
		}
		else if(uCurrentScrollbar == SB_VERT)
		{
			//get the total area of the normal Horz scrollbar area
			sb = &sw->sbarVert;
			GetVScrollRect(sw, hwnd, &rect);
		}

		//we need to do different things depending on if the
		//user is activating the scrollbar itself, or one of
		//the inserted buttons
		switch(uCurrentScrollPortion)
		{
#ifdef INCLUDE_BUTTONS
		//inserted buttons are being clicked
		case HTSCROLL_INSERTED:
			
			//get the rectangle of the ACTIVE button 
			buttonIdx = GetButtonFromPt(sb, &rect, pt, FALSE);
			GetButtonRectFromId(sb, &rect, uCurrentButton);
	
			OffsetRect(&rect, -winrect.left, -winrect.top);

			//Send the notification BEFORE we redraw, so the
			//bitmap can be changed smoothly by the user if they require
			if(uCurrentButton == buttonIdx)
			{
				SCROLLBUT *sbut = &sb->sbButtons[buttonIdx];
				UINT cmdid = sbut->uCmdId;
				
				if((sbut->uButType & SBBT_MASK) == SBBT_TOGGLEBUTTON)
					sbut->uState ^= 1;

				//send a notify??				
				//only post a message if the command id is valid
				if(cmdid != -1 && cmdid > 0)
					SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(cmdid, CSBN_CLICKED), 0);
			
				//user might have deleted this button, so redraw whole area
				NCPaint(sw, hwnd, 1, 0);
			}
			else
			{
				//otherwise, just redraw the button in its new state
				hdc = GetWindowDC(hwnd);
				DrawScrollButton(&sb->sbButtons[uCurrentButton], hdc, &rect, SBBS_NORMAL);
				ReleaseDC(hwnd, hdc);
			}
	
			break;
#endif	// INCLUDE_BUTTONS

		//The scrollbar is active
		case HTSCROLL_LEFT:  case HTSCROLL_RIGHT: 
		case HTSCROLL_PAGELEFT:  case HTSCROLL_PAGERIGHT: 
		case HTSCROLL_NONE:
			
			KillTimer(hwnd, uScrollTimerId);

		case HTSCROLL_THUMB: 
	
			//In case we were thumb tracking, make sure we stop NOW
			if(sw->fThumbTracking == TRUE)
			{
				SendScrollMessage(hwnd, uScrollTimerMsg, SB_THUMBPOSITION, nLastPos);
				sw->fThumbTracking = FALSE;
			}

			//send the SB_ENDSCROLL message now that scrolling has finished
			SendScrollMessage(hwnd, uScrollTimerMsg, SB_ENDSCROLL, 0);

			//adjust the total scroll area to become where the scrollbar
			//really is (take into account the inserted buttons)
			GetRealScrollRect(sb, &rect);
			OffsetRect(&rect, -winrect.left, -winrect.top);
			hdc = GetWindowDC(hwnd);
			
			//draw whichever scrollbar sb is
			NCDrawScrollbar(sb, hwnd, hdc, &rect, HTSCROLL_NORMAL);

			ReleaseDC(hwnd, hdc);
			break;
		}

		//reset our state to default
		uCurrentScrollPortion = HTSCROLL_NONE;
		uScrollTimerPortion	  = HTSCROLL_NONE;
		uScrollTimerId		  = 0;

		uScrollTimerMsg       = 0;
		uCurrentScrollbar     = COOLSB_NONE;

		return 0;
	}
	else
	{
		/*
		// Can't remember why I did this!
		if(GetCapture() == hwnd)
		{
			ReleaseCapture();
		}*/
	}

	return CallWindowProc(sw->oldproc, hwnd, WM_LBUTTONUP, wParam, lParam);
}

//
//	This function is called whenever the mouse is moved and 
//  we are dragging the scrollbar thumb about.
//
static LRESULT ThumbTrackHorz(SCROLLBAR *sbar, HWND hwnd, int x, int y)
{
	POINT pt;
	RECT rc, winrect, rc2;
	COLORREF crCheck1 = GetSBForeColor();
	COLORREF crCheck2 = GetSBBackColor();
	HDC hdc;
	int thumbpos = nThumbPos;
	int pos;
	int siMaxMin = 0;
	UINT flatflag = sbar->fFlatScrollbar ? BF_FLAT : 0;
	BOOL fCustomDraw = FALSE;

	SCROLLINFO *si;
	si = &sbar->scrollInfo;

	pt.x = x;
	pt.y = y;

	//draw the thumb at whatever position
	rc = rcThumbBounds;

	SetRect(&rc2, rc.left -  THUMBTRACK_SNAPDIST*2, rc.top -    THUMBTRACK_SNAPDIST, 
				  rc.right + THUMBTRACK_SNAPDIST*2, rc.bottom + THUMBTRACK_SNAPDIST);

	rc.left +=  GetScrollMetric(sbar, SM_CXHORZSB);
	rc.right -= GetScrollMetric(sbar, SM_CXHORZSB);

	//if the mouse is not in a suitable distance of the scrollbar,
	//then "snap" the thumb back to its initial position
#ifdef SNAP_THUMB_BACK
	if(!PtInRect(&rc2, pt))
	{
		thumbpos = nThumbPos0;
	}
	//otherwise, move the thumb to where the mouse is
	else
#endif //SNAP_THUMB_BACK
	{
		//keep the thumb within the scrollbar limits
		thumbpos = pt.x - nThumbMouseOffset;
		if(thumbpos < rc.left) thumbpos = rc.left;
		if(thumbpos > rc.right - nThumbSize) thumbpos = rc.right - nThumbSize;
	}

	GetWindowRect(hwnd, &winrect);

	if(sbar->nBarType == SB_VERT)
		RotateRect(&winrect);
	
	hdc = GetWindowDC(hwnd);
		
#ifdef CUSTOM_DRAW
	fCustomDraw = PostCustomPrePostPaint(hwnd, hdc, sbar, CDDS_PREPAINT) == CDRF_SKIPDEFAULT;
#endif

	OffsetRect(&rc, -winrect.left, -winrect.top);
	thumbpos -= winrect.left;

	//draw the margin before the thumb
	SetRect(&rc2, rc.left, rc.top, thumbpos, rc.bottom);
	RotateRect0(sbar, &rc2);

	if(fCustomDraw)
		PostCustomDrawNotify(hwnd, hdc, sbar->nBarType, &rc2, SB_PAGELEFT, 0, 0, 0);
	else
		DrawCheckedRect(hdc, &rc2, crCheck1, crCheck2);
	
	RotateRect0(sbar, &rc2);

	//draw the margin after the thumb 
	SetRect(&rc2, thumbpos+nThumbSize, rc.top, rc.right, rc.bottom);
	
	RotateRect0(sbar, &rc2);
	
	if(fCustomDraw)
		PostCustomDrawNotify(hwnd, hdc, sbar->nBarType, &rc2, SB_PAGERIGHT, 0, 0, 0);
	else
		DrawCheckedRect(hdc, &rc2, crCheck1, crCheck2);
	
	RotateRect0(sbar, &rc2);
	
	//finally draw the thumb itelf. This is how it looks on win2000, anyway
	SetRect(&rc2, thumbpos, rc.top, thumbpos+nThumbSize, rc.bottom);
	
	RotateRect0(sbar, &rc2);

	if(fCustomDraw)
		PostCustomDrawNotify(hwnd, hdc, sbar->nBarType, &rc2, SB_THUMBTRACK, TRUE, TRUE, FALSE);
	else
	{

#ifdef FLAT_SCROLLBARS	
		if(sbar->fFlatScrollbar)
			PaintRect(hdc, &rc2, GetSysColor(COLOR_3DSHADOW));
		else
#endif
		{
				DrawBlankButton(hdc, &rc2, flatflag);
		}
	}

	RotateRect0(sbar, &rc2);
	ReleaseDC(hwnd, hdc);

	//post a SB_TRACKPOS message!!!
	siMaxMin = si->nMax - si->nMin;

	if(siMaxMin > 0)
		pos = MulDiv(thumbpos-rc.left, siMaxMin-si->nPage + 1, rc.right-rc.left-nThumbSize);
	else
		pos = thumbpos - rc.left;

	if(pos != nLastPos)
	{
		si->nTrackPos = pos;	
		SendScrollMessage(hwnd, uScrollTimerMsg, SB_THUMBTRACK, pos);
	}

	nLastPos = pos;

#ifdef CUSTOM_DRAW
	PostCustomPrePostPaint(hwnd, hdc, sbar, CDDS_POSTPAINT);
#endif
	
	return 0;
}

//
//	remember to rotate the thumb bounds rectangle!!
//
static LRESULT ThumbTrackVert(SCROLLBAR *sb, HWND hwnd, int x, int y)
{
	//sw->swapcoords = TRUE;
	RotateRect(&rcThumbBounds);
	ThumbTrackHorz(sb, hwnd, y, x);
	RotateRect(&rcThumbBounds);
	//sw->swapcoords = FALSE;

	return 0;
}

//
//	Called when we have set the capture from the NCLButtonDown(...)
//	
static LRESULT MouseMove(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam)
{
	RECT rect;
	UINT thisportion;
	HDC hdc;
	static UINT lastportion = 0;
	static UINT lastbutton = 0;
	POINT pt;
	RECT winrect;
	UINT buttonIdx = 0;

	if(sw->fThumbTracking == TRUE)
	{
		int x, y;
		lParam = GetMessagePos();
		x = LOWORD(lParam);
		y = HIWORD(lParam);

		if(uCurrentScrollbar == SB_HORZ)
			return ThumbTrackHorz(&sw->sbarHorz, hwnd, x,y);


		else if(uCurrentScrollbar == SB_VERT)
			return ThumbTrackVert(&sw->sbarVert, hwnd, x,y);
	}

	if(uCurrentScrollPortion == HTSCROLL_NONE)
	{
		return CallWindowProc(sw->oldproc, hwnd, WM_MOUSEMOVE, wParam, lParam);
	}
	else
	{
		LPARAM nlParam;
		SCROLLBAR *sb = &sw->sbarHorz;
		SCROLLBUT *sbut = 0;

		nlParam = GetMessagePos();

		GetWindowRect(hwnd, &winrect);

		pt.x = LOWORD(nlParam);
		pt.y = HIWORD(nlParam);

		//emulate the mouse input on a scrollbar here...
		if(uCurrentScrollbar == SB_HORZ)
		{
			sb = &sw->sbarHorz;
		}
		else if(uCurrentScrollbar == SB_VERT)
		{
			sb = &sw->sbarVert;
		}

		//get the total area of the normal scrollbar area
		GetScrollRect(sw, sb->nBarType, hwnd, &rect);
		
		//see if we clicked in the inserted buttons / normal scrollbar
		//thisportion = GetPortion(sb, hwnd, &rect, LOWORD(lParam), HIWORD(lParam));
		thisportion = GetPortion(sb, hwnd, &rect, pt.x, pt.y);
		
		//we need to do different things depending on if the
		//user is activating the scrollbar itself, or one of
		//the inserted buttons
		switch(uCurrentScrollPortion)
		{
#ifdef INCLUDE_BUTTONS
		//inserted buttons are being clicked
		case HTSCROLL_INSERTED:
			
			//find the index of the button that has been clicked
			//Don't adjust the rectangle though
			buttonIdx = GetButtonFromPt(sb, &rect, pt, FALSE);
						
			//Get the rectangle of the active button
			GetButtonRectFromId(sb, &rect, uCurrentButton);

			//if the button to the LEFT of the current 
			//button is resizable, then resize it
#ifdef RESIZABLE_BUTTONS
			if(uCurrentButton > 0)
			{
				sbut = &sb->sbButtons[uCurrentButton - 1];
			
				//only resize if BOTH buttons are on same side of scrollbar
				if(sbut->uPlacement == (sbut+1)->uPlacement && (sbut->uButType & SBBM_RESIZABLE))
				{
					int oldsize = sbut->nSize;
					int butsize1, butsize2;
					RECT rect2;
					int scrollsize;

					if(uCurrentScrollbar == SB_HORZ)
					{
						rect.left -= GetSingleButSize(sb, sbut);
						sbut->nSize = pt.x - rect.left;
					}
					else
					{
						rect.top -= GetSingleButSize(sb, sbut);
						sbut->nSize = pt.y - rect.top;
					}

					//if(sbut->nSize < 0)	sbut->nSize = 0;
					if(sbut->nSize < (int)sbut->nMinSize)
						sbut->nSize = sbut->nMinSize;

					if((UINT)sbut->nSize > (UINT)sbut->nMaxSize)
						sbut->nSize = sbut->nMaxSize;
					
					GetScrollRect(sw, uCurrentScrollbar, hwnd, &rect2);
					
					if(uCurrentScrollbar == SB_HORZ)
						scrollsize

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费小视频| 91成人在线免费观看| 国产乱码字幕精品高清av | 欧美一区二区三区在线| 欧美日韩极品在线观看一区| 欧美亚日韩国产aⅴ精品中极品| 91在线看国产| 91浏览器在线视频| 欧美美女一区二区三区| 日韩一区二区在线看片| 久久精品亚洲精品国产欧美kt∨ | 国产精品18久久久久久久久 | 亚洲男人天堂av| 亚洲精品日韩专区silk| 日韩精品亚洲专区| 国产乱子轮精品视频| 成人视屏免费看| 欧美性猛片aaaaaaa做受| 成人av在线网| 这里只有精品99re| 欧美高清一级片在线| 久久久精品日韩欧美| 一区二区三区在线观看网站| 五月天亚洲精品| 91丨porny丨国产| 日韩免费视频一区| 亚洲欧洲美洲综合色网| 日本色综合中文字幕| 成人网页在线观看| 日韩精品中午字幕| 亚洲丰满少妇videoshd| 不卡在线视频中文字幕| 欧洲人成人精品| 国产精品理论片| 国产一区二区免费视频| 在线电影一区二区三区| 中文字幕在线不卡一区二区三区| 欧美三级资源在线| 亚洲动漫第一页| 欧美日韩精品一区二区在线播放| 一区二区三区丝袜| 欧美女孩性生活视频| 偷拍日韩校园综合在线| 欧美精品18+| 黄色成人免费在线| 久久久www成人免费毛片麻豆 | 成人黄色电影在线| 久久夜色精品一区| 精品一区二区三区在线播放视频| 欧美伦理影视网| 水蜜桃久久夜色精品一区的特点| 欧美色网一区二区| 亚洲五码中文字幕| 欧美日韩在线电影| 成人avav影音| 日韩专区中文字幕一区二区| 2024国产精品| 色婷婷亚洲精品| 蜜桃视频第一区免费观看| 中文字幕高清一区| 欧美老女人第四色| 风间由美中文字幕在线看视频国产欧美 | 免费精品99久久国产综合精品| 国产欧美日韩中文久久| 亚洲成av人片一区二区三区| 国产精品你懂的| 国产偷v国产偷v亚洲高清| 91精品婷婷国产综合久久性色| 国产91精品一区二区麻豆亚洲| 亚洲一区二区在线免费看| 精品国产乱码久久久久久浪潮| 91福利精品视频| 国产不卡视频一区二区三区| 亚洲一二三区视频在线观看| 欧美mv日韩mv亚洲| 欧美日本国产视频| 欧美日韩精品欧美日韩精品一 | 亚洲私人影院在线观看| 欧美一卡2卡3卡4卡| 欧美在线视频日韩| 国产a精品视频| 精品一区二区三区欧美| 亚洲一区二区在线观看视频| 欧美国产精品专区| 日韩欧美一二三| 欧美日韩你懂的| 欧美午夜精品一区| 欧美在线色视频| 欧美日本韩国一区二区三区视频| 欧洲另类一二三四区| 欧美人牲a欧美精品| 一道本成人在线| 成人永久aaa| 成人美女视频在线观看| 国产高清精品在线| 国产乱码精品一区二区三| 国产精品一区二区在线观看网站| 久久99精品视频| 国产一区二区在线影院| 精品一区二区在线免费观看| 美国毛片一区二区三区| 激情综合网av| 国产美女主播视频一区| 国产美女娇喘av呻吟久久| 国产精品一二三四区| 国产不卡一区视频| 在线观看国产91| 日韩一区二区麻豆国产| 久久久久久久久久久99999| 国产精品色婷婷| 亚洲国产精品久久人人爱| 天堂精品中文字幕在线| 韩日av一区二区| 91美女在线视频| 日韩午夜电影av| 亚洲视频一区在线| 免费成人在线网站| 91麻豆国产精品久久| 日韩亚洲欧美一区二区三区| 国产婷婷精品av在线| 亚洲在线免费播放| 国产成人一区在线| 555夜色666亚洲国产免| 国产精品美日韩| 麻豆高清免费国产一区| 不卡一区二区在线| 精品理论电影在线| 亚洲一区二区三区四区不卡| 国产成人欧美日韩在线电影| 欧美在线一区二区三区| 国产欧美日韩在线看| 欧美精品在欧美一区二区少妇| 亚洲国产电影在线观看| 视频一区二区国产| 色婷婷亚洲婷婷| 国产精品国产三级国产普通话99| 久久99国产精品免费| 欧美日韩电影在线播放| 一区二区视频在线看| 丁香婷婷综合色啪| 久久美女艺术照精彩视频福利播放| 日韩激情一区二区| 91精品国产91久久久久久一区二区 | 亚洲高清久久久| 欧美午夜免费电影| 亚洲一卡二卡三卡四卡 | 久久亚区不卡日本| 国产成人精品影视| 久久综合给合久久狠狠狠97色69| 老司机精品视频线观看86 | 国产精品不卡在线| 成人午夜免费视频| 久久婷婷国产综合精品青草| 亚洲国产综合色| 欧美日韩国产小视频| 久久这里只有精品6| 激情综合一区二区三区| 精品国产伦一区二区三区免费| 日韩专区一卡二卡| 日韩一区二区精品葵司在线| 日韩电影免费在线看| 在线免费精品视频| 香蕉成人啪国产精品视频综合网 | 欧美精选午夜久久久乱码6080| 亚洲一区视频在线观看视频| 91视频www| 午夜精品久久久久久久久久久| 欧美久久久久久蜜桃| 亚洲亚洲人成综合网络| 欧美欧美欧美欧美| 久久99国产精品成人| 欧美一区二区成人6969| 国产一区二区三区不卡在线观看| 欧美mv和日韩mv国产网站| 国产一区二区91| 亚洲欧美偷拍三级| 欧美色手机在线观看| 青草av.久久免费一区| 国产日韩精品视频一区| 成人蜜臀av电影| 亚洲成a人片综合在线| 精品久久一区二区| 色综合中文字幕国产| 亚洲成人激情综合网| 精品少妇一区二区三区日产乱码 | 综合婷婷亚洲小说| 欧美精品日日鲁夜夜添| 国产一区二区三区电影在线观看 | 亚洲国产aⅴ天堂久久| 久久久久国产免费免费| 91蜜桃婷婷狠狠久久综合9色| 蜜臀av一区二区三区| 国产精品久久久久久久午夜片| 在线电影国产精品| 在线精品视频一区二区三四| 久色婷婷小香蕉久久| 亚洲一区视频在线观看视频| 国产日产欧美精品一区二区三区| 欧美在线free| 91玉足脚交白嫩脚丫在线播放|