config: remove CCommonDialog, move mfc annotations to StdAfx.h (#544)

This commit is contained in:
Anonymous Maarten 2024-02-09 19:52:49 +01:00 committed by GitHub
parent 94c4576e8d
commit f1f4bd14c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 46 additions and 74 deletions

View file

@ -444,10 +444,10 @@ if (ISLE_BUILD_CONFIG)
LEGO1/mxdirectx/mxdirect3d.cpp
CONFIG/config.cpp
CONFIG/ConfigCommandLineInfo.cpp
CONFIG/common.cpp
CONFIG/AboutDlg.cpp
CONFIG/MainDlg.cpp
CONFIG/detectdx5.cpp
CONFIG/StdAfx.cpp
CONFIG/res/config.rc
)
target_compile_definitions(config PRIVATE _AFXDLL MXDIRECTX_FOR_CONFIG)

View file

@ -6,7 +6,7 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60)
DECOMP_SIZE_ASSERT(CAboutDialog, 0x60)
// FUNCTION: CONFIG 0x00403c20
CAboutDialog::CAboutDialog() : CCommonDialog(IDD)
CAboutDialog::CAboutDialog() : CDialog(IDD)
{
}

View file

@ -1,36 +1,23 @@
#if !defined(AFX_ABOUTDLG_H)
#define AFX_ABOUTDLG_H
#include "afxwin.h"
#include "common.h"
#include "StdAfx.h"
#include "compat.h"
#include "res/resource.h"
// VTABLE: CONFIG 0x00406308
// SIZE 0x60
class CAboutDialog : public CCommonDialog {
class CAboutDialog : public CDialog {
public:
CAboutDialog();
// Dialog Data
//{{AFX_DATA(CMainDialog)
enum {
IDD = IDD_ABOUT
};
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainDialog)
protected:
void DoDataExchange(CDataExchange* pDX) override;
//}}AFX_VIRTUAL
// void UpdateInterface();
// void SwitchToAdvanced(BOOL p_advanced);
// Implementation
protected:
//{{AFX_MSG(CMainDialog)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

View file

@ -1,12 +1,11 @@
#if !defined(AFX_CONFIGCOMMANDLINEINFO_H)
#define AFX_CONFIGCOMMANDLINEINFO_H
#include "StdAfx.h"
#include "compat.h"
#include "config.h"
#include "decomp.h"
#include <afxwin.h>
// VTABLE: CONFIG 0x004060e8
// SIZE 0x24
class CConfigCommandLineInfo : public CCommandLineInfo {

View file

@ -10,7 +10,7 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60)
DECOMP_SIZE_ASSERT(CMainDialog, 0x70)
// FUNCTION: CONFIG 0x00403d50
CMainDialog::CMainDialog(CWnd* pParent) : CCommonDialog(IDD, pParent)
CMainDialog::CMainDialog(CWnd* pParent) : CDialog(IDD, pParent)
{
afxCurrentWinApp;
m_icon = LoadIconA(AfxFindResourceHandle(MAKEINTRESOURCE(IDI_CONFIG), RT_GROUP_ICON), MAKEINTRESOURCE(IDI_CONFIG));

View file

@ -1,30 +1,22 @@
#if !defined(AFX_MAINDLG_H)
#define AFX_MAINDLG_H
#include "afxwin.h"
#include "common.h"
#include "StdAfx.h"
#include "compat.h"
#include "decomp.h"
#include "res/resource.h"
// VTABLE: CONFIG 0x004063e0
// SIZE 0x70
class CMainDialog : public CCommonDialog {
class CMainDialog : public CDialog {
public:
CMainDialog(CWnd* pParent);
// Dialog Data
//{{AFX_DATA(CMainDialog)
enum {
IDD = IDD_MAIN
};
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainDialog)
protected:
void DoDataExchange(CDataExchange* pDX) override;
//}}AFX_VIRTUAL
void UpdateInterface();
void SwitchToAdvanced(BOOL p_advanced);
@ -35,7 +27,6 @@ class CMainDialog : public CCommonDialog {
// Implementation
protected:
//{{AFX_MSG(CMainDialog)
BOOL OnInitDialog() override;
void OnSysCommand(UINT nID, LPARAM lParam);
void OnPaint();
@ -57,7 +48,7 @@ class CMainDialog : public CCommonDialog {
void OnButtonAdvanced();
void OnCheckboxDrawCursor();
void OnCheckboxMusic();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

5
CONFIG/StdAfx.cpp Normal file
View file

@ -0,0 +1,5 @@
// stdafx.cpp : source file that includes just the standard includes
// simple.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

31
CONFIG/StdAfx.h Normal file
View file

@ -0,0 +1,31 @@
#if !defined(AFX_STDAFX_H)
#define AFX_STDAFX_H
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxext.h> // MFC extensions
#include <afxwin.h> // MFC core and standard components
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#if 0
// FUNCTION: CONFIG 0x402ca0
// CObject::Serialize
// FUNCTION: CONFIG 0x402cb0
// CObject::AssertValid
// FUNCTION: CONFIG 0x402cc0
// CObject::Dump
// FUNCTION: CONFIG 0x00403c90
// CWnd::BeginModalState
// FUNCTION: CONFIG 0x00403ca0
// CWnd::EndModalState
#endif
#endif // !defined(AFX_STDAFX_H)

View file

@ -1,13 +0,0 @@
#include "common.h"
// FUNCTION: CONFIG 0x00403c90
void CCommonDialog::BeginModalState()
{
::EnableWindow(m_hWnd, FALSE);
}
// FUNCTION: CONFIG 0x00403ca0
void CCommonDialog::EndModalState()
{
::EnableWindow(m_hWnd, TRUE);
}

View file

@ -1,16 +0,0 @@
#ifndef AFX_COMMON_H
#define AFX_COMMON_H
#include "compat.h"
#include <afxwin.h>
class CCommonDialog : public CDialog {
public:
CCommonDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL) : CDialog(nIDTemplate, pParentWnd) {}
void BeginModalState() override;
void EndModalState() override;
};
#endif

View file

@ -1,10 +1,10 @@
#if !defined(AFX_CONFIG_H)
#define AFX_CONFIG_H
#include "StdAfx.h"
#include "compat.h"
#include "decomp.h"
#include <afxwin.h>
#include <d3d.h>
class MxDeviceEnumerate;

View file

@ -1,12 +0,0 @@
#ifdef 0
// FUNCTION: CONFIG 0x402ca0
// CObject::Serialize
// FUNCTION: CONFIG 0x402cb0
// CObject::AssertValid
// FUNCTION: CONFIG 0x402cc0
// CObject::Dump
#endif