The following function is not saving the window to bitmap.
- Code: Select all Expand view
#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
I tried with the following code also. But could not get the result.
- Code: Select all Expand view
FUNCTION Save2Bmp( cFile, oDlg )
DEFAULT cFile := "Saved.Bmp"
DibWrite( cFile, DibFromBitmap( WndBitmap( oDlg:hWnd ) ) )
RETURN ( FILE( cFile ) )
Please guide me how to save a dialog/window to bitmap file.
Regards
- Ramesh Babu P