www.pudn.com > DialogResizeable.zip > CTestDlg.h, change:2001-10-08,size:1919b


#ifndef __CTestDlg_h__ 
#define __CTestDlg_h__ 
 
// 
// CTestDlg 
// 
// Written by Laurent Kempé (lkempe@netcourrier.com) for Tech Head WebSite 
// Copyright (c) 2001 Laurent Kempé. 
// 
// This code may be used in compiled form in any way you desire. This 
// file may be redistributed by any means PROVIDING it is  
// not sold for profit without the authors written consent, and  
// providing that this notice and the authors name is included.  
// 
// This file is provided "as is" with no expressed or implied warranty. 
// The author accepts no liability if it causes any damage to you or your 
// computer whatsoever. It's free, so don't hassle me about it. 
// 
 
#pragma once 
 
#include "WinMgr.h" 
#include "SizeableDlg.h" 
#include "resource.h" 
 
class CTestDlg :  
	public CDialogSizeable<CTestDlg>,  
	public CDialogImpl<CTestDlg> 
{ 
 
public: 
 
	enum { IDD = IDD_DIALOG1 }; 
 
	////////////////////////////////////////////////////////////////////////// 
	 
	CTestDlg( ); 
	virtual ~CTestDlg(); 
 
	////////////////////////////////////////////////////////////////////////// 
	 
	BEGIN_MSG_MAP_EX(CTestDlg) 
		MSG_WM_INITDIALOG(OnInitDialog) 
 
		COMMAND_ID_HANDLER_EX(IDOK, OnOK) 
		COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel) 
 
		MESSAGE_HANDLER_EX(WM_WINMGR, OnWinMgr) 
 
		CHAIN_MSG_MAP(CDialogSizeable<CTestDlg>) 
	END_MSG_MAP() 
 
	////////////////////////////////////////////////////////////////////////// 
	 
	LRESULT OnInitDialog( HWND hwnd, LPARAM  lParam); 
 
	void	OnOK( UINT notificationcode, int id, HWND hwnd ); 
	void	OnCancel( UINT notificationcode, int id, HWND hwnd ); 
 
	LRESULT OnWinMgr(UINT uMsg, WPARAM wp, LPARAM lp); 
 
	////////////////////////////////////////////////////////////////////////// 
	 
	void CloseDialog(int nVal) 
	{ 
		DestroyWindow(); 
		::PostQuitMessage(nVal); 
	} 
 
protected: 
 
	SIZE m_szMinButton; // min button size 
 
}; 
 
#endif //__CTestDlg_h__