C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to get HBITMAP from Graphics object in Gdiplus?

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
james
Guest





PostPosted: Thu Feb 19, 2004 5:55 am    Post subject: Re: How to get HBITMAP from Graphics object in Gdiplus? Reply with quote



HBITMAP is one of GDI object in CDC, So you need to use SelectObject to
select HBITMAP object into CDC before you draw.
"AD" <ania.domachowska (AT) wp (DOT) pl> ¦b¶l¥ó news:c14n5l$nis$1 (AT) news (DOT) onet.pl ¤¤¼¶¼g
....
Quote:
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









Back to top
AD
Guest





PostPosted: Fri Feb 20, 2004 10:23 am    Post subject: How to get HBITMAP from Graphics object in Gdiplus? Reply with quote



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






Back to top
Jens Bäckman
Guest





PostPosted: Fri Feb 20, 2004 10:38 am    Post subject: Re: How to get HBITMAP from Graphics object in Gdiplus? Reply with quote



AD wrote:

Quote:
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
..

Back to top
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group