Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.xharbour

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2010, 04:05 AM
Leonardo
Guest
 
Posts: n/a
Default Copy screen

Hello
Taking a picture of the screen and save to BMP programmatically?
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 09-09-2010, 02:00 PM
dlzc
Guest
 
Posts: n/a
Default Re: Copy screen

Dear Leonardo:

On Sep 8, 9:05*pm, Leonardo <syge...@gmail.com> wrote:
> Hello
> Taking a picture of the screen and save to BMP
> programmatically?


Yes, you will use the WinAPI functions:
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
OpenClipboard
IsClipboardFormatAvailable (perhaps)
GetClipboardData
EmptyClipboard (perhaps)
CloseClipboard

It is not clear to me how we find out what the format is, for the data
on the clipboard...

Clipboard content formats are listed here:
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx

David A. Smith
Reply With Quote
  #3 (permalink)  
Old 09-09-2010, 03:52 PM
Sudip Bhattacharyya
Guest
 
Posts: n/a
Default Re: Copy screen

Hello David A. Smith,

Thanks a lot. Very helpful information.

Regards.

Sudip
Reply With Quote
  #4 (permalink)  
Old 09-11-2010, 04:39 PM
Guest
 
Posts: n/a
Default Re: Copy screen

Hi Leonardo,

> Hello
> Taking a picture of the screen and save to BMP programmatically?
>

Here is an example ...

---8<-----------------------------------------------------------
/*
* t_Win2BM.prg - test/example how to capture window image
* and optionali save image to an .bmp file
*
* ---2010-09-09------------------------------------------------
* Copyright 2010-2010 Dusan Ostrouska, DuOS <dos513(a)email.si>
*/

#ifndef __HARBOUR__
#stdout *!* --------------------------------------------
#stdout *!* This program ... uses some [x]Hb extensions.
#stdout *!* It can be compiled only with [x]Hb
#stdout *!* --------------------------------------------
#error Use [x]Harbour compiler
#endif

FUNCTION Main()

LOCAL nRow, xCrsSave := SetCursor()

SetCursor( 0 ) //= SET CURSOR OFF
Scroll() ; SetPos( 0, 0 ) //= CLS ! CLEAR SCREEN

? PadR( " t_Win2BM.prg", 55) + " xHbarbour + MinGw32"
? ; ? Version() ; ?

nRow := Row()

Win2Bm( , Nil, "t_winBmS.bmp" ) // Full Screen
Win2Bm( , .T., "t_winBmW.bmp" ) // Full window w/ border, title, ...
Win2Bm( , .F., "t_winBmC.bmp" ) // Windows' client area

SetCursor( xCrsSave )
SetPos( nRow, 0)
? ; ?
RETURN 0

// -------------------------------------------------------------
// ---( C program code )----------------------------------------

#pragma BEGINDUMP

#define WIN32_LEAN_AND_MEAN /* reduse include ... */
#include <windows.h>

#include "hbapi.h"
#include "hbapiitm.h"

