X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fappli%2FbbStudio%2FbbStudio.cxx;h=26163a83eab127c1d401996589a449e88ae935aa;hb=72100b5cd3240189ea096777f4088e49c2120ca8;hp=4a00d22c35e82c046b0b3052aed9855868c29f08;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/kernel/appli/bbStudio/bbStudio.cxx b/kernel/appli/bbStudio/bbStudio.cxx index 4a00d22..26163a8 100644 --- a/kernel/appli/bbStudio/bbStudio.cxx +++ b/kernel/appli/bbStudio/bbStudio.cxx @@ -35,14 +35,25 @@ #include #include +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, _T("file1 [file2 [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, + { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, + { wxCMD_LINE_NONE } + }; +#else + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, "file1 [file2 [...]]", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, "h", "help", "Prints this help" }, + { wxCMD_LINE_SWITCH, "d", "debug", "Message all 9" }, + { wxCMD_LINE_NONE } + }; +#endif -static const wxCmdLineEntryDesc cmdLineDesc[] = -{ - { wxCMD_LINE_PARAM, NULL, NULL, _T("file1 [file2 [...]]"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, - { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, - { wxCMD_LINE_NONE } -}; @@ -132,7 +143,11 @@ bool wxBBIApp::OnInit( ) // you need to use the linker option "/subsystem:console" and the following code: int main(int argc, char* argv[]) { - return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); + // EED 2018-07-16 + char buffer[1500]; + wcstombs(buffer , ::GetCommandLine() , 1500 ); + return WinMain(::GetModuleHandle(NULL), NULL, buffer , SW_SHOWNORMAL); +// return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); } #endif // defined(_WIN32)