The following function is not saving the window to bitmap.
Code: Select all
#include "Fivewin.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
Code: Select all
FUNCTION Save2Bmp( cFile, oDlg )
DEFAULT cFile := "Saved.Bmp"
DibWrite( cFile, DibFromBitmap( WndBitmap( oDlg:hWnd ) ) )
RETURN ( FILE( cFile ) )
Regards
- Ramesh Babu P