Reputation: 508
Someone can give me short explanation how to create bitmap runtime using GDI/GDI+ and to fill it with color ?
Thanks in advance.
Upvotes: 1
Views: 3096
Reputation: 69662
CreateBitmap
, CreateCompatibleBitmap
or CreateDIBSection
(in case you want access to raw underlying data bits)CreateCompatibleDC
SelectObject
the bitmap into created device contextFillRect
or friends on the device context, and the painting takes place on your selected bitmap (there are options there: standard brushes for black and white, having RGB on hands instead of creating a brush you can do SetBkColor
+ ExtTextOut
with an empty string and ETO_OPAQUE
and the rectangle will be filled)SelectObject
backStill it has something to do with "entire screen" in the title, and you need explain what you want there.
Upvotes: 7
Reputation: 121649
Create your drawable (or just manipulate the graphics object in your paint handler)
:)
Upvotes: 0