Discussion:
Question regarding docview architecture
(too old to reply)
Fahad Ashfaque
2007-05-23 22:05:04 UTC
Permalink
Hi,
I am kinda new to docview architecture because I have never had to work with
it. I always worked on dialog-based apps.
My question is, I dont see any designer where I can design form and use
classwizard to add variables of components.

Do I just add member variables for each textbox, buttons etc in my view
derived class and then write code to stylize them and show them in
appropriate positions ?


Help is highly appreciated.

Thanks,
Fahad
David Lowndes
2007-05-23 22:50:28 UTC
Permalink
Post by Fahad Ashfaque
I am kinda new to docview architecture because I have never had to work with
it. I always worked on dialog-based apps.
My question is, I dont see any designer where I can design form and use
classwizard to add variables of components.
Fahad,

If you want your view to be like a dialog, base it on CFormView when
you create the application with the wizard.

Dave
Fahad Ashfaque
2007-05-24 14:30:00 UTC
Permalink
Does that mean yes to we have to create objects and write code to stylize
them and position them appropriately on the view in case of no dialog ?
Post by David Lowndes
Post by Fahad Ashfaque
I am kinda new to docview architecture because I have never had to work with
it. I always worked on dialog-based apps.
My question is, I dont see any designer where I can design form and use
classwizard to add variables of components.
Fahad,
If you want your view to be like a dialog, base it on CFormView when
you create the application with the wizard.
Dave
Drew
2007-05-24 15:33:59 UTC
Permalink
CFormView takes a dialog template ID in it's ctor. So, if I
understand your question, no you don't have to create objects(controls)
on the fly to put them in the CFormView.

Drew
Post by Fahad Ashfaque
Does that mean yes to we have to create objects and write code to stylize
them and position them appropriately on the view in case of no dialog ?
Post by David Lowndes
Post by Fahad Ashfaque
I am kinda new to docview architecture because I have never had to work with
it. I always worked on dialog-based apps.
My question is, I dont see any designer where I can design form and use
classwizard to add variables of components.
Fahad,
If you want your view to be like a dialog, base it on CFormView when
you create the application with the wizard.
Dave
David Lowndes
2007-05-24 17:45:44 UTC
Permalink
Post by Fahad Ashfaque
Does that mean yes to we have to create objects and write code to stylize
them and position them appropriately on the view in case of no dialog ?
No it doesn't.

As Drew mentions, a CFormView is a dialog.

Dave

Loading...