problematice on FWPPC help
problematice on FWPPC help
Hello,
I wanted to ask things:
1) on windows mobile 6 if the x stopper of a dialog
I closed the program?
instead on wincee works only closes the dialog concerned
2) the possibility exists to hide the key of x
Dialog?
3) with the emulator to me by an error in the creation file index
4) there is the possibility in FWPPC to delete a folder?
Thank you in advance
I wanted to ask things:
1) on windows mobile 6 if the x stopper of a dialog
I closed the program?
instead on wincee works only closes the dialog concerned
2) the possibility exists to hide the key of x
Dialog?
3) with the emulator to me by an error in the creation file index
4) there is the possibility in FWPPC to delete a folder?
Thank you in advance
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
xfood,
1: Try this example and you will see that closing the dialog, the excution continues normally:
1: Try this example and you will see that closing the dialog, the excution continues normally:
Code: Select all
#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
ACTIVATE DIALOG oDlg CENTERED
MsgInfo( "execution continues" )
return nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
2. Removing the "x":
Code: Select all
#include "fwce.ch"
#define WS_POPUP 0x80000000
#define WS_VISIBLE 0x10000000
#define WS_BORDER 0x00800000
#define WS_DLGFRAME 0x00400000
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100 STYLE nOr( WS_POPUP, WS_VISIBLE, WS_BORDER, WS_DLGFRAME )
ACTIVATE DIALOG oDlg CENTERED
MsgInfo( "execution continues" )
return nil
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
4.
Code: Select all
#include "fwce.ch"
function Main()
local oDlg
DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100
@ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) )
@ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) )
ACTIVATE DIALOG oDlg CENTERED
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
LPWSTR AnsiToWide( char * );
HB_FUNC( RMDIR )
{
LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
hb_retl( RemoveDirectory( pW ) );
hb_xfree( pW );
}
#pragma ENDDUMP
mi da questo errore
Creating library Menu_gen.lib and object Menu_gen.exp
Menu_gen.obj : error LNK2019: unresolved external symbol "unsigned short * __cdecl AnsiToWide(char *)" (?AnsiToWide@@YAPAGPAD@Z) referenced in function HB_FUN_RMDIR
Menu_gen.exe : fatal error LNK1120: 1 unresolved externals
Creating library Menu_gen.lib and object Menu_gen.exp
Menu_gen.obj : error LNK2019: unresolved external symbol "unsigned short * __cdecl AnsiToWide(char *)" (?AnsiToWide@@YAPAGPAD@Z) referenced in function HB_FUN_RMDIR
Menu_gen.exe : fatal error LNK1120: 1 unresolved externals
Antonio Linares wrote:4.Code: Select all
#include "fwce.ch" function Main() local oDlg DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100 @ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) ) @ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) ) ACTIVATE DIALOG oDlg CENTERED return nil #pragma BEGINDUMP #include <hbapi.h> #include <windows.h> LPWSTR AnsiToWide( char * ); HB_FUNC( RMDIR ) { LPWSTR pW = AnsiToWide( hb_parc( 1 ) ); hb_retl( RemoveDirectory( pW ) ); hb_xfree( pW ); } #pragma ENDDUMP
Creating library Menu_gen.lib and object Menu_gen.exp
Menu_gen.obj : error LNK2019: unresolved external symbol "unsigned short * __cdecl AnsiToWide(char *)" (?AnsiToWide@@YAPAGPAD@Z) referenced in function HB_FUN_RMDIR
Menu_gen.exe : fatal error LNK1120: 1 unresolved externals
nmake -fMenu_gen.mak
FILE MENU_GEN.MAK
#Microsoft make sample for FWPPC, (c) FiveTech Software 2005
HBDIR=c:\harbour_ce
VCDIR=c:\vce
FWDIR=c:\fwppc
.SUFFIXES: .prg .c .obj .rc .res
Menu_gen.exe : Menu_gen.obj Gestmenu.obj Lavoro.obj Menu_gen.res
echo Menu_gen.obj gestmenu.obj Lavoro.obj> msvc.tmp
echo $(FWDIR)\lib\FiveCE.lib $(FWDIR)\lib\FiveCEC.lib >> msvc.tmp
echo $(HBDIR)\lib\rtl.lib >> msvc.tmp
echo $(HBDIR)\lib\vm.lib >> msvc.tmp
echo $(HBDIR)\lib\gtgui.lib >> msvc.tmp
echo $(HBDIR)\lib\lang.lib >> msvc.tmp
echo $(HBDIR)\lib\macro.lib >> msvc.tmp
echo $(HBDIR)\lib\rdd.lib >> msvc.tmp
echo $(HBDIR)\lib\dbfntx.lib >> msvc.tmp
echo $(HBDIR)\lib\dbfcdx.lib >> msvc.tmp
echo $(HBDIR)\lib\dbffpt.lib >> msvc.tmp
echo $(HBDIR)\lib\hbsix.lib >> msvc.tmp
echo $(HBDIR)\lib\debug.lib >> msvc.tmp
echo $(HBDIR)\lib\common.lib >> msvc.tmp
echo $(HBDIR)\lib\pp.lib >> msvc.tmp
echo $(HBDIR)\lib\codepage.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\coredll.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\corelibc.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\aygshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ws2.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\mfcce400.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ole32.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ceshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\commctrl.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\zlibce.lib >> msvc.tmp
IF EXIST menu_gen.res echo menu_gen.res >> msvc.tmp
SET LIB=$(VCDIR)\lib
$(VCDIR)\bin\link @msvc.tmp /nologo /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM > link.log
@type link.log
@del menu_gen.c
@del Gestmenu.c
@del Lavoro.c
@del msvc.tmp
Menu_gen.obj : Menu_gen.c
gestmenu.obj : Gestmenu.c
Lavoro.obj : Lavoro.c
Menu_gen.c : Menu_gen.prg
gestmenu.c : gestmenu.prg
Lavoro.c : Lavoro.prg
Menu_gen.res : Menu_gen.rc
$(VCDIR)\bin\rc -r Menu_gen.rc
.prg.c:
$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include
.c.obj:
$(VCDIR)\bin\clarm -TP -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
Menu_gen.obj : error LNK2019: unresolved external symbol "unsigned short * __cdecl AnsiToWide(char *)" (?AnsiToWide@@YAPAGPAD@Z) referenced in function HB_FUN_RMDIR
Menu_gen.exe : fatal error LNK1120: 1 unresolved externals
nmake -fMenu_gen.mak
FILE MENU_GEN.MAK
#Microsoft make sample for FWPPC, (c) FiveTech Software 2005
HBDIR=c:\harbour_ce
VCDIR=c:\vce
FWDIR=c:\fwppc
.SUFFIXES: .prg .c .obj .rc .res
Menu_gen.exe : Menu_gen.obj Gestmenu.obj Lavoro.obj Menu_gen.res
echo Menu_gen.obj gestmenu.obj Lavoro.obj> msvc.tmp
echo $(FWDIR)\lib\FiveCE.lib $(FWDIR)\lib\FiveCEC.lib >> msvc.tmp
echo $(HBDIR)\lib\rtl.lib >> msvc.tmp
echo $(HBDIR)\lib\vm.lib >> msvc.tmp
echo $(HBDIR)\lib\gtgui.lib >> msvc.tmp
echo $(HBDIR)\lib\lang.lib >> msvc.tmp
echo $(HBDIR)\lib\macro.lib >> msvc.tmp
echo $(HBDIR)\lib\rdd.lib >> msvc.tmp
echo $(HBDIR)\lib\dbfntx.lib >> msvc.tmp
echo $(HBDIR)\lib\dbfcdx.lib >> msvc.tmp
echo $(HBDIR)\lib\dbffpt.lib >> msvc.tmp
echo $(HBDIR)\lib\hbsix.lib >> msvc.tmp
echo $(HBDIR)\lib\debug.lib >> msvc.tmp
echo $(HBDIR)\lib\common.lib >> msvc.tmp
echo $(HBDIR)\lib\pp.lib >> msvc.tmp
echo $(HBDIR)\lib\codepage.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\coredll.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\corelibc.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\aygshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ws2.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\mfcce400.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ole32.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\ceshell.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\commctrl.lib >> msvc.tmp
echo $(VCDIR)\lib\arm\zlibce.lib >> msvc.tmp
IF EXIST menu_gen.res echo menu_gen.res >> msvc.tmp
SET LIB=$(VCDIR)\lib
$(VCDIR)\bin\link @msvc.tmp /nologo /SUBSYSTEM:WINDOWSCE,4.20 /MACHINE:ARM > link.log
@type link.log
@del menu_gen.c
@del Gestmenu.c
@del Lavoro.c
@del msvc.tmp
Menu_gen.obj : Menu_gen.c
gestmenu.obj : Gestmenu.c
Lavoro.obj : Lavoro.c
Menu_gen.c : Menu_gen.prg
gestmenu.c : gestmenu.prg
Lavoro.c : Lavoro.prg
Menu_gen.res : Menu_gen.rc
$(VCDIR)\bin\rc -r Menu_gen.rc
.prg.c:
$(HBDIR)\bin\harbour $< /n /i$(FWDIR)\include;$(HBDIR)\include
.c.obj:
$(VCDIR)\bin\clarm -TP -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
hi,
removes only empty folders
how do I delete the folders full of files?
the problem of compiling I resolved
modifying this line
does not work
$(VCDIR)\bin\clarm -TP -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
works OK
$(VCDIR)\bin\clarm -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
removes only empty folders
how do I delete the folders full of files?
Antonio Linares wrote:4.Code: Select all
#include "fwce.ch" function Main() local oDlg DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100 @ 1, 1 BUTTON "Create folder" SIZE 50, 10 ACTION MsgInfo( lMkDir( CurDir() + "\a_folder" ) ) @ 2, 1 BUTTON "Remove it" SIZE 50, 10 ACTION MsgInfo( RmDir( CurDir() + "\a_folder" ) ) ACTIVATE DIALOG oDlg CENTERED return nil #pragma BEGINDUMP #include <hbapi.h> #include <windows.h> LPWSTR AnsiToWide( char * ); HB_FUNC( RMDIR ) { LPWSTR pW = AnsiToWide( hb_parc( 1 ) ); hb_retl( RemoveDirectory( pW ) ); hb_xfree( pW ); } #pragma ENDDUMP
the problem of compiling I resolved
modifying this line
does not work
$(VCDIR)\bin\clarm -TP -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
works OK
$(VCDIR)\bin\clarm -W3 -c /DARM /DUNICODE /I$(HBDIR)\include /I$(VCDIR)\include\arm $<
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
This is for FWH. Try to port it to FWPPC.xfood wrote:HELLO,
you can have a function to FWPPC taking out the folder and all
files, including sub folders?
Many thanks to all
Code: Select all
#include "Fivewin.ch"
#include "Directry.ch"
FUNCTION MAIN()
? LMKDIR( "TEST" )
? MEMOWRIT( "TEST\TEST.TXT", "This is a test" )
? DELETEDIR( "TEST" )
RETURN NIL
FUNCTION DELETEDIR( cDir )
LOCAL aDir, cName
LOCAL i
aDir = DIRECTORY( cDir + "\*.*", "HRD" )
FOR i = 1 TO LEN( aDir )
cName = aDir[ i, F_NAME ]
IF cName == "."; LOOP; ENDIF
IF cName == ".."; LOOP; ENDIF
cName = cDir + "" + cName
IF "D" $ aDir[ i, F_ATTR ]
IF !DELETEDIR( cName )
RETURN .F.
ENDIF
ELSE
IF FERASE( cName ) = -1
? "Impossibile cancellare il file " + cName + "."
RETURN .F.
ENDIF
ENDIF
NEXT
IF !LRMDIR( cDir )
? "Impossibile cancellare la cartella " + cDir + "."
RETURN .F.
ENDIF
RETURN .T.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact: