How to get HBITMAP from Graphics object in Gdiplus?

Discussion in 'C++' started by james, Feb 19, 2004.

  1. james

    james Guest

    HBITMAP is one of GDI object in CDC, So you need to use SelectObject to
    select HBITMAP object into CDC before you draw.
    "AD" <> ¦b¶l¥ó news:c14n5l$nis$ ¤¤¼¶¼g
    ....
    > Hey,
    > I have a problem with getting a bitmap (HBITMAP) from Device Context using
    > Graphics object.
    > Let's say I draw something :
    > CDC ndc;
    >
    > HBITMAP hb;
    >
    > ndc.CreateCompatibleDC(dc);
    >
    > Graphics g(ndc->m_hDC);
    >
    > g.Draw(something..); //drawing on g is here
    > hb= ???
    > And how to get a bitmap then? Or maybe I did something wrong..
    >
    > AD
    >
    >
    >
    >
    >
    >
     
    james, Feb 19, 2004
    #1
    1. Advertising

  2. james

    AD Guest

    Hey,
    I have a problem with getting a bitmap (HBITMAP) from Device Context using
    Graphics object.
    Let's say I draw something :
    CDC ndc;

    HBITMAP hb;

    ndc.CreateCompatibleDC(dc);

    Graphics g(ndc->m_hDC);

    g.Draw(something..); //drawing on g is here
    hb= ???
    And how to get a bitmap then? Or maybe I did something wrong..

    AD
     
    AD, Feb 20, 2004
    #2
    1. Advertising

  3. AD wrote:

    > Hey,
    > I have a problem with getting a bitmap (HBITMAP) from Device Context using
    > Graphics object.
    > Let's say I draw something :
    > CDC ndc;
    >
    > HBITMAP hb;
    >
    > ndc.CreateCompatibleDC(dc);
    >
    > Graphics g(ndc->m_hDC);
    >
    > g.Draw(something..); //drawing on g is here
    > hb= ???
    > And how to get a bitmap then? Or maybe I did something wrong..


    I'm not aware of any such objects or methods in standard C++. They have to
    be part of some oddball library for your operating system or compiler. Try
    looking for newsgroups about any of them instead
    ..
     
    Jens =?ISO-8859-1?Q?B=E4ckman?=, Feb 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer
    Replies:
    1
    Views:
    2,287
    Hadar
    Aug 28, 2003
  2. Wolfgang
    Replies:
    7
    Views:
    447
    Dale King
    Jan 23, 2004
  3. learningjava

    de/serializing a graphics object

    learningjava, Jan 29, 2004, in forum: Java
    Replies:
    2
    Views:
    332
    learningjava
    Jan 30, 2004
  4. adsci

    char * to HBITMAP

    adsci, Jul 26, 2006, in forum: C++
    Replies:
    3
    Views:
    550
    Victor Bazarov
    Jul 27, 2006
  5. Rasheed
    Replies:
    1
    Views:
    774
    Rasheed
    May 23, 2008
Loading...

Share This Page