diff options
author | Stephan Schäfer <ssa@openoffice.org> | 2001-05-04 14:11:14 +0000 |
---|---|---|
committer | Stephan Schäfer <ssa@openoffice.org> | 2001-05-04 14:11:14 +0000 |
commit | 6d73250ab44cffcff87084f6ef84cc871e99b54a (patch) | |
tree | f5c4e3a71ef71ec8f352245a8a7a60ef5359d64e /sysui/source/win32/QuickStart | |
parent | 0c8a7ec5f5a113d37632206af8605ff8a18792db (diff) |
use fullpath to start soffice
Diffstat (limited to 'sysui/source/win32/QuickStart')
-rw-r--r-- | sysui/source/win32/QuickStart/QuickStart.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sysui/source/win32/QuickStart/QuickStart.cpp b/sysui/source/win32/QuickStart/QuickStart.cpp index d473043b9646..16c91ab0ed27 100644 --- a/sysui/source/win32/QuickStart/QuickStart.cpp +++ b/sysui/source/win32/QuickStart/QuickStart.cpp @@ -43,8 +43,18 @@ bool launchSoffice( ) { if ( !SofficeRuns() ) { - UINT ret = WinExec( "h:\\office60.630b\\program\\swriter.exe -bean", SW_SHOW ); -// UINT ret = WinExec( "swriter.exe -bean", SW_SHOW ); // looks in the same directory + // UINT ret = WinExec( "h:\\office60.630b\\program\\swriter.exe -bean", SW_SHOW ); + char filename[_MAX_PATH + 1]; + GetModuleFileName( NULL, filename, _MAX_PATH ); // soffice resides in the same dir + char *p = strrchr( filename, '\\' ); + if ( !p ) + return false; + strcpy( p+1, "swriter.exe" ); + + char imagename[_MAX_PATH + 1]; + wsprintf(imagename, "\"%s\" -bean", filename ); + + UINT ret = WinExec( imagename, SW_SHOW ); if ( ret < 32 ) return false; @@ -166,7 +176,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance) wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_QUICKSTART); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); - wcex.lpszMenuName = (LPCSTR)IDC_QUICKSTART; + wcex.lpszMenuName = NULL; wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); |