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

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

?? resizingdialog.cpp

?? 編譯原理課程設計
?? CPP
字號:
////////////////////////////////////////////////////////////////////////
// ResizingDialog.cpp : implementation file
//	
// Author: Eli Vingot (elivingt@internet-zahav.net)
//
// Ideas for improving the class are always appreciated
//
//
// The base class for the dialog box you want to allow resizing
// Use SetConrolInfo() to determine how each control behaves when
// the user resize the dialog box.
// (The "Windows default" is ANCHORE_TOP | ANCHORE_LEFT)
//
// e.g. For a right aligned OK button you'll probably call:
// SetControlInfo(IDOK, ANCHORE_RIGHT)
// For a text control that needs to resize with the dialog you may do:
// SetControlInfo(IDD_MYEDITOR, RESIZE_BOTH)
//
// Note: The dialog box "remebers" its size on destroy and the next time
// you launch it, it'll set the dialog size back to the previous size.
// If you don't like this behavior, call SetRememberSize(FALSE)
//
// LIMITATIONS:
// 1) This class does not handle overlapping controls, 
//    e.g., you cannot place two controls one (RESIZE_VER) and the other
//    with (RESIZE_VER | ANCHORE_BOTTOM) one below the other, they may ovelapp.
//
// 2) This class does not remember the mode of the dialog (Maximized/Minimized)
//	  it would be easy to add this feature, though.
//
//
#include "stdafx.h"
#include "ResizingDialog.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif


/////////////////////////////////////////////////////////////////////////////
// CResizingDialog dialog

CResizingDialog::CResizingDialog(UINT nIDTemplate, CWnd* pParentWnd) : 
				CDialog(nIDTemplate,pParentWnd)
{
	m_minWidth = m_minHeight = 0;	// flag that GetMinMax wasn't called yet
	m_old_cx = m_old_cy = 0;
	m_bSizeChanged = FALSE;
	m_nIDTemplate = nIDTemplate;

	m_bRememberSize = FALSE;
	m_bDrawGripper = TRUE;
}

void CResizingDialog::SetControlInfo(WORD CtrlId,WORD Anchore)			
{
	if(Anchore == ANCHORE_LEFT)
		return; // Do nothing

	// Add resizing behaviour for the control
	DWORD c_info = CtrlId | (Anchore << 16);
	m_control_info.Add(c_info);
}

BEGIN_MESSAGE_MAP(CResizingDialog, CDialog)
	//{{AFX_MSG_MAP(CResizingDialog)
	ON_WM_SIZE()
	ON_WM_PAINT()
	ON_WM_NCHITTEST()
	ON_WM_GETMINMAXINFO()
	ON_WM_DESTROY()
	ON_WM_CREATE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


//////////////////////////////////////////////////////////////////////////
// CResizingDialog message handlers



//////////////////////////////////////////////////////////////////////////
// OnInitDialog()
//
BOOL CResizingDialog::OnInitDialog()
{
	CDialog::OnInitDialog();
	if(m_bRememberSize)
	{
		// Load the previous size of the dialog box from the INI/Registry
		CString dialog_name;
		GetDialogProfileEntry(dialog_name);

		int cx = AfxGetApp()->GetProfileInt(dialog_name,"CX",0);
		int cy = AfxGetApp()->GetProfileInt(dialog_name,"CY",0);
		
		if(cx && cy)
		{
			SetWindowPos( NULL, 0, 0, cx, cy, SWP_NOMOVE );
		}
	}
	
	return FALSE;  // return TRUE  unless you set the focus to a control
}


//
// OnSize()
// Set the dialog controls new position and size
//
void CResizingDialog::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	//Invalidate();
	if(nType == SIZE_MINIMIZED)
		return;

	int dx = cx - m_old_cx;
	int dy = cy - m_old_cy;

	if(m_old_cx)
	{
		// Move and Size the controls using the information
		// we got in SetControlInfo()
		//
		m_bSizeChanged = TRUE;
		CRect WndRect;
		CWnd *pWnd;
		DWORD c_info;
		short Anchore;
		for(int i = 0; i < m_control_info.GetSize(); i++)
		{
			c_info = m_control_info[i];
			pWnd = GetDlgItem(LOWORD(c_info));
			if(!pWnd)
			{
				TRACE("Control ID - %d NOT FOUND!!\n",LOWORD(c_info));
				continue;
			}

			if(!HIWORD(c_info))
			{
				//pWnd->Invalidate();
				continue; // do nothing if anchored to top and or left
			}

			Anchore = HIWORD(c_info);
			pWnd->GetWindowRect(&WndRect);  
			ScreenToClient(&WndRect);
			
			if(Anchore & RESIZE_HOR)
				WndRect.right += dx;
			else if(Anchore & ANCHORE_RIGHT)
				WndRect.OffsetRect(dx,0);

			if(Anchore & RESIZE_VER)
				WndRect.bottom += dy;
			else if(Anchore & ANCHORE_BOTTOM)
				WndRect.OffsetRect(0,dy);

			pWnd->MoveWindow(&WndRect);
			pWnd->Invalidate();
		}

	}
	m_old_cx = cx;
	m_old_cy = cy;

	// When enlarging a dialog box we need to erase the old gripper 
	if(m_bDrawGripper)
		InvalidateRect(m_GripperRect);
