Welcome Antonio
i have new xcommand
with command DEFINE WINDOW
Please view
*************************************
view full source
*******************************************
#include "FWCE.ch"
// new
#xcommand DEFINE WINDOW <oWnd> ;
[ TITLE <cTitle> ] ;
[ MENU <oMenu> ] ;
[ STYLE <nStyle> ] ;
[ MULTE <LStop> ];
=> ;
<oWnd> := ISRUN_OK( [<cTitle>], [<oMenu>], [<nStyle>] ,[<LStop>])
// *******************************************************
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "test is run " ;
MULTE .F.
// .F. TO RUN ONE COPY FROM PROGRAM UP SYSTEM OR .T. TO RUN ANY copy PROGRAM
ACTIVATE WINDOW oWnd
return nil
// ****************************************************
FUNC ISRUN_OK(cTitle,oMenu,nStyle,LStop)
LOCAL OWND_R
if STILLRUN(cTitle)=.t.
IF LStop<>NIL
IF LStop=.F.
QUIT
RETURN NIL
ENDIF
ENDIF
ENDIF
OWND_R:=TWindow():New(cTitle,oMenu,nStyle)
RETURN OWND_R
#pragma BEGINDUMP
#include <hbapi.h>
#include <Windows.h>
#include <mmsystem.h>
#include <uniqueid.h>
LPWSTR AnsiToWide( LPSTR );
HB_FUNC (STILLRUN)
{
HWND hWnd;
BOOL lRet = FALSE;
LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
hWnd = FindWindow ( NULL,pW);
if (hWnd)
{
SetForegroundWindow ((HWND) ((ULONG) hWnd |0x01));
lRet = TRUE;
}
hb_retl (lRet);
}
#pragma ENDDUMP
******************************
Please put all source with fwppc the library.
good work !
hathal