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

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

?? expandingdialog.cpp

?? 用于在windows平臺(tái)的串口監(jiān)視
?? CPP
字號(hào):
// ExpandingDialog.cpp : implementation file
//
// MFC Expanding/Contracting Dialog Implementation
//
// Written by Daniel G. Hyams
//      dhyams@ebicom.net or dhyams@altavista.net
//
// Copyright (c) 1998.
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is 
// not sold for profit without the authors written consent, and 
// providing that this notice and the authors name and all copyright 
// notices remains intact. If the source code in this file is used in 
// any  commercial application then a statement along the lines of 
// "Portions copyright (c) Daniel G. Hyams, 1998" must be included in 
// the startup banner, "About" box or printed documentation. An email 
// letting me know that you are using it would be nice as well. 
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// 
// Please use and enjoy, and let me know of any bugs/mods/improvements 
// that you have found/implemented and I will fix/incorporate them into 
// this file. 
//
// History: 1.0     8/6/98
//        
//            
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <windowsx.h>
#include "ExpandingDialog.h"

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

/////////////////////////////////////////////////////////////////////////////
// CExpandingDialog dialog

CExpandingDialog::CExpandingDialog(UINT nIDTemplate,CWnd* pParent,int nIDFrame,int nIDButton,
								   LPCTSTR strExpand,LPCTSTR strContract,int bAllowContract) 
				 : CDialog(nIDTemplate, pParent)
				 
{
	//{{AFX_DATA_INIT(CExpandingDialog)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

	m_strExpand = strExpand;
	m_strContract = strContract;
	m_nIDFrame = nIDFrame;
	m_nIDButton = nIDButton;
	m_bExpanded = TRUE;
	m_bAllowContract = bAllowContract;

	m_pSize = NULL;
}

CExpandingDialog::~CExpandingDialog()
{
	if(m_pSize)
	{
		delete m_pSize;
		m_pSize=NULL;
	}
}


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


BEGIN_MESSAGE_MAP(CExpandingDialog, CDialog)
	//{{AFX_MSG_MAP(CExpandingDialog)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CExpandingDialog message handlers

void CExpandingDialog::ExpandBox(BOOL fExpand)
{
	// if the dialog is already in the requested state, return
	// immediately.
	if (fExpand == m_bExpanded) return;

	CRect rcWnd, rcDefaultBox, rcChild, rcIntersection;
	CWnd * wndChild=NULL;
	CWnd * wndDefaultBox=NULL;
	
	// get the window of the button 
	CWnd * pCtrl = GetDlgItem(m_nIDButton);
	if (pCtrl==NULL) return;

	wndDefaultBox = GetDlgItem(m_nIDFrame);
	if (wndDefaultBox==NULL) return;

	// retrieve coordinates for the default child window
	wndDefaultBox->GetWindowRect(&rcDefaultBox);

	// enable/disable all of the child window outside of the default box.
	wndChild = GetTopWindow();

	for ( ; wndChild != NULL; wndChild = wndChild->GetWindow(GW_HWNDNEXT))
	{
		// get rectangle occupied by child window in screen coordinates.
		wndChild->GetWindowRect(&rcChild);

		if (!rcIntersection.IntersectRect(&rcChild,&rcDefaultBox))
		{
			wndChild->EnableWindow(fExpand);
		}
	}

	if (!fExpand)  // we are contracting
	{
		_ASSERT(m_bExpanded);
		GetWindowRect(&rcWnd);
		if (m_pSize == NULL)
		{
			// this is the first time we are being called to shrink the dialog
			// box.  The dialog box is currently in its expanded size and we must
			// save the expanded width and height so that it can be restored
			// later when the dialog box is expanded.
			m_pSize = new CSize;
			m_pSize->cx = rcWnd.right - rcWnd.left;
			m_pSize->cy = rcWnd.bottom - rcWnd.top;

			// we also hide the default box here so that it is not visible
			wndDefaultBox->ShowWindow(SW_HIDE);
		}

		// shrink the dialog box so that it encompasses everything from the top,
		// left up to and including the default box.
		SetWindowPos(NULL,0,0,
			rcDefaultBox.right - rcWnd.left, 
			rcDefaultBox.bottom - rcWnd.top,
			SWP_NOZORDER|SWP_NOMOVE);

		pCtrl->SetWindowText(m_strExpand);

		// record that the dialog is contracted.
		m_bExpanded = FALSE;
	}
	else // we are expanding
	{
		_ASSERT(!m_bExpanded);
		_ASSERT(m_pSize != NULL);
		SetWindowPos(NULL,0,0,m_pSize->cx,m_pSize->cy,SWP_NOZORDER|SWP_NOMOVE);

		// make sure that the entire dialog box is visible on the user's
		// screen.
		SendMessage(DM_REPOSITION,0,0);

		if (m_bAllowContract)
		{
			pCtrl->SetWindowText(m_strContract);
		}
		else
		{
			pCtrl->EnableWindow(FALSE);
		}

		// record that the dialog is expanded
		m_bExpanded = TRUE;
	}
}
 