//	Invalidate();
}


void CResizingDialog::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
    if (!m_minWidth) // first time
		{
		CDialog::OnGetMinMaxInfo(lpMMI);
		return;
		}
    lpMMI->ptMinTrackSize.x = m_minWidth;
    lpMMI->ptMinTrackSize.y = m_minHeight;
}

void CResizingDialog::OnDestroy() 
{
	// Save the size of the dialog box, so next time
	// we'll start with this size
	if(m_bRememberSize && m_bSizeChanged && m_old_cx && m_old_cy)
		{
		CRect rc;
		GetWindowRect(&rc);
		CString dialog_name;
		GetDialogProfileEntry(dialog_name);

		AfxGetApp()->WriteProfileInt(dialog_name,"CX",rc.Width());
		AfxGetApp()->WriteProfileInt(dialog_name,"CY",rc.Height());
		}

	// Important: Reset the internal values in case of reuse of the dialog
	// with out deleting.
	m_minWidth = m_minHeight = m_old_cx = m_old_cy = 0;
	m_bSizeChanged = FALSE;

	CDialog::OnDestroy();
}


//
// OnCreate()
//
int CResizingDialog::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// Remember the original size so later we can calculate
	// how to place the controls on dialog Resize
	m_minWidth  = lpCreateStruct->cx;
	m_minHeight = lpCreateStruct->cy;
	return 0;
}

//
// OnPaint()
// Override WM_PAINT to draw a gripper
//
// Credit goes to: Tommy Svensson
//
void CResizingDialog::OnPaint()
{
	CDialog::OnPaint();

	// Draw a resizing gripper at the lower left corner
	//
	// Note: Make sure you leave enough space in your dialog template
	// for the gripper to be drawn.
	// Don't put any controls on the lower left corner.
	if(m_bDrawGripper)
	{
		CRect rc;
		GetClientRect(rc);

		rc.left = rc.right-GetSystemMetrics(SM_CXHSCROLL);
		rc.top = rc.bottom-GetSystemMetrics(SM_CYVSCROLL);
		m_GripperRect = rc;
		CClientDC dc(this);
		dc.DrawFrameControl(rc,DFC_SCROLL,DFCS_SCROLLSIZEGRIP);
	}
}


//
// OnNcHitTest
// Handle mouse over the gripper
//
// Credit: Tommy Svensson
//
UINT CResizingDialog::OnNcHitTest(CPoint point)
{
	UINT ht = CDialog::OnNcHitTest(point);

	if(ht==HTCLIENT && m_bDrawGripper)
	{
		CRect rc;
		GetWindowRect( rc );
		rc.left = rc.right-GetSystemMetrics(SM_CXHSCROLL);
		rc.top = rc.bottom-GetSystemMetrics(SM_CYVSCROLL);
		if(rc.PtInRect(point))
		{
			ht = HTBOTTOMRIGHT;
		}
	}
	return ht;
}


