Help! CreateBitMap Failure 
Author Message
 Help! CreateBitMap Failure

Hi:

        Could anybody tell me why the API call CreateBitMap Fails?

        I am using the CreateBitMap function to create a monochrome bitmap,
like this:
                success=CreateBitMap(width,Height,1,1 , Null)

        It works fine when the width and height is less than 141, but when
the width and height is bigger than 141, the return value of this call is
always zero,
which means the function failure.

        Could anyone tell me the reason for this and give me some suggestion
how to resolve it.

    Please EMail me the replay

        Thanks

        Helena



Sun, 16 Jul 2000 03:00:00 GMT  
 Help! CreateBitMap Failure

First, please copy and paste the actual code from your VB app into the
newsreader: it's too easy to mistype something and create errors you don't
have and cover up errors you do have in your actual program.  For instance,
I doubt your actual names are width and height, since these are likely to
cause problems (referring to the form dimensions, for instance).

Second, when you have trouble with an api function, you should always post
the declare as well as the call: they are both vitally important.

Other than that, the main problem seems to be the last parameter.  You
can't pass a Null to an API function using Null (strange but true).  You
have to pass ByVal 0& instead.

Jim Deutch
MS Dev MVP



Quote:
> Hi:

>         Could anybody tell me why the API call CreateBitMap Fails?

>         I am using the CreateBitMap function to create a monochrome
bitmap,
> like this:
>                 success=CreateBitMap(width,Height,1,1 , Null)

>         It works fine when the width and height is less than 141, but
when
> the width and height is bigger than 141, the return value of this call is
> always zero,
> which means the function failure.

>         Could anyone tell me the reason for this and give me some
suggestion
> how to resolve it.

>     Please EMail me the replay

>         Thanks

>         Helena



Sun, 16 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help! CreateBitMap Failure

2. Help! WinAPI function CreateBitMap Failure

3. CreateBitmap()

4. Bad DLL Calling Convention during CreateBitmap()

5. How to use CreateBitmap

6. How to use CreateBitmap?

7. CreateBitmap API

8. CreateBitmap API

9. CreateBitmap and VB 5.0 - ???

10. Problem with CreateBitmap API

11. Help with SQL UpDate Failure

12. Help ODBC failure during import.

 

 
Powered by phpBB® Forum Software