Welp, congrats you've ran into one of the atrocious issues with using macros (It's not your fault, it's Microsoft's fault).
Are you #including <windows.h> (or <winuser.h>) somewhere before you define either your class or your function call? First step would be to avoid #including <windows.h> in that file, unless you have to.
If you can't avoid that, try doing
#ifdef GetMessage
#undef GetMessage
#endif
before any reference to your "GetMessage" function.
If none of that works, you might just need to change your side of the code to conform to Microsoft's code (don't name something as a macro that already exists).
rename your function if possible.
you can also try a namespace on yours (possibly, the classname:: is good enough?)
you can also add a bogus parameter to yours (int x = 0) to see if that is good enough to allow an overload
Yes, I need the windows.h stuff.
undefining their stuff doesn't sound desirable. Either I use windows.h or not.
I already have a namespace for my code, but that doesn't seem to matter.
objMyClass->GetMessage(); // Where goes the namespace?
objMyClass->MyClass::GetMessage(); // Doesn't work.
Hmm, seems renaming my function is the best option.