Drawing in an SDI application - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Drawing in an SDI application

eliselis Posts: 1Member
Hello everyone,

This is gonna be a long post, so please bear with me
Also, please have in mind that although I don't lack programming skills, I have little experience using VC++, GDI and MFC.

Ok, here goes. I have to create an SDI application that displays a dialog box on RButtonDown in the main frame. The dialog box should contain some comboboxes and buttons from which I select a shape, the mapping mode, pen style / width / color and whatever else might come in handy (like fill color & stuff). I think I've got this part figured out

The thing is, after I select these parameters and exit the dialog box, I have to draw the selected shape, using the specified parameters in the main frame. Not having MSDN installed and having a poor internet connection is a bad thing and unfortunately that won't change too soon, that being the reason I'm posting here.

Back to the problem. Is there a "shape" class in GDI / MFC that I can use (read: extend) that will cover my needs? That is, something as-easy-as-possible to instantiate and serialize? The objects I draw must be selectable via click and information on them displayed in either a child dialog box or another frame. Also, how do I work with the CAppdrawDoc (appdraw is the name of my app) in order to be able to store an array of "shapes" and save/open them via serialize?

It's kind of an "asap" thingie, so I'd really appreciate an answer. Also, code would be a blessing Documented code would be paradise :P

Thank you in advance,
Elis.

Comments

  • dwccgcdwccgc Posts: 576Member
    [blue]
    Check out the Scribble Tutorial from Microsoft MSDN Library.
    [/blue]

    : Hello everyone,
    :
    : This is gonna be a long post, so please bear with me
    : Also, please have in mind that although I don't lack programming skills, I have little experience using VC++, GDI and MFC.
    :
    : Ok, here goes. I have to create an SDI application that displays a dialog box on RButtonDown in the main frame. The dialog box should contain some comboboxes and buttons from which I select a shape, the mapping mode, pen style / width / color and whatever else might come in handy (like fill color & stuff). I think I've got this part figured out
    :
    : The thing is, after I select these parameters and exit the dialog box, I have to draw the selected shape, using the specified parameters in the main frame. Not having MSDN installed and having a poor internet connection is a bad thing and unfortunately that won't change too soon, that being the reason I'm posting here.
    :
    : Back to the problem. Is there a "shape" class in GDI / MFC that I can use (read: extend) that will cover my needs? That is, something as-easy-as-possible to instantiate and serialize? The objects I draw must be selectable via click and information on them displayed in either a child dialog box or another frame. Also, how do I work with the CAppdrawDoc (appdraw is the name of my app) in order to be able to store an array of "shapes" and save/open them via serialize?
    :
    : It's kind of an "asap" thingie, so I'd really appreciate an answer. Also, code would be a blessing Documented code would be paradise :P
    :
    : Thank you in advance,
    : Elis.
    :
    :

Sign In or Register to comment.