void CExpandingDialog::OnClickAdvanced() 
{
	Expand(!m_bExpanded);
}

BOOL CExpandingDialog::Expand(BOOL bExpand)
{
	BOOL bShouldExpand;

	// if the current state matches the flag passed into this
	// routine, then there is no need to do anything.  Note that
	// the virtual functions OnDialogExpanding and OnDialogExpanded
	// are not called.
	if (bExpand == m_bExpanded) return TRUE;

	// call the virtual function to see if it is OK to expand the dialog.
	bShouldExpand = OnDialogExpanding(m_bExpanded);

	
	// if OnDialogExpanding returns OK (TRUE), then call the appropriate
	// functions to expand the dialog.
	if (bShouldExpand)
	{
		ExpandBox(bExpand);

		// set the focus to the desired control
		CWnd * pCtrl;
		pCtrl = GetDlgItem(m_nIDButton);
		if (pCtrl != NULL)
		{
			GetNextDlgTabItem(pCtrl,0)->SetFocus();
		}

		// call the notification for the post-expand
		OnDialogExpanded(m_bExpanded);
	}

	return(m_bExpanded == bExpand);
}


BOOL CExpandingDialog::OnDialogExpanding(BOOL /*bExpanded*/) 
{
	return (TRUE);
}

void CExpandingDialog::OnDialogExpanded(BOOL /*bExpanded*/) 
{
	return;
}



BOOL CExpandingDialog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// during initialization, before any windows are shown, shrink the
	// dialog box so that only the default portion is shown.
	ExpandBox(FALSE);


	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

BOOL CExpandingDialog::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	HWND hwndCtl;
	int id;
	UINT codeNotify;

	// crack the WM_COMMAND message
	id = GET_WM_COMMAND_ID(wParam,lParam);
	hwndCtl = GET_WM_COMMAND_HWND(wParam,lParam);
	codeNotify = GET_WM_COMMAND_CMD(wParam,lParam);
	
	// if the "Advanced" button was clicked, then call the 
	// message handler.
	if ((id == m_nIDButton)&&(codeNotify==BN_CLICKED))
	{
		OnClickAdvanced();
	}


	return CDialog::OnCommand(wParam, lParam);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
