Thread: Creating/Editing Bitmaps

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    648

    Creating/Editing Bitmaps

    What I want to do is create an offscreen bitmap and access its pixel data by pointers then display it on a CStatic object.

    Seems simple but I've looked through the GDI Bitmap functions and I can't find appropiate functions. In other words, I have no idea how to get pixel data without copying the data in and out (GetDIBits, SetDIBits: inefficient).

  2. #2
    Registered User
    Join Date
    Nov 2003
    Posts
    161
    try using creatdibsection it will give you a pointer to the start of bits on a bitmap then you can use bitblt to put it on an onscreen dc. after you have used createdibsection you must use createdc or createcompatible dc or other dc functions to create a dc then use selectobject to selete the dibsection with the dc then you may use bitblt. I don't know how to use createdibsection, hope this helps!

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    DIBs and Their Use

    Use the TOC frame to look for other interesting technical articles

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drawing bitmaps efficiently
    By scwizzo in forum Windows Programming
    Replies: 28
    Last Post: 06-30-2009, 08:25 PM
  2. DX9 Not Displaying Bitmaps
    By Sentral in forum Game Programming
    Replies: 9
    Last Post: 01-31-2006, 05:35 AM
  3. Problem Loading Bitmaps in Allegro
    By LiNeAr in forum Game Programming
    Replies: 1
    Last Post: 08-15-2005, 04:12 PM
  4. MFC: Multiple clicks shows multiple bitmaps - how?
    By BrianK in forum Windows Programming
    Replies: 0
    Last Post: 06-20-2004, 07:25 PM
  5. using standard bitmaps in the toolbar editor
    By Kibble in forum Windows Programming
    Replies: 0
    Last Post: 12-23-2002, 08:43 PM