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

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

?? ddddlg.cpp

?? VC界面類編程技巧大全附源碼(DOC)
?? CPP
字號:
// dddDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ddd.h"
#include "dddDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();
	
	// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA
	
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL
	
	// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDddDlg dialog

CDddDlg::CDddDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDddDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDddDlg)
	// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CDddDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDddDlg)
	// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CDddDlg, CDialog)
//{{AFX_MSG_MAP(CDddDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDddDlg message handlers

BOOL CDddDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	// Add "About..." menu item to system menu.
	
	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);
	
	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}
	
	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	CBitmap bmp;	
	if(bmp.LoadBitmap(IDB_BITMAP1))
	{
		HRGN rgn;
		rgn = BitmapToRegion((HBITMAP)bmp, RGB(0, 0, 0));
		SetWindowRgn(rgn, TRUE);
		bmp.DeleteObject();
	}	
	
	
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDddDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CDddDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting
		
		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
		
		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;
		
		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		
		CClientDC dc(this);
		CDC memDC;
		memDC.CreateCompatibleDC(&dc);
		
		CBitmap bmp;
		bmp.LoadBitmap(IDB_BITMAP1);
		CBitmap *pOldBmp;
		pOldBmp = memDC.SelectObject(&bmp);
		
		BITMAP bm;
		bmp.GetBitmap(&bm);
		
		dc.BitBlt(0, 0, bm.bmWidth, bm.bmHeight, &memDC, 0, 0, SRCCOPY);
		
		memDC.SelectObject(pOldBmp);
		bmp.DeleteObject();
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CDddDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

HRGN CDddDlg::BitmapToRegion(HBITMAP hBmp, COLORREF cTransparentColor, COLORREF cTolerance)
{
	HRGN hRgn = NULL;
	
	if (hBmp)
	{
		HDC hMemDC = CreateCompatibleDC(NULL);
		if (hMemDC)
		{
			BITMAP bm;
			GetObject(hBmp, sizeof(bm), &bm);
			
			//創建一個32位色的位圖,并選進內存設備環境
			BITMAPINFOHEADER RGB32BITSBITMAPINFO = {
						sizeof(BITMAPINFOHEADER),		// biSize 
							bm.bmWidth,					// biWidth; 
							bm.bmHeight,				// biHeight; 
							1,							// biPlanes; 
							32,							// biBitCount 
							BI_RGB,						// biCompression; 
							0,							// biSizeImage; 
							0,							// biXPelsPerMeter; 
							0,							// biYPelsPerMeter; 
							0,							// biClrUsed; 
							0							// biClrImportant; 
													};
			VOID * pbits32; 
			HBITMAP hbm32 = CreateDIBSection(hMemDC,(BITMAPINFO *)&RGB32BITSBITMAPINFO, DIB_RGB_COLORS, &pbits32, NULL, 0);
			if (hbm32)
			{
				HBITMAP holdBmp = (HBITMAP)SelectObject(hMemDC, hbm32);
				
				// Create a DC just to copy the bitmap into the memory DC
				HDC hDC = CreateCompatibleDC(hMemDC);
				if (hDC)
				{
					// Get how many bytes per row we have for the bitmap bits (rounded up to 32 bits)
					BITMAP bm32;
					GetObject(hbm32, sizeof(bm32), &bm32);
					while (bm32.bmWidthBytes % 4)
						bm32.bmWidthBytes++;
					
					// Copy the bitmap into the memory DC
					HBITMAP holdBmp = (HBITMAP)SelectObject(hDC, hBmp);
					BitBlt(hMemDC, 0, 0, bm.bmWidth, bm.bmHeight, hDC, 0, 0, SRCCOPY);
					
					// For better performances, we will use the ExtCreateRegion() function to create the
					// region. This function take a RGNDATA structure on entry. We will add rectangles by
					// amount of ALLOC_UNIT number in this structure.
#define ALLOC_UNIT	100
					DWORD maxRects = ALLOC_UNIT;
					HANDLE hData = GlobalAlloc(GMEM_MOVEABLE, sizeof(RGNDATAHEADER) + (sizeof(RECT) * maxRects));
					RGNDATA *pData = (RGNDATA *)GlobalLock(hData);
					pData->rdh.dwSize = sizeof(RGNDATAHEADER);
					pData->rdh.iType = RDH_RECTANGLES;
					pData->rdh.nCount = pData->rdh.nRgnSize = 0;
					SetRect(&pData->rdh.rcBound, MAXLONG, MAXLONG, 0, 0);
					
					// Keep on hand highest and lowest values for the "transparent" pixels
					BYTE lr = GetRValue(cTransparentColor);
					BYTE lg = GetGValue(cTransparentColor);
					BYTE lb = GetBValue(cTransparentColor);
					BYTE hr = min(0xff, lr + GetRValue(cTolerance));
					BYTE hg = min(0xff, lg + GetGValue(cTolerance));
					BYTE hb = min(0xff, lb + GetBValue(cTolerance));
					
					// Scan each bitmap row from bottom to top (the bitmap is inverted vertically)
					BYTE *p32 = (BYTE *)bm32.bmBits + (bm32.bmHeight - 1) * bm32.bmWidthBytes;
					for (int y = 0; y < bm.bmHeight; y++)
					{
						// Scan each bitmap pixel from left to right
						for (int x = 0; x < bm.bmWidth; x++)
						{
							// Search for a continuous range of "non transparent pixels"
							int x0 = x;
							LONG *p = (LONG *)p32 + x;
							while (x < bm.bmWidth)
							{
								BYTE b = GetRValue(*p);
								if (b >= lr && b <= hr)
								{
									b = GetGValue(*p);
									if (b >= lg && b <= hg)
									{
										b = GetBValue(*p);
										if (b >= lb && b <= hb)
											// This pixel is "transparent"
											break;
									}
								}
								p++;
								x++;
							}
							
							if (x > x0)
							{
								// Add the pixels (x0, y) to (x, y+1) as a new rectangle in the region
								if (pData->rdh.nCount >= maxRects)
								{
									GlobalUnlock(hData);
									maxRects += ALLOC_UNIT;
									hData = GlobalReAlloc(hData, sizeof(RGNDATAHEADER) + (sizeof(RECT) * maxRects), GMEM_MOVEABLE);
									pData = (RGNDATA *)GlobalLock(hData);
								}
								RECT *pr = (RECT *)&pData->Buffer;
								SetRect(&pr[pData->rdh.nCount], x0, y, x, y+1);
								if (x0 < pData->rdh.rcBound.left)
									pData->rdh.rcBound.left = x0;
								if (y < pData->rdh.rcBound.top)
									pData->rdh.rcBound.top = y;
								if (x > pData->rdh.rcBound.right)
									pData->rdh.rcBound.right = x;
								if (y+1 > pData->rdh.rcBound.bottom)
									pData->rdh.rcBound.bottom = y+1;
								pData->rdh.nCount++;
								
								// On Windows98, ExtCreateRegion() may fail if the number of rectangles is too
								// large (ie: > 4000). Therefore, we have to create the region by multiple steps.
								if (pData->rdh.nCount == 2000)
								{
									HRGN h = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + (sizeof(RECT) * maxRects), pData);
									if (hRgn)
									{
										CombineRgn(hRgn, hRgn, h, RGN_OR);
										DeleteObject(h);
									}
									else
										hRgn = h;
									pData->rdh.nCount = 0;
									SetRect(&pData->rdh.rcBound, MAXLONG, MAXLONG, 0, 0);
								}
							}
						}
						
						// Go to next row (remember, the bitmap is inverted vertically)
						p32 -= bm32.bmWidthBytes;
					}
					
					// Create or extend the region with the remaining rectangles
					HRGN h = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + (sizeof(RECT) * maxRects), pData);
					if (hRgn)
					{
						CombineRgn(hRgn, hRgn, h, RGN_OR);
						DeleteObject(h);
					}
					else
						hRgn = h;
					
					// Clean up
					GlobalFree(hData);
					SelectObject(hDC, holdBmp);
					DeleteDC(hDC);
				}				
				DeleteObject(SelectObject(hMemDC, holdBmp));
			}			
			DeleteDC(hMemDC);
		}
	}	
	return hRgn;	
}

