View Single Post
Old 09-20-2019, 05:46 AM   #13
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

That is a shame. It would be really nice to have SWELL provide the appropriate dummy functions to be used in the Windows built.

I did some initial steps to dive in this issue:

I tried to compile the line
MessageBox(NULL,"hello world","a",0);
as found in \swell\test.cpp
Without using WDL at all.

I found that this can't be compiled in a Windows environment (for the Windows API). You either need to do
MessageBoxA(NULL,"hello world","a",0);
or
MessageBox(NULL,L"hello world",L"a",0);

Microsoft obviously did a great job to make programmers pull out all their hair

Instead of either keep the (ANSI-) functionality with the old API function name or have the compiler do wide char with "hello world", the messed up backwards compatibility completely when introducing wide char.

So obviously the SWELL syntax
MessageBox(NULL,L"hello world",L"a",0);
can't be used for windows.

Maybe inserting
#ifdef _WIN32
#define MessageBox MessageBoxA
#endif


or similar somewhere would suffice...
-Michael

Last edited by mschnell; 09-20-2019 at 05:55 AM.
mschnell is online now   Reply With Quote