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

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

?? expandingdialog.cpp

?? 串口雙機互連代碼
?? CPP
字號:
// 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);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清久久久| 丰满亚洲少妇av| 久久午夜电影网| 久久综合五月天婷婷伊人| 日韩精品中文字幕一区| 91精品视频网| 99re视频精品| 欧美亚洲一区二区在线| 制服丝袜在线91| 日韩欧美一区二区视频| 国产精品久久久久影院| 亚洲欧美一区二区三区久本道91 | 欧美性猛交xxxxxxxx| 国产福利一区二区三区在线视频| 99久久99久久免费精品蜜臀| 欧美性大战久久久久久久蜜臀| www国产成人| 久久一日本道色综合| 国产日韩影视精品| 久久精品亚洲乱码伦伦中文| 欧美精品一区二区高清在线观看| 成人a区在线观看| 蜜桃视频第一区免费观看| 亚洲国产成人一区二区三区| 最新国产精品久久精品| 亚洲电影在线免费观看| 看电视剧不卡顿的网站| k8久久久一区二区三区| 91.成人天堂一区| 欧美精品一区二区三区蜜桃视频| 国产精品久久久久四虎| 视频在线观看91| 国产精华液一区二区三区| 欧美日韩另类一区| 亚洲永久精品国产| 欧美午夜免费电影| 亚洲丰满少妇videoshd| 欧美高清视频一二三区 | 精品1区2区在线观看| 国产精品久久国产精麻豆99网站| 天天色天天爱天天射综合| www.亚洲国产| 亚洲一二三四在线| 欧美三级韩国三级日本一级| 亚洲蜜臀av乱码久久精品| 欧洲一区二区三区在线| 亚洲人成影院在线观看| 国产成人夜色高潮福利影视| 亚洲精品一线二线三线无人区| 久久 天天综合| 国产色一区二区| 日韩一区二区免费在线观看| 亚洲欧美日韩国产一区二区三区 | 日本免费在线视频不卡一不卡二| 亚洲视频一区二区在线| 国产精品免费视频网站| 久久99精品国产.久久久久久| 精品国产91久久久久久久妲己 | 国产三级欧美三级日产三级99| 一区二区在线免费观看| 国产高清不卡一区| 国产精品麻豆网站| 久久99精品久久久| 欧美一级一级性生活免费录像| 亚洲成人激情社区| 26uuu精品一区二区| 欧洲色大大久久| 成人性生交大片| 蜜臀av一区二区| 亚洲综合成人在线视频| 国产亚洲综合在线| 91精品国产全国免费观看| 91啦中文在线观看| 亚洲视频精选在线| 国产精品看片你懂得| 久久亚洲综合色一区二区三区| 欧美在线|欧美| 99国产精品一区| 99精品偷自拍| 91年精品国产| 91免费在线看| 日本高清不卡aⅴ免费网站| 国产成人精品免费| 94色蜜桃网一区二区三区| 国产成人综合在线播放| 91网址在线看| 91视视频在线直接观看在线看网页在线看| 青青草国产精品97视觉盛宴 | 麻豆成人av在线| 精品一区二区三区av| 从欧美一区二区三区| 欧美日本在线视频| 国产欧美日韩三区| 国产精品一区二区果冻传媒| 波多野结衣的一区二区三区| 欧美军同video69gay| 精品一区二区免费视频| 久久精品99国产精品| 亚洲色图制服诱惑| 国产欧美一区二区精品秋霞影院 | 九一久久久久久| 欧美成人一区二区三区片免费| 91 com成人网| 国产一区二区三区免费播放| 亚洲欧美日韩系列| 日韩视频国产视频| 成人精品一区二区三区中文字幕| 亚洲视频一区二区在线| 日韩一区二区三免费高清| 波多野结衣的一区二区三区| 99免费精品在线观看| 日韩一区二区中文字幕| 日本一二三四高清不卡| 久久精品国产一区二区三区免费看| 成人免费视频网站在线观看| 欧美夫妻性生活| 亚洲一区二区三区三| av电影天堂一区二区在线| 久久蜜桃一区二区| 另类人妖一区二区av| 777亚洲妇女| 亚洲一二三级电影| 一本一道久久a久久精品| 欧美高清在线精品一区| 色综合久久88色综合天天| 亚洲欧洲av另类| 91在线播放网址| 亚洲国产一区二区三区| 91麻豆精品国产综合久久久久久| 一区二区成人在线观看| 欧洲国内综合视频| 日本vs亚洲vs韩国一区三区| 日韩久久久久久| 国内不卡的二区三区中文字幕| 日韩欧美在线影院| 国产成人自拍网| 亚洲另类色综合网站| 欧美电影免费观看高清完整版在线| 激情图区综合网| 亚洲激情五月婷婷| 亚洲人成影院在线观看| 久久久影视传媒| 欧美一区二区三区思思人| 欧美性大战久久| 午夜欧美视频在线观看| 久久超碰97中文字幕| 精品粉嫩aⅴ一区二区三区四区| 777精品伊人久久久久大香线蕉| 中文字幕永久在线不卡| 欧美日韩一级黄| 亚洲成人资源在线| 一区二区在线免费观看| 一区二区三区中文免费| 亚洲男人的天堂在线观看| 中文av一区二区| 中文字幕一区二区三区在线观看| 国产日本欧美一区二区| 国产欧美精品一区二区色综合 | 欧美在线啊v一区| 国产精品系列在线观看| 一区二区三区四区五区视频在线观看 | 久久精品国产免费| 精品一区二区三区在线观看| 亚洲网友自拍偷拍| 亚洲天堂2014| 一区二区三区四区在线免费观看| 亚洲国产精品v| 国产精品日韩精品欧美在线| 中文字幕av不卡| 久久精品一区二区三区不卡牛牛 | 欧美乱妇15p| 欧美做爰猛烈大尺度电影无法无天| 97精品国产97久久久久久久久久久久| 黄网站免费久久| 国产精品1区2区| 91在线观看免费视频| 色综合久久中文综合久久97| 日本道色综合久久| 欧美日韩成人在线一区| 26uuuu精品一区二区| 久久久九九九九| 亚洲自拍偷拍av| 日本aⅴ亚洲精品中文乱码| 日本伊人色综合网| 国产一区中文字幕| 久久久国产精华| 最新热久久免费视频| 国产麻豆成人精品| 在线观看欧美精品| 精品久久久久99| ww久久中文字幕| 色婷婷综合五月| 91无套直看片红桃| 欧美在线观看视频一区二区| 99re这里只有精品6| 在线国产电影不卡| 精品国产乱码91久久久久久网站| 亚洲日本欧美天堂| 国产一区999| 欧美一区二区三区在线电影|