Bitmap/Icon copy. Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Bitmap/Icon copy.

Post by Cursor » Sat Dec 17, 2005 8:59 am

Hello everybody.

I would know if a copy function exists to clone a bitmap/icon in order to modify it.

All the fast constructor and assignment function are only copy the objectref address. And I want to fastly and easily create a copy of a bitmap to modify it without modify the source.

Or must I create a new icon and copy (with a memoryDC) its content ?


Thanks.
What is little and green, witch go up and down ??
Yoda playing with the force.

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Sun Dec 18, 2005 10:41 am

Can try with wxBitmap::GetSubBitmap, giving it the size of the bitmap, or wxImage::Copy.

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Sun Dec 18, 2005 7:38 pm

Ho yes, it is a very good idea.
It works perfectly.

Thank you.
What is little and green, witch go up and down ??
Yoda playing with the force.

Post Reply