problematice on FWPPC help

problematice on FWPPC help

Postby xfood » Sat Jul 19, 2008 7:49 am

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
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby Antonio Linares » Sat Jul 19, 2008 8:47 am

xfood,

1: Try this example and you will see that closing the dialog, the excution continues normally:
Code: Select all  Expand view
#include "fwce.ch"

function Main()

   local oDlg

   DEFINE DIALOG oDlg TITLE "Test" SIZE 200, 100

   ACTIVATE DIALOG oDlg CENTERED

   MsgInfo( "execution continues" )

return nil
regards, saludos

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

Postby Antonio Linares » Sat Jul 19, 2008 8:54 am

2. Removing the "x":
Code: Select all  Expand view
#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
regards, saludos

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

Postby Antonio Linares » Sat Jul 19, 2008 8:56 am

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.
regards, saludos

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

Postby Antonio Linares » Sat Jul 19, 2008 9:09 am

4.
Code: Select all  Expand view
#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   
regards, saludos

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

Postby xfood » Sat Jul 19, 2008 9:37 am

thank you very much,

I try also 1 point
all others are ok
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby xfood » Sat Jul 19, 2008 9:50 am

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  Expand view
#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   
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby xfood » Sat Jul 19, 2008 10:43 am

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 $<
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby xfood » Sat Jul 19, 2008 10:52 am

hi,
removes only empty folders
how do I delete the folders full of files?


Antonio Linares wrote:4.
Code: Select all  Expand view
#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 $<
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby Enrico Maria Giordano » Sat Jul 19, 2008 10:57 am

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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby xfood » Sat Jul 19, 2008 11:03 am

HELLO,
you can have a function to FWPPC taking out the folder and all
files, including sub folders?
Many thanks to all
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby Enrico Maria Giordano » Sat Jul 19, 2008 6:28 pm

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  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby xfood » Mon Jul 21, 2008 5:39 pm

scusami.
la funzione LRMDIR esiste un FWPPC?
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm

Postby Enrico Maria Giordano » Mon Jul 21, 2008 5:45 pm

xfood wrote:scusami.
la funzione LRMDIR esiste un FWPPC?


It seems not. Please use the one wrote by Antonio above in this thread.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby xfood » Wed Jul 23, 2008 8:15 pm

thanks,
tried and ok works :lol: :lol: :lol: :lol:

p.s. a method for unzippare from FWPPC?





grazie,
provato e funziona ok :lol: :lol: :lol:

p.s. un metodo per unzippare da FWPPC?
xfood
 
Posts: 96
Joined: Tue Jun 17, 2008 9:02 pm


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 25 guests