Re: SetDIBits - question
From: Duncan McNiven (duncan_at_mcniven.net)
Date: 03/05/04
- Next message: Gery: "Re: Move cursor to the eof question"
- Previous message: Florian Student: "SetDIBits - question"
- In reply to: Florian Student: "SetDIBits - question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 05 Mar 2004 21:06:19 +0000
On Fri, 05 Mar 2004 20:40:03 +0100, Florian Student
<studenfn@trick.informatik.uni-stuttgart.de> wrote:
>Hi Everybody,
>
>I've got to adjust a program, that works under Win2k and WinXP so far,
>so that it will work under Win98 as well. Another component
>(GhostScript) calls the following function, with a Bitmap as parameter:
>
>// Copy the information from the image record to the bitmap object
>function copy_image(bm: TBitmap): boolean;
>var BitmapInf: BITMAPINFO;
> Bitmap: HBitmap;
>
>begin
> bm.Height := image.bmih.biHeight;
> bm.Width := image.bmih.biWidth;
> bm.IgnorePalette := true;
>
> Bitmap := bm.Handle;
> BitmapInf.bmiHeader := image.bmih;
>
> if SetDIBits(0, Bitmap, 0, image.bmih.biHeight, image.image,
>BitmapInf, DIB_RGB_COLORS) > 0 then
> result := true
> else
> result := false;
>end;
>
>I suppose that s.th. is wrong with the function SetDIBits, since the
>Data in the bm object is correct. It works correctly under Win2k and XP,
>but under Win98, the result is a blank screen. Do you have any idea,
>what I have to do differently when calling the SetDIBits function? Your
>help will be appreciated a lot
No definite knowledge, but a vague bell is ringing somewhere. ISTR that
some of the parameters have to be 16-bit integers, not 32-bits. Or was
that Windows 95? Sorry, don't remember, but maybe that will get you
looking in a new direction.
-- Duncan
- Next message: Gery: "Re: Move cursor to the eof question"
- Previous message: Florian Student: "SetDIBits - question"
- In reply to: Florian Student: "SetDIBits - question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|