Re: SetDIBits - question

From: Duncan McNiven (duncan_at_mcniven.net)
Date: 03/05/04


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


Relevant Pages

  • Re: install says copied files missing/corrupt
    ... hardware's working with Win98, is absolutely *NO* indication of its ... suitability for use with WinNT, Win2K, or WinXP. ...
    (microsoft.public.windowsxp.setup_deployment)
  • SetDIBits - question
    ... // Copy the information from the image record to the bitmap object ... is wrong with the function SetDIBits, ... It works correctly under Win2k and XP, ... but under Win98, the result is a blank screen. ...
    (comp.lang.pascal.delphi.misc)
  • Win2k simple files sharing?
    ... Is there any way to setting up simple files sharing (like winXP) on win2k? ... i don't need to match user between win98 and my win2k. ...
    (microsoft.public.win2000.general)
  • MSINET question, preloaded?
    ... I am trying to package a VB6.0 program going out to a couple different ... places, using anything from win98, winxp or win2k... ...
    (microsoft.public.vb.general.discussion)
  • MSINET preloaded?
    ... I am trying to package a VB6.0 program going out to a couple different ... places, using anything from win98, winxp or win2k... ...
    (microsoft.public.vb.controls)