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


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

Re: Create Bitmap

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Karl-Heinz" <invalid@invalid.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Create Bitmap
Date Mon, 13 Feb 2017 16:13:13 +0100
Lines 69
Message-ID <ege0u8F4nloU1@mid.individual.net> (permalink)
References <ef3b5261-5f92-4820-b572-fbcd8dae6b1c@googlegroups.com> <40963e73-b4ab-4892-bbdd-4f3190291055@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; format=flowed; charset="UTF-8"; reply-type=original
Content-Transfer-Encoding 8bit
X-Trace individual.net CFVgu92OoeDOxs07UYAE6wKsNkIm8hhh1X+q2eHg3H2+2Jv3k=
Cancel-Lock sha1:pyEmbfnIOCRdsDb2xddSjwcmI1s=
In-Reply-To <40963e73-b4ab-4892-bbdd-4f3190291055@googlegroups.com>
X-Priority 3
X-MSMail-Priority Normal
Importance Normal
X-Newsreader Microsoft Windows Live Mail 16.4.3564.1216
X-MimeOLE Produced By Microsoft MimeOLE V16.4.3564.1216
Xref csiph.com comp.lang.clipper.visual-objects:10153

Show key headers only | 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