FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC Save2Bmp
Posts: 58
Joined: Fri Oct 07, 2005 06:30 AM
Save2Bmp
Posted: Sat Aug 26, 2006 12:57 PM
I would want to save a bitmap with this function:

Function Save2Bmp( cFile )

   LOCAL hBmp, hDib

   DEFAULT cFile := CurDir() + "\Graph.Bmp"

   hBmp := WndBitmap( oWnd:hWnd )
   hDib := DibFromBitmap( hBmp )

   DibWrite( cFile, hDib )
   GloBalFree( hDib )
   DeleteObject( hBmp )

RETURN ( nil )


but I obtain this error:

myprg.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_GLOBALFREE(void)" (?HB_FUN_GLOBALFREE@@YAXXZ)
myprg.obj : error LNK2001: unresolved external symbol "void __cdecl HB_FUN_WNDBITMAP(void)" (?HB_FUN_WNDBITMAP@@YAXXZ)

GlobalFree and WndBitmap functions are included in FWPPC?

Regards,
Pier Luigi
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Save2Bmp
Posted: Sat Aug 26, 2006 09:44 PM

Pier,

The problem is that Windows Mobile does not implement GetDIBits() which it is used from DibFromBitmap().

We are trying to implement a replacement for it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Fri Oct 07, 2005 06:30 AM
Save2Bmp
Posted: Sun Aug 27, 2006 07:12 AM

Many thanks.

Regards,
Pier Luigi

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Save2Bmp
Posted: Sun Sep 10, 2006 07:12 AM
Pier Luigi,

We have already implemented support to save any window or control as a BMP file.
#include "FWCE.ch"

function Main()

   DEFINE WINDOW oWnd TITLE "SaveToBmp"

   @ 9, 2 BUTTON "Save To Bmp" ;
      SIZE 210, 30 ;
      ACTION ( oWnd:SaveToBmp( CurDir() + "\test.bmp" ), MsgInfo( "done!" ) )
      
   ACTIVATE WINDOW oWnd
   
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 58
Joined: Fri Oct 07, 2005 06:30 AM
Save2Bmp
Posted: Sun Sep 10, 2006 10:17 AM

Great!

Many thanks.

Regards.
Pier luigi

Continue the discussion