S309 bitmap bits

S309 bitmap bits

Post by David Bergero » Sat, 02 Nov 2002 20:54:10



I am using the S309 PictureBox control and would like to get to the bits of
the image.  If I call GetHBitmap (C++), I get an HBITMAP as the return
value.  When I call GetObject using this HBITMAP the width and height are Ok
but the bmBits field is set to 0.  Has anyone ever successfully gotten at
the image bits when using this control?  I would appreciate any guidance or
sample code snippets using C++.  Thanks!
 
 
 

S309 bitmap bits

Post by Gary Daniels [MS » Fri, 15 Nov 2002 09:55:18


I don't know about the S309 Picture box control, or the GetHBitmap
functions, however i can explain the reason why bmBits field is set to 0.
If the HBITMAP that you're retrieving was made by any method other than
CreateDIBSection, it will not have a bmBits field.  A bitmap from
CreateCompatibleBitmap (which would give you a video memory bitmap if
possible) or a bitmap from CreateBitmap (which will give you a system memory
bitmap of any bit depth) are not modifiable through addressing the bitmap
bits, only Device Indipendant Bitmaps can be modified that way.

Gary Daniels
SDET Windows CE Graphics

This posting is provided "AS IS" with no warranties, and confers no rights.

Quote:> I am using the S309 PictureBox control and would like to get to the bits
of
> the image.  If I call GetHBitmap (C++), I get an HBITMAP as the return
> value.  When I call GetObject using this HBITMAP the width and height are
Ok
> but the bmBits field is set to 0.  Has anyone ever successfully gotten at
> the image bits when using this control?  I would appreciate any guidance
or
> sample code snippets using C++.  Thanks!


 
 
 

1. bitmap bits manipulation

hi,

i need to copy sections of an existing bitmap (already loaded into a CBitmap
object) and create a new bitmap of different dimensions by re-assembling the
copied sections multiple times and in a different order.

i've looked around the net and i have not found a tutorial that explains how
to manipulate individual bitmap bits really well.  any suggestions, or
methods, or code snipets would be greatly appreciated.

thanks in advance,
jonathan

2. !!!MONEY-MAKING SECRET!!!

3. Formating storage card at 16 bit or 32 bit?

4. Advise on object managers

5. 32-bit memory I/O on 32-bit boundary only?

6. omf

7. Toshiba e740 SD slot - 1 bit or 4 bits?

8. creating user on win2000 when minpasswordlength > 0

9. PPC math is a bit off - maybe half a bit :-)

10. How to draw transparent colored bitmap over another colored bitmap

11. S309 PictureBox

12. S309 (or other) ActiveX controls and the App Install Wizard??

13. S309 picturebox