X11 has NO native GUI library. Learn wxWidgets and use it on all three platforms. It will handle the interface to Win32 and Quartz for you.
+1
A:
Ignacio Vazquez-Abrams
2010-10-20 02:30:12
wxWidgets not native too.. you need to add the wxWidgets dll to the EXE to be run, that mean not small in size ^_^
Freeseif
2010-10-20 02:34:56
My time is usually worth *far* more than the customer's download bandwidth or hard drive space.
Ignacio Vazquez-Abrams
2010-10-20 02:36:13
yes you are right, some kilobytes added to the application is not a problem, you think wxWidgets is best ? or gtkmm ? GTK+ ?
Freeseif
2010-10-20 02:38:53
There is no complete native port of GTK+ for Quartz yet, so don't bother considering it at this time.
Ignacio Vazquez-Abrams
2010-10-20 02:42:13
+6
A:
Or Qt. Not 'native' but neither is MFC, WPF, Silverlight ....
Martin Beckett
2010-10-20 02:31:45
I prefer it to wx but I didn't want to start a war! wx has a slightly more flexible license if that matters to you.
Martin Beckett
2010-10-20 02:50:11
+1 for Qt. We are using it for a large Windows, Mac and Linux app and it's brilliant.
Rob
2010-10-20 09:03:02
A:
Windows API:
#undef UNICODE
#define UNICODE
#include <windows.h>
int main()
{
MessageBox(
0,
L"اهلا بالعالم",
L"Hello World in Arabic !",
MB_ICONINFORMATION | MB_SETFOREGROUND
);
}
Building with MinGW g++ (producing a.exe
):
C:\test> g++ --version | find "++" g++
(TDM-2 mingw32) 4.4.1C:\test> g++ -O -pedantic -std=c++98 -Wall -Wwrite-strings -Wno-long-long -mwindows x.cpp
C:\test> _
Building with Visual C++ (producing x.exe
):
C:\test> (cl /nologo- 2>&1) | find "++"
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86C:\test> cl /nologo /EHsc /GR /Zc:forScope,wchar_t /W4 x.cpp /link user32.lib /subsystem:windows /entry:mainCRTStartup
x.cppC:\test> _
I think this is fairly "complete", but it's unclear what "complete" means.
Anyway, hth.
Alf P. Steinbach
2010-10-20 03:59:38
Thank you Steinbach, i added a window to your code its solved my problem about Windows, but what about Linux and Mac ?! ^_^
Freeseif
2010-10-20 13:52:28