From c3d8e7e1612620b0db47377088d43606b46b829d Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Mon, 21 Apr 2014 08:07:43 -0700 Subject: [PATCH] Add different SetText values to MaxCompat header. Restores compilation of Max 7 plugin, as its SetText expects a non-const pointer. Additionally, NotifyInfo should already be declared in notify.h. --- Sources/Tools/MaxComponent/plMultistageStage.cpp | 2 +- Sources/Tools/MaxMain/MaxCompat.h | 2 ++ Sources/Tools/MaxMain/plActionTableMgr.h | 1 - Sources/Tools/MaxMain/plComponentDlg.h | 8 -------- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Sources/Tools/MaxComponent/plMultistageStage.cpp b/Sources/Tools/MaxComponent/plMultistageStage.cpp index 847c6a00..cd81eec7 100644 --- a/Sources/Tools/MaxComponent/plMultistageStage.cpp +++ b/Sources/Tools/MaxComponent/plMultistageStage.cpp @@ -362,7 +362,7 @@ static void LoadCombo(HWND hCombo, NameType* nameInt, int size, int curVal) void plStandardStage::IInitDlg() { ICustEdit* edit = GetICustEdit(GetDlgItem(fDlg, IDC_ANIM_NAME)); - edit->SetText(fAnimName.c_str()); + edit->SetText(const_cast(fAnimName.c_str())); HWND hForward = GetDlgItem(fDlg, IDC_FORWARD_COMBO); LoadCombo(hForward, gForward, sizeof(gForward), fForward); diff --git a/Sources/Tools/MaxMain/MaxCompat.h b/Sources/Tools/MaxMain/MaxCompat.h index 2f1700f9..b557cafa 100644 --- a/Sources/Tools/MaxMain/MaxCompat.h +++ b/Sources/Tools/MaxMain/MaxCompat.h @@ -86,8 +86,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #if MAX_VERSION_MAJOR <= 10 // Max 2008 # define GETNAME_RETURN_TYPE TCHAR* +# define SETTEXT_VALUE_TYPE MCHAR* #else # define GETNAME_RETURN_TYPE const TCHAR* +# define SETTEXT_VALUE_TYPE const MCHAR* #endif // Old versions of Max define this as an integer, not a Class_ID diff --git a/Sources/Tools/MaxMain/plActionTableMgr.h b/Sources/Tools/MaxMain/plActionTableMgr.h index d15ce01a..4097c68b 100644 --- a/Sources/Tools/MaxMain/plActionTableMgr.h +++ b/Sources/Tools/MaxMain/plActionTableMgr.h @@ -50,7 +50,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class ActionCallback; struct ActionDescription; -struct NotifyInfo; typedef bool(*ActionCallbackFunc)(int); diff --git a/Sources/Tools/MaxMain/plComponentDlg.h b/Sources/Tools/MaxMain/plComponentDlg.h index 1b2862e9..d582fae3 100644 --- a/Sources/Tools/MaxMain/plComponentDlg.h +++ b/Sources/Tools/MaxMain/plComponentDlg.h @@ -44,14 +44,6 @@ class Class_ID; class Interface; class plMaxNode; -#include -#if MAX_VERSION_MAJOR >= 9 - struct NotifyInfo; -#else - // Max headers are more minimalistic in pre-9 maxes -# include -#endif - class plComponentDlg { protected: