Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Drawing Over Bitmaps

Drawing Over Bitmaps

Drawing Over Bitmaps

is it possible to draw lines over a loaded bitmap? It looks like no, but wasn't sure.


RE: Drawing Over Bitmaps

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.

RE: Drawing Over Bitmaps

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?

RE: Drawing Over Bitmaps

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.

RE: Drawing Over Bitmaps

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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close