Does someone have a sample with systray and shellexecute.
I inserted following code into testtray.prg of the fivewin samples.
Testdlg is executed but not shown.
MENUITEM "Testdlg" ACTION ( nRet:= Shellexecute(0,0,"c:\FWH\samples\test\testdlg.exe","c:\FWH\samples\test",1),msginfo(nRet))
MENUITEM "winexec" ACTION winexec ("c:\xwinhotel\xwinhotel.exe")
is working. But how can I setup the woring directory?
Thanks in advance
Otto
systray and shellexecute
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
It seems that you are not using the right parameters when calling ShellExecute:
HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);
It seems that you are not using the right parameters when calling ShellExecute:
HINSTANCE ShellExecute(
HWND hwnd, // handle to parent window
LPCTSTR lpOperation, // pointer to string that specifies operation to perform
LPCTSTR lpFile, // pointer to filename or folder name string
LPCTSTR lpParameters, // pointer to string that specifies executable-file parameters
LPCTSTR lpDirectory, // pointer to string that specifies default directory
INT nShowCmd // whether file is shown when opened
);