Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai all,

I have a sdi project.In that i am trying to draw a line by creating a seperate (CLine)class.My base class is CScrollView.From the scrollview i am calling the member function of CLine class by creating an object.But i am getting assertion error while running and also line is going out of the window when i resize it.My question is what should be the base class of CLIne and how to mange with line position with view,Pls can any one help me...
Posted
Updated 17-Feb-10 18:36pm
v2

1 solution

I would imagine the logical way to do this, would be to make CLine called Line ( the C standard is for MFC classes, and is dumb ), and to have no base class. Your window should keep a collection of Line objects, and iterate over it in your Paint event and draw the lines. As it stands, it sounds like you're creating child windows, which is not wise, if you want the lines to exist inside your SDI window and be attached to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900