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

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

?? expandingdialog.cpp

?? 超強(qiáng)的圖形界面聊天軟件.rar
?? 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()
{
	delete m_pSize;
}


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一区二区三区免费野_久草精品视频
日韩电影在线免费看| 日韩免费观看高清完整版 | heyzo一本久久综合| 成人免费视频一区二区| 色综合天天在线| 欧美午夜精品免费| 久久嫩草精品久久久精品| 亚洲精品乱码久久久久久久久| 视频一区中文字幕| 91麻豆国产在线观看| 久久久久久久国产精品影院| 国产一区福利在线| 国产999精品久久| 日韩免费看的电影| 床上的激情91.| 一区二区三区在线不卡| av电影在线观看完整版一区二区| 亚洲欧美中日韩| 九九热在线视频观看这里只有精品| 成人av手机在线观看| 久久久久九九视频| 91精品一区二区三区在线观看| 成人欧美一区二区三区视频网页| 欧美探花视频资源| 国产一区二区三区高清播放| 亚洲人妖av一区二区| 韩日欧美一区二区三区| 日韩欧美精品在线视频| 不卡的av在线| 久久国产福利国产秒拍| 日韩美女一区二区三区四区| 岛国精品在线观看| 日韩av一区二| 亚洲人成小说网站色在线| 日韩一二三区不卡| 久久黄色级2电影| 成人欧美一区二区三区白人| 精品国产网站在线观看| 国产一区二三区好的| 亚洲欧美电影一区二区| 日韩欧美国产麻豆| 欧美亚洲一区二区在线观看| 国产二区国产一区在线观看| 国产精品免费观看视频| 成人av电影观看| 久久精品国产亚洲一区二区三区| 中文字幕字幕中文在线中不卡视频| 日韩亚洲欧美成人一区| 色婷婷综合久久久中文字幕| 亚洲最新视频在线播放| 久久久久综合网| 日韩女优视频免费观看| 欧美色图第一页| 激情av综合网| 日韩成人dvd| 亚洲一区在线视频| 日韩一级片网站| 欧美日韩亚洲综合一区二区三区 | 成人久久视频在线观看| 日本不卡的三区四区五区| 久久综合九色综合欧美就去吻 | 中文字幕在线一区二区三区| 91香蕉视频mp4| 国产成人免费网站| 韩国女主播一区二区三区| 石原莉奈在线亚洲三区| 亚洲国产成人av| 国产亚洲综合性久久久影院| 92精品国产成人观看免费| 亚洲成av人片| 国产精品美女久久久久高潮 | 国产精品网友自拍| 久久久99免费| 国产亚洲一区字幕| 国产精品私房写真福利视频| 日本一区二区成人在线| 欧美三级电影一区| 欧美性三三影院| 欧美视频精品在线| 5566中文字幕一区二区电影 | 久久精品国产一区二区三区免费看| 日韩激情av在线| 毛片av一区二区| 亚洲欧美激情小说另类| 亚洲精品成人精品456| 亚洲综合网站在线观看| 亚洲成人免费影院| 久久精品国产秦先生| 国产一区二区伦理片| 国产黄人亚洲片| 99在线精品视频| 欧美三级资源在线| 9191国产精品| 国产亚洲人成网站| 成人免费在线视频| 五月天久久比比资源色| 亚洲美女淫视频| 午夜精品久久久久久久99樱桃| 日韩vs国产vs欧美| 国产美女娇喘av呻吟久久| 成人黄页毛片网站| 欧美日韩另类一区| 91在线视频网址| 欧美猛男男办公室激情| 精品免费国产二区三区 | 99久久久久免费精品国产 | 国产精品国产三级国产aⅴ中文| 亚洲人成在线观看一区二区| 亚洲在线视频网站| 激情五月激情综合网| 91在线观看下载| 日韩欧美一区二区三区在线| 中文字幕乱码亚洲精品一区| 香蕉久久夜色精品国产使用方法| 韩国视频一区二区| 中文字幕精品一区二区三区精品| 亚洲另类在线制服丝袜| 日韩电影一区二区三区四区| 粉嫩久久99精品久久久久久夜 | 粉嫩13p一区二区三区| 色哟哟一区二区在线观看 | 欧美日韩视频在线第一区| 国产亚洲欧美中文| 亚洲va韩国va欧美va精品| 粉嫩av一区二区三区在线播放| 欧美人成免费网站| 1024国产精品| 国内精品久久久久影院薰衣草| 91精品福利在线| 欧美性淫爽ww久久久久无| 精品久久久影院| 亚洲国产一区二区视频| 成人黄色网址在线观看| 精品sm在线观看| 日韩制服丝袜先锋影音| 91欧美一区二区| 国产欧美一区二区在线| 中文字幕在线视频一区| 精品一区二区三区不卡| 欧美日韩一区二区不卡| 一区二区中文视频| 国产精品乡下勾搭老头1| 91丨九色丨国产丨porny| 久久久久久久精| 麻豆久久一区二区| 777亚洲妇女| 亚洲一区二区三区视频在线 | 亚洲妇女屁股眼交7| a4yy欧美一区二区三区| 欧美经典三级视频一区二区三区| 蜜桃视频一区二区三区在线观看| 欧美怡红院视频| 夜色激情一区二区| 在线观看一区二区视频| xfplay精品久久| 另类调教123区 | 国产激情一区二区三区| 久久综合久久综合久久综合| 久久97超碰国产精品超碰| 日韩午夜电影在线观看| 日本成人在线电影网| 欧美丰满嫩嫩电影| 欧美国产在线观看| 成人一区在线观看| 中文字幕乱码久久午夜不卡 | 久久se这里有精品| 91精品福利在线一区二区三区| 中文一区二区在线观看| 国内精品在线播放| 国产欧美一区二区在线| 成人一级片在线观看| 国产精品美女久久久久久久久 | 91精品国产色综合久久久蜜香臀| 天堂一区二区在线免费观看| 欧美日韩精品欧美日韩精品| 亚洲国产日韩精品| 欧美一区二区三区视频在线| 蜜乳av一区二区| 久久亚洲私人国产精品va媚药| 国产麻豆成人精品| 中文字幕在线观看一区二区| 色呦呦一区二区三区| 爽好久久久欧美精品| 欧美成人乱码一区二区三区| 久久99久久99| 国产精品美日韩| 欧美午夜寂寞影院| 狠狠色丁香久久婷婷综合丁香| 欧美国产成人在线| 欧美日韩亚洲不卡| 国产精品综合在线视频| 亚洲欧美一区二区在线观看| 欧美日本一道本在线视频| 久久成人免费日本黄色| 日本一二三不卡| 欧洲日韩一区二区三区| 久久福利资源站| 亚洲蜜臀av乱码久久精品| 91精品国产欧美一区二区成人| 国产aⅴ综合色|