/*
* Win2Bm( [nWnd], [lFullWindow][, cBmFile] ) --> nBitMap
*
* hWnd : window handle - if NIL then GetForegroundWindow()
* lFullWindow : .T. = WindowsRect, .F. = ClientRect, Nil = Screen
* cBmFile : FileName for .bmp file
*
* 2007-11-13,DuOS
*/
HB_FUNC( WIN2BM )
{
HWND hWnd = ISNUM( 1 ) ? (HWND) hb_parnl( 1 ) : ISPOINTER( 1 ) ?
(HWND) hb_parptr( 1 ) : GetForegroundWindow();
UINT iWhat = ISLOG( 2 ) ? ( hb_parl( 2 ) ? 1 : 2 ) : 0;
CHAR * pszBmF = ISCHAR( 3 ) && hb_parclen( 3 ) ? hb_parc( 3 ) : NULL;
HDC hdcWin = NULL;
HDC hdcMem = NULL;
HBITMAP hbmWin = NULL;
RECT rc;

if( iWhat == 1 )
{
hdcWin = GetWindowDC( hWnd );
GetWindowRect( hWnd, &rc );
}
else if( iWhat == 2 )
{
hdcWin = GetDC( hWnd );
GetClientRect( hWnd, &rc );
}
else
{
hdcWin = GetDC( NULL );
rc.left = rc.top = 0;
rc.right = GetSystemMetrics( SM_CXSCREEN );
rc.bottom = GetSystemMetrics( SM_CYSCREEN );
}
hdcMem = CreateCompatibleDC( hdcWin );

hbmWin = CreateCompatibleBitmap( hdcWin,
rc.right - rc.left,
rc.bottom - rc.top );

SelectObject( hdcMem, hbmWin );

BitBlt( hdcMem, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
hdcWin, 0, 0,
SRCCOPY );

if( pszBmF ) // Save bmp to .mbp file ?
{
BITMAP bmWin;
BITMAPFILEHEADER bmfHdr;
BITMAPINFOHEADER bmiHdr;
LPBITMAPINFOHEADER lpbmi = NULL;
DWORD dwBmSize;
DWORD dwByWritten = 0;
HANDLE hBmF = NULL;

// Get the BITMAP from the HBITMAP
GetObject( hbmWin, sizeof( BITMAP ), &bmWin );

// Fill in BITMAPINFOHEADER structure
memset( (void *) &bmiHdr, 0, sizeof( BITMAPINFOHEADER ) );
bmiHdr.biSize = sizeof( BITMAPINFOHEADER );
bmiHdr.biWidth = bmWin.bmWidth;
bmiHdr.biHeight = bmWin.bmHeight;
bmiHdr.biPlanes = 1; // Should always be 1
bmiHdr.biBitCount = 32; // color resolution (in bits per pixel)
bmiHdr.biCompression = BI_RGB;
bmiHdr.biSizeImage = 0;
bmiHdr.biXPelsPerMeter = 0;
bmiHdr.biYPelsPerMeter = 0;
bmiHdr.biClrUsed = 0;
bmiHdr.biClrImportant = 0;

dwBmSize = ( ( bmiHdr.biWidth * bmiHdr.biBitCount + 31 ) / 32 )
* 4 * bmiHdr.biHeight;

lpbmi = (LPBITMAPINFOHEADER)
hb_xgrab( sizeof( BITMAPINFOHEADER ) + dwBmSize );
*lpbmi = bmiHdr;

GetDIBits( hdcWin,
hbmWin, 0, (UINT) bmWin.bmHeight,
lpbmi,
(BITMAPINFO *) lpbmi,
DIB_RGB_COLORS );

// Fill in BITMAPFILEHEADER structure
memset( (void *) &bmfHdr, 0, sizeof( BITMAPFILEHEADER ) );
bmfHdr.bfType = 0x4D42; //= "BM"
bmfHdr.bfSize = sizeof( BITMAPFILEHEADER )
+ sizeof( BITMAPINFOHEADER )
+ dwBmSize;
bmfHdr.bfOffBits = (DWORD) sizeof( BITMAPFILEHEADER )
+ (DWORD) sizeof( BITMAPINFOHEADER );

// Create and Write .bmp file and Close it
hBmF = CreateFile( pszBmF,
GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL );
WriteFile( hBmF, (LPSTR) &bmfHdr, sizeof( BITMAPFILEHEADER ),
&dwByWritten, NULL );
WriteFile( hBmF, (LPSTR) &bmiHdr, sizeof( BITMAPINFOHEADER ),
&dwByWritten, NULL );
WriteFile( hBmF, (LPSTR) lpbmi, dwBmSize,
&dwByWritten, NULL );
CloseHandle( hBmF );

hb_xfree( lpbmi );

}

DeleteDC( hdcMem );
ReleaseDC( hWnd, hdcWin );

hb_retnl( (LONG) hbmWin );

} // HB_FUNC( WIN2BM )
// -------------------------------------------------------------

#pragma ENDDUMP
--->8-----------------------------------------------------------
--
__________________________________________________ ______________
Dusan.
Reply With Quote
  #5 (permalink)  
Old 09-13-2010, 06:13 AM
Jayadev
Guest
 
Posts: n/a
Default Re: Copy screen

Dear Dusan,

Excellent Function, many thanks.

Regards,

Jayadev

<dos513@email.si> wrote in message
news:MPG.26f5cf10fcc0b70b989691@news.siol.net...
> Hi Leonardo,
>
>> Hello
>> Taking a picture of the screen and save to BMP programmatically?
>>

