// XyzDlg.cpp: implementation of the CXyzDlg class.
// Above is accurate after rename & text-replace X-y-z-Dlg.cpp.txt
//
// X-y-z-Dlg.cpp.txt: template for C-X-y-z-Dlg class derived from ZDlg class.
// To convert to .cpp for new CWhateverDlg dialog class, rename a copy of this
// file to WhateverDlg.cpp, do text-replace X-y-z-Dlg (WITHOUT hyphens) to new
// WhateverDlg name, and replace IDD_XYZ with ID of new dialog resource.
// Also see X-y-z-Dlg.h.txt for corresponding actions.
//
//////////////////////////////////////////////////////////////////////

#include "Headers.h"
#include "resource.h"
#include "Settings.h"
#include "XyzDlg.h"

CXyzDlg * pXyzDlg; // Forward declaration for XyzDlgProc below

// Need this to be visible to Windows outside the CXyzDlg class.
BOOL XyzDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
	return pXyzDlg->OwnProc(hDlg, message, wParam, lParam);
}

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CXyzDlg::CXyzDlg(HINSTANCE hInst, CSettings * pSet, LPCTSTR sCapt1, LPCTSTR sCapt2,
                 ZWin * pOwner, ZWinAppData * pzwd)
	: ZDlg(hInst, sCapt1, sCapt2, pOwner, pzwd))
{
	ini = pSet;
	pXyzDlg = this;
	m_pProc = XyzDlgProc;
	m_uID = IDD_XYZ;
}

CXyzDlg::~CXyzDlg()
{

}

BOOL CXyzDlg::OwnProc(HWND hDlg, UINT uMsg, WPARAM wP, LPARAM lP)
{
	switch (uMsg)
	{
		// Insert DTAKEMSG(WM_WHATEVER, OnWhatever); except for WM_COMMAND

// Don't bitch about no cases in WM_COMMAND's switch(wP) (warning 4065)
#pragma warning(push)
#pragma warning(disable : 4065)
		case WM_COMMAND:
			switch(LOWORD(wP))
			{
				// Insert DTAKECMD(IDC_BN_ETC, OnEtc);

				default : break;

			} // END switch(LOWORD(wP))
// Restore settings in effect at warning(push) above
#pragma warning(pop)

		default : break;
	}

	// ZDlg already calls OnInitDialog, OnOK, OnCancel, or returns FALSE
	return ZDlg::OwnProc(hDlg, uMsg, wP, lP);
}


BOOL CXyzDlg::OnInitDialog()
{
	SendMessage(m_hWnd, WM_SETICON, TRUE,
							(LPARAM) LoadIcon(m_hInst, MAKEINTRESOURCE(IDI_MAIN)));




  // Change if you don't want CenterWnd and caption m_sCaptLong
  return ZDlg::OnInitDialog(); // always returns TRUE
} // BOOL CXyzDlg::OnInitDialog()

void CXyzDlg::OnOk()
{
	// Delete this function here and in .h if not adding anything

	ZDlg::OnOk();
}

// Uncomment if used. ZDlg virtual handlers will call these if declared
//void CXyzDlg::OnDestroy()
//{
//  // Delete here and in .h if no resources to free. Maybe use OnClose instead.
//  // ZDlg version does nothing, just for virtual WM_DESTROY handler in place.
//  // Windows' default handling happens after this.
//}

//void CXyzDlg::OnDestroy()
//{
//  // Delete here and in .h if no resources to free. Maybe use OnDestroy instead.
//  // ZDlg version does nothing, just for virtual WM_CLOSE handler in place.
//  // Windows' default handling happens after this.
//}


