#pragma once

#include "BkResizableDialogST.h"
#include "ResourceServerST.h"
#include "XPStyleButtonST.h"
#include "BlendedButtonST.h"
#include "BlendedStaticST.h"
#include "StaticST.h"
#include "ListBoxST.h"
#include "ThemeHelperST.h"
#include "RegistryST.h"
#include "FullScreenST.h"
#include "Icons.h"
#include "Hyperlink.h"
#include "PageManagerST.h"
#include "DlgAbout.h"
#include "DlgBasic.h"
#include "DlgAdvanced.h"
#include "DlgTransparent.h"
#include "DlgShadeButtonST.h"
#include "DlgDerived.h"
#include "DlgXPStyleButtonST.h"
#include "DlgLifeCakeButtonST.h"
#include "DlgWinXPButtonST.h"
#include "DlgBlendedButtonST.h"
#include "DlgStaticST.h"
#include "DlgBlendedStaticST.h"
#include "DlgClockST.h"
#include "DlgFileDialogST.h"
#include "DlgProgressCtrlST.h"
#include "DlgListBoxST.h"
#include "DlgListBoxColorPickerST.h"
#include "DlgLayeredWindowHelperST.h"
#include "DlgDigitST.h"

#ifdef	CHECK_ICONSDLL_VERSION
#include "verinfo.h"
#endif

class CGenericBkMFCDlg : public CBkResizableDialogST
{
public:
	CGenericBkMFCDlg(CWnd* pParent = nullptr);

#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_GENERICBKMFC_DIALOG };
#endif

protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	virtual void DoDataExchange(CDataExchange* pDX);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnSelChangeLbxST();
	afx_msg void OnBnClickedBtnfullscreen();

private:
	void OnPostEraseBkgnd(CDC* pDC);
	DWORD LoadIconsDLL(CResourceServerST* pIconsDLL, LPCTSTR lpszReqVersion);
	BOOL NotifyIconsNotFound(LPCTSTR lpszReqVersion);
	BOOL NotifyIconsVersionMismatch(LPCTSTR lpszReqVersion);

	LRESULT On_PageActivationCallback(WPARAM wParam, LPARAM lParam);
	void CreateImageList();
	BOOL CreatePages();
	void ResizeCurrentPage();

	CStatic				m_stcPlaceHolder;
	CStaticST			m_stcTitle;
	CFont				m_fntFont;

	CPageManagerST		m_Pages;
	CImageList			m_ImageList;
	CListBoxST			m_lbxListBox;

	CThemeHelperST		m_Theme;
	CXPStyleButtonST	m_btnExit;
	CXPStyleButtonST	m_btnFullScreen;

	CResourceServerST	m_IconsDLL;
	CRegistryST			m_Registry;
	CFullScreenST		m_FullScreen;

	CHyperLink			m_EMailLink;
	CHyperLink			m_HomePageLink;

	DECLARE_MESSAGE_MAP()
};