> Here is an example ...
>
> ---8<-----------------------------------------------------------
> /*
> * t_Win2BM.prg - test/example how to capture window image
> * and optionali save image to an .bmp file
> *
> * ---2010-09-09------------------------------------------------
> * Copyright 2010-2010 Dusan Ostrouska, DuOS <dos513(a)email.si>
> */
>
> #ifndef __HARBOUR__
> #stdout *!* --------------------------------------------
> #stdout *!* This program ... uses some [x]Hb extensions.
> #stdout *!* It can be compiled only with [x]Hb
> #stdout *!* --------------------------------------------
> #error Use [x]Harbour compiler
> #endif
>
> FUNCTION Main()
>
> LOCAL nRow, xCrsSave := SetCursor()
>
> SetCursor( 0 ) //= SET CURSOR OFF
> Scroll() ; SetPos( 0, 0 ) //= CLS ! CLEAR SCREEN
>
> ? PadR( " t_Win2BM.prg", 55) + " xHbarbour + MinGw32"
> ? ; ? Version() ; ?
>
> nRow := Row()
>
> Win2Bm( , Nil, "t_winBmS.bmp" ) // Full Screen
> Win2Bm( , .T., "t_winBmW.bmp" ) // Full window w/ border, title, ...
> Win2Bm( , .F., "t_winBmC.bmp" ) // Windows' client area
>
> SetCursor( xCrsSave )
> SetPos( nRow, 0)
> ? ; ?
> RETURN 0
>
> // -------------------------------------------------------------
> // ---( C program code )----------------------------------------
>
> #pragma BEGINDUMP
>
> #define WIN32_LEAN_AND_MEAN /* reduse include ... */
> #include <windows.h>
>
> #include "hbapi.h"
> #include "hbapiitm.h"
>
> /*
> * Win2Bm( [nWnd], [lFullWindow][, cBmFile] ) --> nBitMap
> *
> * hWnd : window handle - if NIL then GetForegroundWindow()
> * lFullWindow : .T. = WindowsRect, .F. = ClientRect, Nil = Screen
> * cBmFile : FileName for .bmp file
> *
> * 2007-11-13,DuOS
> */
> HB_FUNC( WIN2BM )
> {
> HWND hWnd = ISNUM( 1 ) ? (HWND) hb_parnl( 1 ) : ISPOINTER( 1 ) ?
> (HWND) hb_parptr( 1 ) : GetForegroundWindow();
> UINT iWhat = ISLOG( 2 ) ? ( hb_parl( 2 ) ? 1 : 2 ) : 0;
> CHAR * pszBmF = ISCHAR( 3 ) && hb_parclen( 3 ) ? hb_parc( 3 ) : NULL;
> HDC hdcWin = NULL;
> HDC hdcMem = NULL;
> HBITMAP hbmWin = NULL;
> RECT rc;
>
> if( iWhat == 1 )
> {
> hdcWin = GetWindowDC( hWnd );
> GetWindowRect( hWnd, &rc );
> }
> else if( iWhat == 2 )
> {
> hdcWin = GetDC( hWnd );
> GetClientRect( hWnd, &rc );
> }
> else
> {
> hdcWin = GetDC( NULL );
> rc.left = rc.top = 0;
> rc.right = GetSystemMetrics( SM_CXSCREEN );
> rc.bottom = GetSystemMetrics( SM_CYSCREEN );
> }
> hdcMem = CreateCompatibleDC( hdcWin );
>
> hbmWin = CreateCompatibleBitmap( hdcWin,
> rc.right - rc.left,
> rc.bottom - rc.top );
>
> SelectObject( hdcMem, hbmWin );
>
> BitBlt( hdcMem, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
> hdcWin, 0, 0,
> SRCCOPY );
>
> if( pszBmF ) // Save bmp to .mbp file ?
> {
> BITMAP bmWin;
> BITMAPFILEHEADER bmfHdr;
> BITMAPINFOHEADER bmiHdr;
> LPBITMAPINFOHEADER lpbmi = NULL;
> DWORD dwBmSize;
> DWORD dwByWritten = 0;
> HANDLE hBmF = NULL;
>
> // Get the BITMAP from the HBITMAP
> GetObject( hbmWin, sizeof( BITMAP ), &bmWin );
>
> // Fill in BITMAPINFOHEADER structure
> memset( (void *) &bmiHdr, 0, sizeof( BITMAPINFOHEADER ) );
> bmiHdr.biSize = sizeof( BITMAPINFOHEADER );
> bmiHdr.biWidth = bmWin.bmWidth;
> bmiHdr.biHeight = bmWin.bmHeight;
> bmiHdr.biPlanes = 1; // Should always be 1
> bmiHdr.biBitCount = 32; // color resolution (in bits per pixel)
> bmiHdr.biCompression = BI_RGB;
> bmiHdr.biSizeImage = 0;
> bmiHdr.biXPelsPerMeter = 0;
> bmiHdr.biYPelsPerMeter = 0;
> bmiHdr.biClrUsed = 0;
> bmiHdr.biClrImportant = 0;
>
> dwBmSize = ( ( bmiHdr.biWidth * bmiHdr.biBitCount + 31 ) / 32 )
> * 4 * bmiHdr.biHeight;
>
> lpbmi = (LPBITMAPINFOHEADER)
> hb_xgrab( sizeof( BITMAPINFOHEADER ) + dwBmSize );
> *lpbmi = bmiHdr;
>
> GetDIBits( hdcWin,
> hbmWin, 0, (UINT) bmWin.bmHeight,
> lpbmi,
> (BITMAPINFO *) lpbmi,
> DIB_RGB_COLORS );
>
> // Fill in BITMAPFILEHEADER structure
> memset( (void *) &bmfHdr, 0, sizeof( BITMAPFILEHEADER ) );
> bmfHdr.bfType = 0x4D42; //= "BM"
> bmfHdr.bfSize = sizeof( BITMAPFILEHEADER )
> + sizeof( BITMAPINFOHEADER )
> + dwBmSize;
> bmfHdr.bfOffBits = (DWORD) sizeof( BITMAPFILEHEADER )
> + (DWORD) sizeof( BITMAPINFOHEADER );
>
> // Create and Write .bmp file and Close it
> hBmF = CreateFile( pszBmF,
> GENERIC_WRITE,
> 0,
> NULL,
> CREATE_ALWAYS,
> FILE_ATTRIBUTE_NORMAL,
> NULL );
> WriteFile( hBmF, (LPSTR) &bmfHdr, sizeof( BITMAPFILEHEADER ),
> &dwByWritten, NULL );
> WriteFile( hBmF, (LPSTR) &bmiHdr, sizeof( BITMAPINFOHEADER ),
> &dwByWritten, NULL );
> WriteFile( hBmF, (LPSTR) lpbmi, dwBmSize,
> &dwByWritten, NULL );
> CloseHandle( hBmF );
>
> hb_xfree( lpbmi );
>
> }
>
> DeleteDC( hdcMem );
> ReleaseDC( hWnd, hdcWin );
>
> hb_retnl( (LONG) hbmWin );
>
> } // HB_FUNC( WIN2BM )
> // -------------------------------------------------------------
>
> #pragma ENDDUMP
> --->8-----------------------------------------------------------
> --
> __________________________________________________ ______________
> Dusan.