void CDddDlg::OnLButtonDown(UINT nFlags, CPoint point) 
{	
	SendMessage(WM_NCLBUTTONDOWN,HTCAPTION,0);
	CDialog::OnLButtonDown(nFlags, point);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区在线观看你懂的| 色婷婷综合久久久久中文一区二区| 亚洲制服丝袜av| www国产成人| 日韩一区二区三区电影在线观看| 91精品办公室少妇高潮对白| 国产精品乱人伦| 国产69精品一区二区亚洲孕妇| 韩国女主播一区二区三区| 看电视剧不卡顿的网站| 日本不卡一二三| 久久精品99久久久| 国产综合久久久久影院| 国产精品99久久久久久宅男| 国产成人一区在线| 成人h动漫精品一区二| 色综合色综合色综合| 91免费视频观看| 精品视频全国免费看| 欧美绝品在线观看成人午夜影视| 欧美一区二区视频在线观看| 日韩欧美成人一区二区| 久久久久久久久岛国免费| 国产女人18毛片水真多成人如厕| 中文字幕在线一区| 一区二区三区免费| 男人的天堂久久精品| 国内精品不卡在线| 99精品桃花视频在线观看| 欧美亚洲一区二区三区四区| 69精品人人人人| 国产亚洲一二三区| 尤物av一区二区| 免费国产亚洲视频| 成人深夜视频在线观看| 在线观看视频一区二区| 日韩欧美一区二区久久婷婷| 国产目拍亚洲精品99久久精品| 亚洲精品伦理在线| 美国十次综合导航| 91在线观看下载| 91精品久久久久久久99蜜桃| 中文字幕欧美激情一区| 天涯成人国产亚洲精品一区av| 狠狠狠色丁香婷婷综合久久五月| 91视频xxxx| 精品国产伦一区二区三区观看方式| 最新中文字幕一区二区三区| 免费看精品久久片| 成人在线视频首页| 日韩午夜在线观看| 亚洲制服丝袜在线| 国产精品免费视频观看| 色偷偷久久一区二区三区| 91精品视频网| 亚洲电影一区二区| 国产jizzjizz一区二区| 亚洲美女视频在线| 欧美肥妇bbw| 亚洲欧美日韩国产另类专区| 黄页网站大全一区二区| 欧美电影一区二区| 亚洲欧美视频在线观看| 国产很黄免费观看久久| 884aa四虎影成人精品一区| 亚洲你懂的在线视频| 国产成人精品免费一区二区| 日韩欧美一级二级三级| 亚洲影院理伦片| 91丨porny丨首页| 久久综合色8888| 美女网站视频久久| 91精品蜜臀在线一区尤物| 亚洲国产cao| 在线精品视频一区二区三四| 亚洲视频在线观看一区| 国产成人免费在线观看不卡| 久久综合视频网| 精品一区二区成人精品| 欧美一卡二卡在线观看| 日韩高清欧美激情| 正在播放一区二区| 日韩有码一区二区三区| 欧美日韩精品欧美日韩精品| 同产精品九九九| 欧美性大战久久| 亚洲欧洲制服丝袜| 在线免费不卡视频| 亚洲成人av福利| 日韩免费性生活视频播放| 免费的成人av| 久久精品亚洲乱码伦伦中文| 国产麻豆视频一区| 亚洲国产精品黑人久久久| 成人免费视频播放| 伊人色综合久久天天| 欧美性做爰猛烈叫床潮| 日韩中文字幕亚洲一区二区va在线 | 6080午夜不卡| 久久99久久久久久久久久久| 精品成人在线观看| 成人国产精品免费观看动漫| 中文字幕制服丝袜成人av | 亚洲精品国产a久久久久久| 日本精品一区二区三区四区的功能| 一区二区三区成人| 欧美一级艳片视频免费观看| 国内成人精品2018免费看| 久久综合99re88久久爱| 91色在线porny| 国产iv一区二区三区| 亚洲伦理在线精品| 日韩欧美一级二级三级| 成人性生交大片免费看中文网站| 亚洲视频免费观看| 精品99一区二区三区| 99久久er热在这里只有精品15| 五月天一区二区三区| 国产欧美日韩精品一区| 欧美亚洲动漫精品| 国产精品一级二级三级| 亚洲一区二区三区四区五区中文| 欧美成人bangbros| 99精品久久99久久久久| 久久99国产精品久久99果冻传媒| 自拍视频在线观看一区二区| 欧美一区二区三区日韩视频| 91在线精品一区二区| 日本成人在线网站| 亚洲素人一区二区| 2024国产精品| 777xxx欧美| 不卡的av电影在线观看| 日本视频免费一区| 亚洲精品视频一区二区| 久久综合九色综合97婷婷女人| 色综合视频在线观看| 麻豆91免费看| 亚洲国产你懂的| 亚洲乱码国产乱码精品精的特点| 日韩中文字幕麻豆| 亚洲男同1069视频| 国产欧美一区二区精品性色| 欧美精品日韩综合在线| 91蜜桃网址入口| 紧缚奴在线一区二区三区| 欧美亚洲国产一卡| 国产乱码一区二区三区| 蜜臀av一区二区| 亚洲国产日韩一区二区| 亚洲综合清纯丝袜自拍| 国产精品久久久久婷婷二区次| 欧美三级资源在线| 97久久精品人人做人人爽50路| 国产麻豆成人传媒免费观看| 久色婷婷小香蕉久久| 亚洲大片免费看| 视频一区二区三区中文字幕| 亚洲国产另类av| 亚洲图片自拍偷拍| 日韩极品在线观看| 亚洲 欧美综合在线网络| 亚洲一区二区欧美| 亚洲综合在线视频| 亚洲成人综合在线| 日产国产高清一区二区三区| 肉色丝袜一区二区| 天堂久久一区二区三区| 日本麻豆一区二区三区视频| 丝袜脚交一区二区| 亚洲国产日韩一区二区| 成人听书哪个软件好| 成人激情免费电影网址| 99久久精品国产麻豆演员表| 91玉足脚交白嫩脚丫在线播放| av在线播放一区二区三区| 国产黄色精品视频| 成人h动漫精品| 99久久精品国产一区| 欧美在线视频你懂得| 欧美另类z0zxhd电影| 欧美成人免费网站| 国产精品视频九色porn| 亚洲激情综合网| 免费日本视频一区| 成人午夜电影网站| 午夜精品视频在线观看| 国产乱人伦偷精品视频免下载| 成人性生交大片免费看中文网站| 欧美色窝79yyyycom| 日韩精品一区国产麻豆| 国产精品乱人伦中文| 亚洲国产精品久久一线不卡| 精品一区二区三区免费观看| 成人网在线播放| 在线不卡中文字幕播放| 中文字幕av资源一区| 久久草av在线| 色94色欧美sute亚洲13| 91精品在线观看入口|