Hi Everybody,
I need to save the contents of a window to a bmp file.
I tried oWnd:SaveToBmp( cFile ) but it also copies the boarder.
Is there any function to copy only what is inside the window?
Thanks,
Jeff
Save Window contents to BMP
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Jeff,
Class TWindow Method SaveToBmp() calls the function WndBitmap().
If you modify WndBitmap() to call GetDC() instead of GetWindowDC(), then it will just save the window contents, without the caption and borders.
We could modify Method SaveToBmp() adding a new parameter:
Method SaveToBmp( cBmpFile, lBorder ) where lBorder may be .T. by default
Class TWindow Method SaveToBmp() calls the function WndBitmap().
If you modify WndBitmap() to call GetDC() instead of GetWindowDC(), then it will just save the window contents, without the caption and borders.
We could modify Method SaveToBmp() adding a new parameter:
Method SaveToBmp( cBmpFile, lBorder ) where lBorder may be .T. by default
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca
Jeff,
I'm interested in the changes you have done. Please could you send to me. To my email: zalezalon@gmail.com.
This is my related message:
http://fivetechsoft.com/forums/viewtopi ... t=pantalla
Thanks
I'm interested in the changes you have done. Please could you send to me. To my email: zalezalon@gmail.com.
This is my related message:
http://fivetechsoft.com/forums/viewtopi ... t=pantalla
Thanks
Saludos
Andrés González desde Mallorca
Andrés González desde Mallorca
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact: