systray and shellexecute

systray and shellexecute

Postby Otto » Thu Jun 12, 2008 9:48 am

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
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Thu Jun 12, 2008 11:17 am

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
);
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Thu Jun 12, 2008 1:49 pm

Antonio,
thank you for your help.
Yes the parameters where wrong.

Regards,
Otto
User avatar
Otto
 
Posts: 6345
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests