Hi,
Is there any way to copy a window (or part of a window) to a bmp file?
Thanks,
Jeff
Jeff Barnes
(FWH 16.11, xHarbour 1.2.3, Bcc730)
Hi,
Is there any way to copy a window (or part of a window) to a bmp file?
Thanks,
Jeff
For the entire window you can use TWindow:SaveToBmp() method.
EMG
Thanks for the fast reply Enrico but it does not seem to work.
I get a run time error: Message not found: TWINDOW:SAVETOBMP
Jeff
SaveToBmp( cBmpFile ) CLASS TWindow
local hBmp := WndBitmap( ::hWnd )
local hDib := DibFromBitmap( hBmp )
DibWrite( cBmpFile, hDib )
GloBalFree( hDib )
DeleteObject( hBmp )
return ( File( cBmpFile ) )Thanks, I've got it working now
)
Jeff
Mr.EMG
Similar to the above, is there any method to save a dialog to BMP ?
Note : Tried to save a dialog using your above solution. But could not save it.
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg
@ 0, 1 BUTTON "Save BMP" ACTION oDlg:SaveToBmp( "SAVED.BMP" )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NILMr.Enrico
Thank you very much for your quick answer.
I tried the funciton SaveToBmp("SavedBmp") in association with INIT clause. It did not work. But it is working coolly with ON PAINT clause to save a Dialog to BMP.
Thank you very much for your attendtion.
Try with oDlg:bStart codeblock instead of ON INIT clause. During ON INIT (initialization) the dialog is not painted yet.
EMG
Mr.Enrico,
Good alternative suggestion.
Regards,
Hi all
oDlg:SaveToBmp( "SAVED.BMP" ) was working earlier. Now it is not
working !.
Has any body succeeded with oDlg:SaveToBmp( "SAVED.BMP" ) ?
I am using FWH 2.8 (September 2006) Version + xHarbour 0.99.71 (Simplex)
Thanks
Ramesh,
Its working fine with FWH 7.07