Reply With Quote
  #6 (permalink)  
Old 09-14-2010, 04:30 PM
Leonardo
Guest
 
Posts: n/a
Default Re: Copy screen

On 13 set, 03:13, "Jayadev" <Jayadevu_@_rediffmail.com> wrote:
> Dear Dusan,
>
> Excellent Function, many thanks.
>
> Regards,
>
> Jayadev
>
> <dos...@email.si> wrote in message
>
> news:MPG.26f5cf10fcc0b70b989691@news.siol.net...
>
>
>
> > Hi Leonardo,

>
> >> Hello
> >> Taking a picture of the screen and save to BMP programmatically?

>
> > Here is an example ...

>
> > ---8<-----------------------------------------------------------
> > /*
> > * t_Win2BM.prg - test/example how to capture window image
> > * * * * * * * * *and optionali save image to an .bmp file
> > *
> > * ---2010-09-09------------------------------------------------
> > * Copyright 2010-2010 Dusan Ostrouska, DuOS <dos513(a)email.si>
> > */

>
> > #ifndef __HARBOUR__
> > *#stdout *!* --------------------------------------------
> > *#stdout *!* This program ... uses some [x]Hb extensions.
> > *#stdout *!* It can be compiled only with [x]Hb
> > *#stdout *!* --------------------------------------------
> > *#error Use [x]Harbour compiler
> > #endif

