mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-30 03:31:15 +00:00
Introduce common CDialog parent for CAboutDialog and CMainDialog
This commit is contained in:
parent
0a7e6f51d2
commit
ffd23424a6
@ -444,6 +444,7 @@ if (ISLE_BUILD_CONFIG)
|
|||||||
LEGO1/mxdirectx/mxdirect3d.cpp
|
LEGO1/mxdirectx/mxdirect3d.cpp
|
||||||
CONFIG/config.cpp
|
CONFIG/config.cpp
|
||||||
CONFIG/ConfigCommandLineInfo.cpp
|
CONFIG/ConfigCommandLineInfo.cpp
|
||||||
|
CONFIG/common.cpp
|
||||||
CONFIG/AboutDlg.cpp
|
CONFIG/AboutDlg.cpp
|
||||||
CONFIG/MainDlg.cpp
|
CONFIG/MainDlg.cpp
|
||||||
CONFIG/detectdx5.cpp
|
CONFIG/detectdx5.cpp
|
||||||
|
|||||||
@ -6,25 +6,14 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60)
|
|||||||
DECOMP_SIZE_ASSERT(CAboutDialog, 0x60)
|
DECOMP_SIZE_ASSERT(CAboutDialog, 0x60)
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00403c20
|
// FUNCTION: CONFIG 0x00403c20
|
||||||
CAboutDialog::CAboutDialog() : CDialog(IDD)
|
CAboutDialog::CAboutDialog() : CCommonDialog(IDD)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00403c90
|
|
||||||
void CAboutDialog::BeginModalState()
|
|
||||||
{
|
|
||||||
::EnableWindow(m_hWnd, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00403ca0
|
|
||||||
void CAboutDialog::EndModalState()
|
|
||||||
{
|
|
||||||
::EnableWindow(m_hWnd, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00403d20
|
// FUNCTION: CONFIG 0x00403d20
|
||||||
void CAboutDialog::DoDataExchange(CDataExchange* pDX)
|
void CAboutDialog::DoDataExchange(CDataExchange* pDX)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)
|
BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
#if !defined(AFX_ABOUTDLG_H)
|
#if !defined(AFX_ABOUTDLG_H)
|
||||||
#define AFX_ABOUTDLG_H
|
#define AFX_ABOUTDLG_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include "afxwin.h"
|
#include "afxwin.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "res/resource.h"
|
#include "res/resource.h"
|
||||||
|
|
||||||
// VTABLE: CONFIG 0x00406308
|
// VTABLE: CONFIG 0x00406308
|
||||||
// SIZE 0x60
|
// SIZE 0x60
|
||||||
class CAboutDialog : public CDialog {
|
class CAboutDialog : public CCommonDialog {
|
||||||
public:
|
public:
|
||||||
CAboutDialog();
|
CAboutDialog();
|
||||||
// Dialog Data
|
// Dialog Data
|
||||||
@ -22,8 +24,6 @@ class CAboutDialog : public CDialog {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void DoDataExchange(CDataExchange* pDX) override;
|
void DoDataExchange(CDataExchange* pDX) override;
|
||||||
void BeginModalState() override;
|
|
||||||
void EndModalState() override;
|
|
||||||
//}}AFX_VIRTUAL
|
//}}AFX_VIRTUAL
|
||||||
// void UpdateInterface();
|
// void UpdateInterface();
|
||||||
// void SwitchToAdvanced(BOOL p_advanced);
|
// void SwitchToAdvanced(BOOL p_advanced);
|
||||||
|
|||||||
@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60)
|
|||||||
DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
|
DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00403d50
|
// FUNCTION: CONFIG 0x00403d50
|
||||||
CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent)
|
CMainDialog::CMainDialog(CWnd* pParent) : CCommonDialog(IDD, pParent)
|
||||||
{
|
{
|
||||||
afxCurrentWinApp;
|
afxCurrentWinApp;
|
||||||
m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));
|
m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
#if !defined(AFX_MAINDLG_H)
|
#if !defined(AFX_MAINDLG_H)
|
||||||
#define AFX_MAINDLG_H
|
#define AFX_MAINDLG_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include "afxwin.h"
|
#include "afxwin.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "decomp.h"
|
#include "decomp.h"
|
||||||
@ -8,7 +10,7 @@
|
|||||||
|
|
||||||
// VTABLE: CONFIG 0x004063e0
|
// VTABLE: CONFIG 0x004063e0
|
||||||
// SIZE 0x70
|
// SIZE 0x70
|
||||||
class CMainDialog : public CDialog {
|
class CMainDialog : public CCommonDialog {
|
||||||
public:
|
public:
|
||||||
CMainDialog(CWnd* pParent);
|
CMainDialog(CWnd* pParent);
|
||||||
// Dialog Data
|
// Dialog Data
|
||||||
@ -23,8 +25,6 @@ class CMainDialog : public CDialog {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void DoDataExchange(CDataExchange* pDX) override;
|
void DoDataExchange(CDataExchange* pDX) override;
|
||||||
void BeginModalState() override {}
|
|
||||||
void EndModalState() override {}
|
|
||||||
//}}AFX_VIRTUAL
|
//}}AFX_VIRTUAL
|
||||||
void UpdateInterface();
|
void UpdateInterface();
|
||||||
void SwitchToAdvanced(BOOL p_advanced);
|
void SwitchToAdvanced(BOOL p_advanced);
|
||||||
|
|||||||
26
CONFIG/common.cpp
Normal file
26
CONFIG/common.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
|
||||||
|
// FUNCTION: CONFIG 0x00402ca0
|
||||||
|
void CSerializer::Serialize(CArchive& ar) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: CONFIG 0x00402cb0
|
||||||
|
void CSerializer::AssertValid() const {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: CONFIG 0x00402cc0
|
||||||
|
void CSerializer::Dump(CDumpContext& dc) const {
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: CONFIG 0x00403c90
|
||||||
|
void CCommonDialog::BeginModalState()
|
||||||
|
{
|
||||||
|
::EnableWindow(m_hWnd, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: CONFIG 0x00403ca0
|
||||||
|
void CCommonDialog::EndModalState()
|
||||||
|
{
|
||||||
|
::EnableWindow(m_hWnd, TRUE);
|
||||||
|
}
|
||||||
23
CONFIG/common.h
Normal file
23
CONFIG/common.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef AFX_COMMON_H
|
||||||
|
#define AFX_COMMON_H
|
||||||
|
|
||||||
|
#include <afxwin.h>
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
|
|
||||||
|
class CSerializer {
|
||||||
|
public:
|
||||||
|
void Serialize(CArchive& ar);
|
||||||
|
void AssertValid() const;
|
||||||
|
void Dump(CDumpContext& dc) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CCommonDialog : public CDialog {
|
||||||
|
public:
|
||||||
|
CCommonDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL) : CDialog(nIDTemplate, pParentWnd) { }
|
||||||
|
|
||||||
|
void BeginModalState() override;
|
||||||
|
void EndModalState() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user