blob: a65290bc8511c9348b413745b5a1df7331ccf39e [file] [log] [blame] [raw]
#include "stdafx.h"
#include <prsht.h>
#include <atlmisc.h>
#include <atlddx.h>
#include "resource.h"
#include "MainFrm.h"
#include "PropSheet.h"
//////////////////////////////////////////////////////////////////////
// Construction
CPropSheet::CPropSheet (_U_STRINGorID title, UINT uStartPage,
HWND hWndParent ) :
CPropertySheetImpl<CPropSheet> (title, uStartPage, hWndParent ), m_bCentered(false), lastPage(0)
{
m_psh.dwFlags |=
PSH_NOAPPLYNOW |
PSH_NOCONTEXTHELP;
//AddPage(propPageMachine);
AddPage(propPageAudio);
SendMessage(DM_SETDEFID, IDOK);
}
LRESULT CPropSheet::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
lastPage = GetActiveIndex();
return 0;
}
LRESULT CPropSheet::OnShowWindow(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled)
{
BOOL bShowing = (BOOL) wParam;
if (bShowing && !m_bCentered) {
m_bCentered = true;
CenterWindow(m_psh.hwndParent);
}
return 0;
}