Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing Over Bitmaps 1

Status
Not open for further replies.

hatflyer

Programmer
Dec 13, 2003
3
US
is it possible to draw lines over a loaded bitmap? It looks like no, but wasn't sure.

thanks.
 
Well MS-Paint managed just fine (as does every other graphics editor).

What makes you suspect the answer is no?


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
i think maybe u got the wrong idea on what i'm asking about. in my vc++ application, i load bitmaps on the window of my application, then i tried to draw lines later in the program, but the lines stop on the window once they hit a bitmap. so it looks like it may not be able to be done?
 
Perhaps it has something to do with the order in which you draw things?

You might logically add the line later, but if you end up rendering the line first and then the bitmap when you're handling WM_PAINT say, then it will be obscured.

Comment out the bitmap, and check to see if you get the whole line.



--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
i tried to draw a line in OnPaint. the button that is loaded in OnInitDialog (and never again referenced) blocks the line.

i tried to draw the line in OnInitDialog, but for some reason, with the same draw code, it does not draw.

btw, the button is not made "transparent," so that is not a reason the button is done on top of the line.

any ideas on getting the line on top of the button?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top