Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10153

Re: Create Bitmap

From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Create Bitmap
Date 2017-02-13 16:13 +0100
Message-ID <ege0u8F4nloU1@mid.individual.net> (permalink)
References <ef3b5261-5f92-4820-b572-fbcd8dae6b1c@googlegroups.com> <40963e73-b4ab-4892-bbdd-4f3190291055@googlegroups.com>

Show all headers | View raw


Hi Simon,

>
> I did cheat slightly and created a range of
> Bitmaps for all colours (about 200 of them)
>

puuh ... really ?

>
> I doubt ReportPro would like linking through
> to FabPaint lib to do the saving etc.
>

Why shouldn´t that work ? When you import the mentioned Fab lib.aef and add
that lib to the list of libs used by the Report Pro UDF Lib all the Dibxxx
funcs become visible. At last, copy the FabPaint.dll to your runtime dir and
you´re done.

Anyway I. - Hopefully you won't regret it when you have to create another
200 or maybe 400 Bitmaps manually ;-)

Anyway II. - If you rethink your way of doing things, here´s an offer ;-)


-------------

CreateAndSaveColoredBitmap ( 60 , 60 , DWORD(RGB ( 255 , 255, 0 ) )  ,
"D:\Test\Colored.Bmp" )

-------------

FUNCTION  CreateAndSaveColoredBitmap ( nWidth AS INT , nHeight AS INT ,
dwColorref AS DWORD ,  cFileName AS STRING ) AS LOGIC PASCAL
LOCAL lDone AS LOGIC
LOCAL hBitMap, hDib AS PTR


    IF ( hBitMap := CreateColoredBitmap( nWidth , nHeight , dwColorref ) )
!= NULL_PTR

        IF ( hDib := DIBCreateFromHBitmap( hBitMap ) ) != NULL_PTR

             DIBSaveAs ( hDib , String2Psz( cFileName ))

            DIBDelete ( hDib )

           lDone := TRUE

        ENDIF

    ENDIF


    IF hBitMap != NULL_PTR

        DeleteObject ( hBitMap )

    ENDIF



    RETURN lDone



regards
Karl-Heinz 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Create Bitmap simon@abersoftware.co.uk - 2017-02-10 03:25 -0800
  Re: Create Bitmap "Karl-Heinz" <invalid@invalid.invalid> - 2017-02-11 13:42 +0100
  Re: Create Bitmap simon@abersoftware.co.uk - 2017-02-13 03:45 -0800
    Re: Create Bitmap "Karl-Heinz" <invalid@invalid.invalid> - 2017-02-13 16:13 +0100
  Re: Create Bitmap simon@abersoftware.co.uk - 2017-02-13 09:01 -0800

csiph-web