>
> > FUNCTION Main()

>
> > * LOCAL nRow, xCrsSave := SetCursor()

>
> > * SetCursor( 0 ) * * * * * * * * * * * *//=SET CURSOR OFF
> > * Scroll() ; *SetPos( 0, 0 ) * * * * * *//= CLS ! CLEAR SCREEN

>
> > * ? PadR( " t_Win2BM.prg", 55) + " xHbarbour + MinGw32"
> > * ? ; ? Version() ; ?

>
> > * nRow := Row()

>
> > * Win2Bm( , Nil, "t_winBmS.bmp" *) *// Full Screen
> > * Win2Bm( , .T., "t_winBmW.bmp" *) *// Full window w/ border, title, ...
> > * Win2Bm( , .F., "t_winBmC.bmp" *) *// Windows' client area

>
> > * SetCursor( xCrsSave )
> > * SetPos( nRow, 0)
> > * ? ; ?
> > RETURN 0

>
> > // -------------------------------------------------------------
> > // ---( C program code )----------------------------------------

>
> > #pragma BEGINDUMP

>
> > #define WIN32_LEAN_AND_MEAN */* reduse include ... */
> > #include <windows.h>

>
> > #include "hbapi.h"
> > #include "hbapiitm.h"

>
> > /*
> > * Win2Bm( [nWnd], [lFullWindow][, cBmFile] ) --> nBitMap
> > *
> > * *hWnd * * * *: window handle - if NIL then GetForegroundWindow()
> > * *lFullWindow : .T. = WindowsRect, .F. = ClientRect, Nil = Screen
> > * *cBmFile * * : FileName for .bmp file
> > *
> > * 2007-11-13,DuOS
> > */
> > HB_FUNC( WIN2BM )
> > {
> > * HWND * *hWnd * = ISNUM( 1 ) ? (HWND) hb_parnl( 1 ) : ISPOINTER( 1 ) ?
> > * * * * * * * * * *(HWND) hb_parptr( 1 ) : GetForegroundWindow();
> > * UINT * *iWhat *= ISLOG( 2 ) ? ( hb_parl( 2 ) ? 1 : 2 ) : 0;
> > * CHAR ** pszBmF = ISCHAR( 3 ) && hb_parclen( 3 ) ? hb_parc( 3 ) : NULL;
> > * HDC * * hdcWin = NULL;
> > * HDC * * hdcMem = NULL;
> > * HBITMAP hbmWin = NULL;
> > * RECT * *rc;

>
> > * if( iWhat == 1 )
> > * {
> > * * *hdcWin = GetWindowDC( hWnd );
> > * * *GetWindowRect( hWnd, &rc );
> > * }
> > * else if( iWhat == 2 )
> > * {
> > * * *hdcWin = GetDC( hWnd );
> > * * *GetClientRect( hWnd, &rc );
> > * }
> > * else
> > * {
> > * * *hdcWin = GetDC( NULL );
> > * * *rc.left * = rc.top = 0;
> > * * *rc.right *= GetSystemMetrics( SM_CXSCREEN );
> > * * *rc.bottom = GetSystemMetrics( SM_CYSCREEN );
> > * }
> > * hdcMem = CreateCompatibleDC( hdcWin );

>
> > * hbmWin = CreateCompatibleBitmap( hdcWin,
> > * * * * * * * * * * * * * * * * * *rc.right - rc.left,
> > * * * * * * * * * * * * * * * * * *rc.bottom - rc.top );

>
> > * SelectObject( hdcMem, hbmWin );

>
> > * BitBlt( hdcMem, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
> > * * * * * hdcWin, 0, 0,
> > * * * * * SRCCOPY );

>
> > * if( pszBmF ) // Save bmp to .mbp file ?
> > * {
> > * * *BITMAP * * * * * * bmWin;
> > * * *BITMAPFILEHEADER * bmfHdr;
> > * * *BITMAPINFOHEADER * bmiHdr;
> > * * *LPBITMAPINFOHEADER lpbmi = NULL;
> > * * *DWORD * * * * * * *dwBmSize;
> > * * *DWORD * * * * * * *dwByWritten = 0;
> > * * *HANDLE * * * * * * hBmF = NULL;

>
> > * * *// Get the BITMAP from the HBITMAP
> > * * *GetObject( hbmWin, sizeof( BITMAP ), &bmWin );

>
> > * * *// Fill in BITMAPINFOHEADER structure
> > * * *memset( (void *) &bmiHdr, 0, sizeof( BITMAPINFOHEADER ) );
> > * * *bmiHdr.biSize * * * * *= sizeof( BITMAPINFOHEADER );
> > * * *bmiHdr.biWidth * * * * = bmWin.bmWidth;
> > * * *bmiHdr.biHeight * * * *= bmWin.bmHeight;
> > * * *bmiHdr.biPlanes * * * *= 1; *// Should always be1
> > * * *bmiHdr.biBitCount * * *= 32; // color resolution (inbits per pixel)
> > * * *bmiHdr.biCompression * = BI_RGB;
> > * * *bmiHdr.biSizeImage * * = 0;
> > * * *bmiHdr.biXPelsPerMeter = 0;
> > * * *bmiHdr.biYPelsPerMeter = 0;
> > * * *bmiHdr.biClrUsed * * * = 0;
> > * * *bmiHdr.biClrImportant *= 0;

>
> > * * *dwBmSize = ( ( bmiHdr.biWidth * bmiHdr.biBitCount + 31 ) /32 )
> > * * * * * * * * * 4 * bmiHdr.biHeight;

>
> > * * *lpbmi = (LPBITMAPINFOHEADER)
> > * * * * * * * * * hb_xgrab( sizeof( BITMAPINFOHEADER ) + dwBmSize );
> > * * **lpbmi = bmiHdr;

>
> > * * *GetDIBits( hdcWin,
> > * * * * * * * * hbmWin, 0, (UINT) bmWin.bmHeight,
> > * * * * * * * * lpbmi,
> > * * * * * * * * (BITMAPINFO *) lpbmi,
> > * * * * * * * * DIB_RGB_COLORS );

>
> > * * *// Fill in BITMAPFILEHEADER structure
> > * * *memset( (void *) &bmfHdr, 0, sizeof( BITMAPFILEHEADER ) );
> > * * *bmfHdr.bfType * *= 0x4D42; //= "BM"
> > * * *bmfHdr.bfSize * *= sizeof( BITMAPFILEHEADER )
> > * * * * * * * * * * * * + sizeof( BITMAPINFOHEADER )
> > * * * * * * * * * * * * + dwBmSize;
> > * * *bmfHdr.bfOffBits = (DWORD) sizeof( BITMAPFILEHEADER )
> > * * * * * * * * * * * * + (DWORD) sizeof( BITMAPINFOHEADER );

>
> > * * *// Create and Write .bmp file and Close it
> > * * *hBmF = CreateFile( pszBmF,
> > * * * * * * * * * * * * GENERIC_WRITE,
> > * * * * * * * * * * * * 0,
> > * * * * * * * * * * * * NULL,
> > * * * * * * * * * * * * CREATE_ALWAYS,
> > * * * * * * * * * * * * FILE_ATTRIBUTE_NORMAL,
> > * * * * * * * * * * * * NULL );
> > * * *WriteFile( hBmF, (LPSTR) &bmfHdr, sizeof( BITMAPFILEHEADER ),
> > * * * * * * * * * * * &dwByWritten, NULL );
> > * * *WriteFile( hBmF, (LPSTR) &bmiHdr, sizeof( BITMAPINFOHEADER ),
> > * * * * * * * * * * * &dwByWritten, NULL );
> > * * *WriteFile( hBmF, (LPSTR) lpbmi, dwBmSize,
> > * * * * * * * * * * * &dwByWritten, NULL );
> > * * *CloseHandle( hBmF );

>
> > * * *hb_xfree( lpbmi );

>
> > * }

>
> > * DeleteDC( hdcMem );
> > * ReleaseDC( hWnd, hdcWin );

>
> > * hb_retnl( (LONG) hbmWin );

>
> > } // HB_FUNC( WIN2BM )
> > // -------------------------------------------------------------

>
> > #pragma ENDDUMP
> > --->8-----------------------------------------------------------
> > --
> > __________________________________________________ ______________
> > Dusan.


thanks
Leonardo Machado
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 07:05 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.