Save2Bmp

Save2Bmp

Postby Pier Luigi » Sat Aug 26, 2006 12:57 pm

I would want to save a bitmap with this function:

Code: Select all  Expand view  RUN
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
User avatar
Pier Luigi
 
Posts: 58
Joined: Fri Oct 07, 2005 6:30 am
Location: Rome - Italy

Postby Antonio Linares » Sat Aug 26, 2006 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Pier Luigi » Sun Aug 27, 2006 7:12 am

Many thanks.

Regards,
Pier Luigi
User avatar
Pier Luigi
 
Posts: 58
Joined: Fri Oct 07, 2005 6:30 am
Location: Rome - Italy

Postby Antonio Linares » Sun Sep 10, 2006 7:12 am

Pier Luigi,

We have already implemented support to save any window or control as a BMP file.
Code: Select all  Expand view  RUN
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42117
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Pier Luigi » Sun Sep 10, 2006 10:17 am

Great!

Many thanks.

Regards.
Pier luigi
User avatar
Pier Luigi
 
Posts: 58
Joined: Fri Oct 07, 2005 6:30 am
Location: Rome - Italy


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 5 guests