奇米一区二区三区av| 美女在线观看视频一区二区| 欧美一区二区三区啪啪| 国产成人免费视频网站高清观看视频 | 狠狠色狠狠色合久久伊人| 最新日韩av在线| 精品国产免费人成电影在线观看四季| 91在线观看污| 国产激情一区二区三区桃花岛亚洲| 亚洲制服丝袜av| 国产精品午夜春色av| 日韩一区二区在线观看视频| 色婷婷综合激情| 国产成人av网站| 毛片一区二区三区| 午夜伦理一区二区| 亚洲精品成人a在线观看| 中文字幕欧美国产| 日韩精品一区二区三区老鸭窝| 色婷婷久久久综合中文字幕| 国产成人高清在线| 精品在线免费观看| 日本sm残虐另类| 香蕉久久夜色精品国产使用方法| 国产精品人人做人人爽人人添| 日韩免费观看高清完整版在线观看| 欧洲生活片亚洲生活在线观看| 国产白丝网站精品污在线入口| 久久99九九99精品| 蜜臀av国产精品久久久久 | 午夜精品久久久| 亚洲精品视频在线观看免费| 中文字幕一区二区日韩精品绯色| 国产亚洲欧美色| 久久久久久久久久久久久久久99| 欧美r级在线观看| 精品福利视频一区二区三区| 欧美一级精品在线| 日韩一二在线观看| 日韩一区二区精品| 精品国产3级a| 久久免费视频一区| 久久精品无码一区二区三区| 久久精品夜色噜噜亚洲aⅴ| 久久夜色精品一区| 国产欧美一区二区三区在线老狼| 久久你懂得1024| 中文字幕一区二区三区不卡在线| 一区在线观看视频| 亚洲精品高清在线观看| 午夜在线成人av| 美女网站视频久久| 国产一区欧美日韩| 成人免费毛片片v| 99在线热播精品免费| 一本色道综合亚洲| 在线播放亚洲一区| 欧美α欧美αv大片| 国产日韩欧美不卡| 亚洲人成在线观看一区二区| 亚洲一区在线观看视频| 天天综合色天天综合色h| 蜜桃传媒麻豆第一区在线观看| 国内外精品视频| 99精品视频在线观看| 欧美日韩成人综合| 亚洲精品在线电影| 日韩美女久久久| 免费视频最近日韩| 成人午夜又粗又硬又大| 在线一区二区视频| 欧美电视剧在线观看完整版| 亚洲国产精品av| 亚洲高清视频的网址| 国产尤物一区二区| 色综合久久久网| 欧美xfplay| 亚洲摸摸操操av| 六月婷婷色综合| 色综合久久久网| 亚洲精品一区二区三区99| 亚洲欧美电影一区二区| 美女看a上一区| 91久久线看在观草草青青| 日韩女同互慰一区二区| 国产精品久久久久久一区二区三区| 亚洲123区在线观看| 成人性视频网站| 欧美一区二区三区视频在线观看| 国产精品美女久久久久aⅴ| 午夜精品影院在线观看| 国产.欧美.日韩| 91麻豆精品国产无毒不卡在线观看| 国产欧美精品一区二区三区四区| 亚洲韩国精品一区| 成人深夜福利app| 日韩视频在线你懂得| 亚洲欧美一区二区不卡| 国产乱码精品一区二区三区av | 色综合久久久久综合体| 精品国产乱码久久久久久久 | 日本一区中文字幕| av电影天堂一区二区在线观看| 欧美一区二区三区男人的天堂| 国产精品精品国产色婷婷| 老司机精品视频在线| 在线亚洲免费视频| 国产精品久久国产精麻豆99网站| 久久精工是国产品牌吗| 欧美三级韩国三级日本三斤| 国产精品久久久久久久久图文区 | 国产91清纯白嫩初高中在线观看 | 一区二区三区中文字幕在线观看| 国产精品 欧美精品| 日韩欧美在线1卡| 丝袜a∨在线一区二区三区不卡| 成人福利视频网站| 久久久影视传媒| 日韩精品免费视频人成| 欧美日韩视频在线一区二区| 亚洲欧美一区二区三区极速播放| 成人晚上爱看视频| 国产午夜亚洲精品理论片色戒 | 欧美日韩夫妻久久| 一区2区3区在线看| 91丨九色丨蝌蚪富婆spa| 国产欧美久久久精品影院| 国产麻豆9l精品三级站| www国产成人免费观看视频 深夜成人网| 亚洲成av人综合在线观看| 色又黄又爽网站www久久| 专区另类欧美日韩| 91美女福利视频| 亚洲婷婷综合色高清在线| 99riav久久精品riav| 成人免费视频在线观看| 成人av动漫网站| 中文天堂在线一区| a级高清视频欧美日韩| 中文字幕在线观看一区| 成年人国产精品| 国产精品高清亚洲| 色哟哟精品一区| 一区二区三区精品久久久| 欧美日韩精品欧美日韩精品一综合| 亚洲一区二区三区四区在线观看| 在线观看日韩国产| 天天综合网天天综合色| 精品日产卡一卡二卡麻豆| 久久国产精品99久久久久久老狼| 欧美精品一区二区久久婷婷| 国产精品亚洲人在线观看| 国产精品欧美经典| 色乱码一区二区三区88| 午夜精品一区二区三区免费视频 | 亚洲日韩欧美一区二区在线| 色综合色综合色综合色综合色综合 | 国产欧美视频一区二区| 99国产欧美久久久精品| 一区二区三区在线免费观看 | 精品成人一区二区三区四区| 成人一区二区视频| 一级女性全黄久久生活片免费| 欧美日韩一卡二卡| 国产永久精品大片wwwapp| 国产精品三级在线观看| 欧美性大战久久久| 久久不见久久见免费视频7 | 蜜芽一区二区三区| 26uuu亚洲婷婷狠狠天堂| 波多野结衣中文字幕一区二区三区 | 久久国产剧场电影| 国产精品毛片高清在线完整版| 欧美在线一区二区| 精品无人区卡一卡二卡三乱码免费卡| 国产精品色哟哟| 538在线一区二区精品国产| 国产99精品视频| 日韩高清不卡在线| 国产欧美精品一区| 制服丝袜亚洲精品中文字幕| 国产精品一二三| 亚洲国产欧美日韩另类综合 | 亚洲影视在线观看| 精品成人私密视频| 91福利在线播放| 国内成人精品2018免费看| 亚洲综合图片区| 久久九九久精品国产免费直播| 欧美伊人久久大香线蕉综合69| 国产在线不卡视频| 五月综合激情婷婷六月色窝| 国产精品国产a| wwwwxxxxx欧美| 69p69国产精品| 91在线观看一区二区| 国产乱人伦精品一区二区在线观看| 亚洲一二三四区| 国产精品麻豆视频| 久久伊99综合婷婷久久伊|