//
// GetDialogProfileEntry()
// Override this (virtual) function in your derived class
// if you want to store the dialog info under a different entry name.
//
// Credit: Ari Greenberg
void CResizingDialog::GetDialogProfileEntry(CString &sEntry)
{
	// By default store the size under the Dialog ID value (Hex)
	sEntry.Format("%x",m_nIDTemplate);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠网亚洲精品| 欧美一区二区日韩一区二区| 欧美激情在线观看视频免费| 欧美视频一区二区在线观看| 97国产一区二区| 91麻豆文化传媒在线观看| 国产馆精品极品| 激情综合网最新| 免费av成人在线| 老司机精品视频在线| 国产91综合网| 在线观看91精品国产入口| 粉嫩绯色av一区二区在线观看| 亚洲国产sm捆绑调教视频| 日韩电影在线观看电影| 精品无人码麻豆乱码1区2区| 国产高清在线观看免费不卡| 97国产一区二区| 色网站国产精品| 日韩三级免费观看| 国产精品乱人伦一区二区| 亚洲在线中文字幕| 成人免费高清在线观看| 日本精品一区二区三区四区的功能| 久久99久久精品欧美| 精品国产一二三区| 亚洲摸摸操操av| 久久国产精品露脸对白| 激情综合网av| 94-欧美-setu| 日韩一级黄色片| 亚洲综合色丁香婷婷六月图片| 亚洲一区二区三区四区在线免费观看| 精品影院一区二区久久久| 91一区二区在线| 国产欧美一区二区精品性色超碰| 日产欧产美韩系列久久99| 狠狠色丁香婷婷综合久久片| 成人免费视频网站在线观看| 欧美老人xxxx18| 亚洲国产中文字幕在线视频综合| www.亚洲色图| 一区二区三区中文免费| 99久久精品国产精品久久| 亚洲精品一区二区三区在线观看| 亚洲超碰97人人做人人爱| 色婷婷综合久久久中文字幕| 91精品黄色片免费大全| 日一区二区三区| 精品国产自在久精品国产| 国产在线视频精品一区| 欧美亚洲综合色| 亚洲va韩国va欧美va| 欧美日韩国产高清一区二区| 日韩电影在线免费| 精品欧美乱码久久久久久1区2区| 亚洲国产高清不卡| aaa欧美色吧激情视频| 欧美激情中文字幕| 99久久婷婷国产综合精品| 成人美女视频在线观看18| 亚洲国产成人av网| 中文字幕视频一区| 日韩免费福利电影在线观看| 成人理论电影网| 亚洲男人的天堂在线观看| 亚洲成人一区在线| 日本欧美在线观看| 亚洲亚洲精品在线观看| 国产精品久久久久久妇女6080| 欧美福利视频导航| 久久精品av麻豆的观看方式| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 972aa.com艺术欧美| 亚洲最新视频在线播放| 精品福利av导航| 色老头久久综合| 亚洲大片精品永久免费| 337p亚洲精品色噜噜狠狠| 久久综合色一综合色88| 久久婷婷一区二区三区| 91精品国产免费| 国产精品一区二区x88av| 亚洲国产毛片aaaaa无费看| 一区二区激情小说| 水野朝阳av一区二区三区| 亚洲一区二区在线视频| 一区二区三区欧美日| 亚洲高清免费在线| 最新不卡av在线| 午夜激情综合网| 国产一区二区在线看| 国产ts人妖一区二区| 色综合视频一区二区三区高清| 国产丝袜在线精品| 亚洲色图视频网| 偷拍与自拍一区| 九九精品一区二区| 欧美午夜视频网站| 欧美日韩视频第一区| 精品国精品国产尤物美女| 中文字幕日本乱码精品影院| 久久激情综合网| 欧美日韩精品欧美日韩精品一综合| 2022国产精品视频| 日韩成人一区二区三区在线观看| 日本不卡一二三区黄网| 成人app在线观看| 宅男在线国产精品| 一区二区在线观看视频在线观看| 麻豆freexxxx性91精品| 欧美艳星brazzers| 亚洲二区在线观看| 欧美日韩亚洲综合在线| 亚洲欧美偷拍另类a∨色屁股| 国产一区视频在线看| 一本一道久久a久久精品| 欧美经典三级视频一区二区三区| 图片区小说区区亚洲影院| caoporen国产精品视频| 国产午夜精品一区二区三区嫩草| 蜜臀久久99精品久久久久宅男| 国产成人综合视频| 久久一区二区三区四区| 天天综合色天天综合| 精品国产一区二区三区不卡 | 欧美中文字幕一区二区三区| 久久青草国产手机看片福利盒子 | 国产精品免费aⅴ片在线观看| 一区二区三区精密机械公司| 视频一区在线视频| 欧美成人video| 日韩电影免费一区| 久久久久久久综合狠狠综合| 国产精品一二三四区| 日韩一区精品字幕| 色综合一个色综合亚洲| 洋洋av久久久久久久一区| 精品国产凹凸成av人导航| 欧美怡红院视频| 99久久久国产精品| 黄色日韩网站视频| 一区二区三区在线不卡| 91美女蜜桃在线| 色综合久久66| 成人三级在线视频| 91精品办公室少妇高潮对白| 欧美亚洲动漫精品| 欧美日韩国产高清一区二区三区 | 国产精品高潮呻吟| 欧美国产成人在线| 中文字幕欧美区| 亚洲九九爱视频| 国产精品成人免费在线| 国产欧美日韩综合| 亚洲一区二区三区美女| 激情国产一区二区| 欧美日韩国产影片| 伊人一区二区三区| 日韩理论电影院| 亚洲综合色成人| 久久精品国产99久久6| 大陆成人av片| 欧美高清视频www夜色资源网| 亚洲成人综合在线| 成人av在线影院| 欧洲精品中文字幕| 欧美一区二区免费视频| 日韩免费福利电影在线观看| 国产日本一区二区| 欧美电影免费观看完整版| 欧美一区二区网站| 久久精品这里都是精品| 日本 国产 欧美色综合| 在线观看国产一区二区| 亚洲精品中文字幕在线观看| 成人影视亚洲图片在线| 91精品国产综合久久国产大片| 欧美巨大另类极品videosbest| 亚洲女爱视频在线| 欧美私模裸体表演在线观看| 中文字幕一区二区三区四区不卡| 成人综合婷婷国产精品久久 | 亚洲不卡在线观看| 色呦呦网站一区| 亚洲视频一二三区| av激情亚洲男人天堂| 日韩欧美国产午夜精品| 粉嫩高潮美女一区二区三区| 欧美成人女星排行榜| 国产白丝精品91爽爽久久| 伊人夜夜躁av伊人久久| 一本到三区不卡视频| 成人欧美一区二区三区白人| 色综合天天综合网国产成人综合天| 亚洲最新视频在线观看| 国产91对白在线观看九色| 26uuu亚洲综合色| 91女神在线视频| 另类欧美日韩国产在线|