Re: Diff between View, FormView and Dialog???
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 16 Oct 2008 22:55:47 -0400
I thought of this explanation later...
There's no difference in what is going on. These are techniques that wrap a dialog box.
There are minor cosmetic issues on the dialog box if it is being used in one of these
contexts (no caption, thin or no border, child or popup, etc.). The wrappers (CFormView,
modal or modeless dialog, property page, etc.) are just ways of managing instances of
dialog templates.
joe
On Thu, 16 Oct 2008 07:58:00 -0700, Jimbo_Jimbob_Jiminator
<JimboJimbobJiminator@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I posted a structure question the other day where CPropertyPage was used as IJoseph M. Newcomer [MVP]
want tabbed pages. I am looking at using a tabbed control class suggest by
J.Newcomer. The documentation for this (CXTabCtrl on codeproject.com)
discussed putting the tab pages on a form or a dialog.
I went to a doc-view based application so I could easily get a tool bar and
menu from the "Wizard." But, I want tabbed pages. All references to tabbed
pages seem to indicate that they go on a dialog or form. I need to put them
onto a view. I some code that already does this. However, from the previous
post it turns out the implementation is incorrect, although it works.
I have read several articles and web pages. I have an MFC book and a Visual
C++ book that cost $50 each and are both 3-1/2 inches thick. I still can't
get my head around the differences between these concepts.
---------------------------------------------------
From:
http://msdn.microsoft.com/en-us/magazine/cc534994.aspx
With regard to different types of windows, the name form is more expressive
than the name dialog. It describes a window that shows other controls, those
controls containing data. I allow both names, but I prefer form. In fact, in
code you'll see this:
typedef form dialog;
Conceptually, there are only two types of windows: controls and forms.
---------------------------------------------------
So, from this I get that form and dialog are the same thing? The words are
interchangeable? But a FormView is Doc-View architecture?!? So it is
simultaneously a form, a dialog and a view?
I swear I just can't get the concepts. I must be 'freakin' remedial. Call an
institution for me and have me committed. Of all the books out there, someone
could write a book just delving into this area only and cramming it
over-and-over into the readers head. I would pay dearly for it. When I Google
it, I see lot's of similar questions but no answers that I can understand.
Too bad MFC is on the way out; It's not worth an author's time now.
---------------------------------------------------
From:
http://www.openroad.org/school/faq/mfc.html#CViewvsVFormView
Every MFC application has a view class responsible for the program's
appearance. Of the many possible view types, the two most common are:
CView - Used mostly for paint and word-processor style programs. This view
class gives you control over the entire client area, but will require you to
do more work in order to interact with the form, such as creating a button,
and responding to it's click.
CFormView - This is used primarily for forms-based programs, like a
database. This view makes it easy to add controls to a program (like a
button) and respond to their events, but harder to control the client area of
the form.
---------------------------------------------------
OK so, it is harder to control the client area of a form in CFormView than
ia CView. Well because a form and a dialog are the same, this former must
actually equate conceptually to a dialog-view. And, if a form is a dialog and
then what is drawn in the user area of a CView, a window? Nothing? A control?
But, a control is actually a window, correct?
I cannot put tabbed pages onto a CView, correct? I can put tabbed pages on a
CFormView, correct? If these are correct, I still don't understand WHY!!!
Can somebody break this down into a Kinder-garden level explanation? After
that, it may be nap time. Then we get to outside and play in the playground!!
Regards, Jim
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Diff between View, FormView and Dialog???
- From: Jimbo_Jimbob_Jiminator
- Re: Diff between View, FormView and Dialog???
- References:
- Diff between View, FormView and Dialog???
- From: Jimbo_Jimbob_Jiminator
- Diff between View, FormView and Dialog???
- Prev by Date: Re: Displaying bitmap image in CStatic control.
- Next by Date: Re: Visual C++ 2008 blank console
- Previous by thread: Re: Diff between View, FormView and Dialog???
- Next by thread: Re: Diff between View, FormView and Dialog???
- Index(es):