Improve MSVC6 hacks
This commit is contained in:
parent
c6b77fb015
commit
76e4fb5e8a
4 changed files with 18 additions and 13 deletions
|
@ -17,7 +17,7 @@ static const char *version_string =
|
|||
;
|
||||
|
||||
// TODO - Inaccurate stack frame
|
||||
INT_PTR CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
DLGPROC_RET CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char string_buffer[104];
|
||||
|
||||
|
@ -58,7 +58,7 @@ INT_PTR CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
DLGPROC_RET CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
(void)lParam;
|
||||
|
||||
|
@ -102,7 +102,7 @@ INT_PTR CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
DLGPROC_RET CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
char string[100];
|
||||
|
||||
|
@ -135,7 +135,7 @@ INT_PTR CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
DLGPROC_RET CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (Msg)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "WindowsWrapper.h"
|
||||
|
||||
INT_PTR CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
INT_PTR CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
DLGPROC_RET CALLBACK VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
DLGPROC_RET CALLBACK DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
DLGPROC_RET CALLBACK DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
DLGPROC_RET CALLBACK QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
|
|
|
@ -676,12 +676,12 @@ LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar
|
|||
switch (LOWORD(wParam))
|
||||
{
|
||||
case 40001:
|
||||
if (DialogBoxParamA(ghInstance, "DLG_YESNO", hWnd, (DLGPROC)QuitDialog, (LPARAM)"Quit?") == 1)
|
||||
if (DialogBoxParamA(ghInstance, "DLG_YESNO", hWnd, QuitDialog, (LPARAM)"Quit?") == 1)
|
||||
PostMessageA(hWnd, WM_CLOSE, 0, 0);
|
||||
break;
|
||||
|
||||
case 40002:
|
||||
DialogBoxParamA(ghInstance, "DLG_ABOUT", hWnd, (DLGPROC)VersionDialog, 0);
|
||||
DialogBoxParamA(ghInstance, "DLG_ABOUT", hWnd, VersionDialog, 0);
|
||||
break;
|
||||
|
||||
case 40004:
|
||||
|
@ -690,11 +690,11 @@ LRESULT CALLBACK WindowProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPar
|
|||
break;
|
||||
|
||||
case 40005:
|
||||
DialogBoxParamA(ghInstance, "DLG_SAVE", hWnd, (DLGPROC)DebugSaveDialog, 0);
|
||||
DialogBoxParamA(ghInstance, "DLG_SAVE", hWnd, DebugSaveDialog, 0);
|
||||
break;
|
||||
|
||||
case 40007:
|
||||
DialogBoxParamA(ghInstance, "DLG_MUTE", hWnd, (DLGPROC)DebugMuteDialog, 0);
|
||||
DialogBoxParamA(ghInstance, "DLG_MUTE", hWnd, DebugMuteDialog, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <windows.h>
|
||||
|
||||
// Visual Studio 6 is missing these, so define them here
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1200
|
||||
#ifndef VK_OEM_PLUS
|
||||
#define VK_OEM_PLUS 0xBB
|
||||
#endif
|
||||
|
@ -23,4 +23,9 @@
|
|||
#ifndef DWORD_PTR
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
|
||||
// DLGPROC went from returning BOOL to INT_PTR in later versions, and VC6 doesn't like that
|
||||
#define DLGPROC_RET BOOL
|
||||
#else
|
||||
#define DLGPROC_RET INT_PTR
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue