Page 1 of 1
problematice on FWPPC help
Posted: Sat Jul 19, 2008 7:49 am
by xfood
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
Posted: Sat Jul 19, 2008 8:47 am
by Antonio Linares
xfood,
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
Posted: Sat Jul 19, 2008 8:54 am
by Antonio Linares
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
Posted: Sat Jul 19, 2008 8:56 am
by Antonio Linares
3. Don't create the index in the SD memory card. Copy your application to a Pocket PC folder and execute it there.
The SD memory card disk does not work properly always on the emulator.
Its a Windows Mobile emulator limitation.
Posted: Sat Jul 19, 2008 9:09 am
by Antonio Linares
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
Posted: Sat Jul 19, 2008 9:37 am
by xfood
thank you very much,
I try also 1 point
all others are ok
Posted: Sat Jul 19, 2008 9:50 am
by xfood
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
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
Posted: Sat Jul 19, 2008 10:43 am
by xfood
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 $<
Posted: Sat Jul 19, 2008 10:52 am
by xfood
hi,
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 $<
Posted: Sat Jul 19, 2008 10:57 am
by Enrico Maria Giordano
xfood wrote:hi,
removes only empty folders
how do I delete the folders full of files?
Just delete the files before. Use Directory() function to find all the file names.
EMG
Posted: Sat Jul 19, 2008 11:03 am
by xfood
HELLO,
you can have a function to FWPPC taking out the folder and all
files, including sub folders?
Many thanks to all
Posted: Sat Jul 19, 2008 6:28 pm
by Enrico Maria Giordano
xfood wrote:HELLO,
you can have a function to FWPPC taking out the folder and all
files, including sub folders?
Many thanks to all
This is for FWH. Try to port it to FWPPC.
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.
EMG
Posted: Mon Jul 21, 2008 5:39 pm
by xfood
scusami.
la funzione LRMDIR esiste un FWPPC?
Posted: Mon Jul 21, 2008 5:45 pm
by Enrico Maria Giordano
xfood wrote:scusami.
la funzione LRMDIR esiste un FWPPC?
It seems not. Please use the one wrote by Antonio above in this thread.
EMG
Posted: Wed Jul 23, 2008 8:15 pm
by xfood
thanks,
tried and ok works
p.s. a method for unzippare from FWPPC?
grazie,
provato e funziona ok
p.s. un metodo per unzippare da FWPPC?