Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drawing in a MDI Window

Posted on 1999-07-07
2
Medium Priority
?
287 Views
Last Modified: 2010-04-02
Hi,

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.

J:o)
0
Comment
Question by:2HD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
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!

Laminamia
0
 

Author Comment

by:2HD
ID: 1199401
Great idea, many thanks

J:o)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

721 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