|
From: Ioannis V. <no...@ho...> - 2003-03-02 21:32:13
|
-------Original Message-------=0D =0D From: Per Westermark=0D Date: =CA=F5=F1=E9=E1=EA=DE, 2 =CC=DC=F1=F4=E9=EF=F2 2003 11:14:56 =EC=EC= =0D To: Ioannis Vranos=0D Cc: Dev-C++ Mailing List=0D Subject: Re: [Dev-C++] WinMain()=0D =0D I haven't done a lot of work with Developer Studio .NET, so I can't say=0D about your problem with a console + GUI but anyway...=0D =0D The original main() only takes 8-bit characters as parameters, making it=0D unsuitable for unicode programs.=0D =0D To better support unicode, you now get a=0D int _tmain(int argc, _TCHAR* argv[]);=0D =0D where _tmain will conditionally compile to=0D int main(int argc,char* argv[]);=0D or=0D int wmain(int argc,wchar_t* argv[]);=0D depending on if you compile your program with _UNICODE defined.=0D =0D =0D =3D=3D> Ok got it. However there are both tmain() and _tmain(). Anyway i = do not care. They could do with a system extension of main taking int, wchar_t *= or whatever.=0D =0D =0D I can't say what difference it is between tmain() and _tmain(). I only=0D have a DevStudio 6.0 in front of me right now, and it only have the _tmai= n=0D declaration.=0D =0D Normally, it is a question of linker flags if the program expects to find= =0D a main() or a WinMain(), where main() is expected for console=0D apptiocations and WinMain() for GUI applications.=0D =0D =0D =3D=3D> In VC++ .NET all get compiled. You can compile a GUI with main().= The natural problem is that a console runs behind and the default for a manag= ed application is tmain(). Naturally managed can be also a console one so i = do not find it strange. The strange thing is that for GUI the only option available is Win32 project. Anyway i "stole" its WinMain and placed it in the managed project. The int __stdcall WinMain() is a valid signature for Win32? (just from curiosity).=0D =0D I have had a couple of DevStudio 6 projects goof up quite a lot when=0D letting DevStudio upgrade them to DevStudio.NET. A number of compiler and= =0D linker settings have become quite interesting :-)=0D =0D =0D =3D=3D> Concerning .NET it is really very convenient.=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |