ShellExecute does not open in a window

ShellExecute does not open in a window

Postby albeiroval » Wed May 09, 2018 5:54 pm

Hello everyone,

I need to use shellexecute to open an outlook application or an html file and assign it to a window,
but what it does is open the application or the html file in a new window.
I am using this code

Code: Select all  Expand view

#include "fivewin.ch"

//------------------------------------//

#define SW_HIDE                         0      
#define SW_SHOWNORMAL           1      
#define SW_SHOWMINIMIZED        2      
#define SW_MAXIMIZE                 3  
#define SW_SHOWMAXIMIZED        3      
#define SW_SHOWNOACTIVATE   4      
#define SW_MINIMIZE                 6      
#define SW_SHOWMINNOACTIVE  7      
#define SW_SHOWNA                   8  
#define SW_RESTORE                  9      
#define SW_SHOW                       5    
#define SW_SHOWDEFAULT       10  

//------------------------------------//

Function Main()
    Local oWnd
    Local cTitle := "Main Principal"
    Local cURL   := "mailto:email@domain.com" // cFilePath( GetModuleFilename( GetInstance() ) ) + "btkserver.htm"
       
    DEFINE WINDOW oWnd TITLE cTitle
         
    ACTIVATE WINDOW oWnd;
        MAXIMIZED;
        ON INIT ShellExecute( oWnd:hWnd, "open", cURL,,, SW_RESTORE )

    // ShellExecute( GetActiveWindow(), "open", cURL,,, SW_RESTORE )
       
Return Nil  

 
 
Saludos,
Regards,

Albeiro Valencia
www.avcsistemas.com
User avatar
albeiroval
 
Posts: 370
Joined: Tue Oct 16, 2007 5:51 pm
Location: Barquisimeto - Venezuela

Re: ShellExecute does not open in a window

Postby karinha » Wed May 09, 2018 7:41 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7813
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests