diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index edb85ea22..8f92d2864 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -3450,12 +3450,20 @@ long xvt_sys_execute(const char* cmdline, BOOLEAN sync, BOOLEAN iconizetask) if (iconizetask) { wxEnableTopLevelWindows(FALSE); +#ifdef WIN32 + ::PostMessage((HWND)_task_win->GetHWND(), WM_SYSCOMMAND, SC_MINIMIZE, 0L); +#else _task_win->Hide(); +#endif } exitcode = wxExecute(cmdline, wxEXEC_SYNC); if (iconizetask) { +#ifdef WIN32 + ::SendMessage((HWND)_task_win->GetHWND(), WM_SYSCOMMAND, SC_RESTORE, 0L); +#else _task_win->Show(); +#endif wxEnableTopLevelWindows(TRUE); _task_win->Raise(); } @@ -3503,7 +3511,7 @@ int xvt_sys_get_profile_string(const char* file, const char* paragraph, const ch const char* defval, char* value, int maxsize) { #ifdef WIN32 - int len = GetPrivateProfileString(paragraph, name, defval, value, maxsize, file); + int len = ::GetPrivateProfileString(paragraph, name, defval, value, maxsize, file); #else wxFileConfig ini("", "", file); @@ -3531,7 +3539,7 @@ BOOLEAN xvt_sys_set_profile_string(const char* file, const char* paragraph, cons const char* value) { #ifdef WIN32 - return WritePrivateProfileString(paragraph, name, value, file); + return ::WritePrivateProfileString(paragraph, name, value, file); #else wxFileConfig ini("", "", file); @@ -3543,16 +3551,15 @@ BOOLEAN xvt_sys_set_profile_string(const char* file, const char* paragraph, cons #endif } -BOOLEAN xvt_sys_find_editor(const char* file, char* editor, int editorsize) +BOOLEAN xvt_sys_find_editor(const char* file, char* editor) { - XVT_ASSERT(editor != NULL && editorsize > 0); BOOLEAN ok = FALSE; #ifdef WIN32 const wxString e = OsWin32_File2App(file); ok = !e.IsEmpty(); - if (ok) - strncpy(editor, e, editorsize); + if (ok && editor != NULL) + strcpy(editor, e); #else SORRY_BOX(); #endif diff --git a/xvaga/xvt.h b/xvaga/xvt.h index 49f7d48eb..8c20380ef 100755 --- a/xvaga/xvt.h +++ b/xvaga/xvt.h @@ -274,7 +274,7 @@ XVTDLL BOOLEAN xvt_sys_get_host_name(char* name, int maxlen); XVTDLL BOOLEAN xvt_sys_get_user_name(char* name, int maxlen); XVTDLL BOOLEAN xvt_sys_goto_url(const char* url, const char* action); XVTDLL BOOLEAN xvt_sys_dongle_server_is_running(); -XVTDLL BOOLEAN xvt_sys_find_editor(const char* file, char* editor, int editorsize); +XVTDLL BOOLEAN xvt_sys_find_editor(const char* file, char* editor); XVTDLL int xvt_sys_get_profile_string(const char* file, const char* paragraph, const char* name, const char* defval, char* value, int maxsize); XVTDLL BOOLEAN xvt_sys_set_profile_string(const char* file, const char* paragraph, const char* name,