FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oPrn:SayBitmap with resource ?
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM

oPrn:SayBitmap with resource ?

Posted: Thu Oct 24, 2013 09:59 PM

I am using the Printer class. I want to put a symbol at the beginning of a line ( checkmark ). The symbol ( and its counterpart ) are compiled in my resources.

I use the following to load the resources in a bitmap ( it works great for other purposes ):

    aIBmp := { LoadBitMap( GetResources( ) , "INOK" ), LoadBitMap( GetResources( ), "INNO" ) }

Now I want to print out that checkmark so I use:

     oPrn:SayBitmap( nRow, 5 * nCsp, aIBmp[1] )

In theory this should work. ( I have no problem printing external resources ). It doesn't. Do I need to get the value some other way from my resource so I can use it here ?

Thanks.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: oPrn:SayBitmap with resource ?

Posted: Thu Oct 24, 2013 10:24 PM
Tim

Consider this code .. you will have to use FreeImage.dll
Code (fw): Select all Collapse
DEFINE IMAGE oImg RESOURCE "DOG"
      oPrint:SayImage( Line, (oPrint:nHorzRes()*.80), oImg,800,600 )


Rick Lipkin
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: oPrn:SayBitmap with resource ?

Posted: Fri Oct 25, 2013 12:15 PM
Tim,

TimStone wrote:I am using the Printer class. I want to put a symbol at the beginning of a line ( checkmark ). The symbol ( and its counterpart ) are compiled in my resources.

I use the following to load the resources in a bitmap ( it works great for other purposes ):

aIBmp := { LoadBitMap( GetResources( ) , "INOK" ), LoadBitMap( GetResources( ), "INNO" ) }

Now I want to print out that checkmark so I use:

oPrn:SayBitmap( nRow, 5 * nCsp, aIBmp[1] )

In theory this should work. ( I have no problem printing external resources ). It doesn't. Do I need to get the value some other way from my resource so I can use it here ?

Thanks.


It's most likely that the bitmap is too small for the printer. Try adding width and height parameters to SayBitmap() method.

EMG

Continue the discussion