Drawing in a MDI Window

Posted on 1999-07-07
Medium Priority
Last Modified: 2010-04-02

I'm writing a simple 2D, MDI, wire-frame drawing application in Visual C++ for a college project and would like to be able to draw 'rulers' in the client are of the MDI window but have it so that these rulers cannot be drawn over by the the contents of the area not occupied by the 'rulers' ie. the area where I will draw the shapes.

Thank you for your time.

Question by:2HD

Accepted Solution

Laminamia063099 earned 400 total points
ID: 1199400
    Try this: (if it still fits within your project idea)
Instead of drawing the ruler directly on the client area, make a window (a plain panel) in that same space where you wanted to put the ruler in the former client area.  On this child window, draw the ruler.  You can even make this window the same color as your client area and without a border so that it appears to be part of the client area to the user, but he cannot draw there.  

     This requires no code you haven't used before, just create a window without the WS_BORDER style and then draw the ruler on it as you would have anywhere else.

     Hope this works, add a comment if you want more details!


Author Comment

ID: 1199401
Great idea, many thanks


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question