Is it possible to add CView inside CFormView?

Hi,

i would like to add CListView inside CFormView.the list adding to the
database but not showing in the list to the user.Is it possible to
add?..
0
srikadi (8)
10/29/2008 4:33:42 AM
vc.mfc 33608 articles. 0 followers. Follow

21 Replies
821 Views

Similar Articles

[PageSpeed] 6

You would use a CListCtrl instead.  It's in the toolbox and you can drag and 
set it up and use much of the functionality of a listview, but you can also 
have other controls on the dialog as well.

Tom

"srikadi" <srikadi@gmail.com> wrote in message 
news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
> Hi,
>
> i would like to add CListView inside CFormView.the list adding to the
> database but not showing in the list to the user.Is it possible to
> add?.. 

0
tom.nospam (3240)
10/29/2008 4:49:09 AM
On Oct 29, 9:49=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> You would use a CListCtrl instead. =A0It's in the toolbox and you can dra=
g and
> set it up and use much of the functionality of a listview, but you can al=
so
> have other controls on the dialog as well.
>
> Tom
>
> "srikadi" <srik...@gmail.com> wrote in message
>
> news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
>
>
>
> > Hi,
>
> > i would like to add CListView inside CFormView.the list adding to the
> > database but not showing in the list to the user.Is it possible to
> > add?..- Hide quoted text -
>
> - Show quoted text -

Hi,
thanx for reply,but now i can't use CListCtrl instead of Clistview..
could you give any more ideas..
I tried to add CdialogBar but i couldn't able to add..
0
srikadi (8)
10/29/2008 4:58:54 AM
srikadi wrote:
> thanx for reply,but now i can't use CListCtrl instead of Clistview..

Why not?

> could you give any more ideas..
> I tried to add CdialogBar but i couldn't able to add..

Why not?

You ned to give *way* more detail of what you are trying to do here.

-- 
David Wilkinson
Visual C++ MVP
0
no-reply8010 (1791)
10/29/2008 9:50:25 AM
That statement doesn't even make sense.  A CListView is nothing more than a CListCtrl with
a view around it, therefore, there is no reason you cannot use a CListCtrl, since all you
are eliminating is the unnecessary wrapper!
					joe

On Tue, 28 Oct 2008 21:58:54 -0700 (PDT), srikadi <srikadi@gmail.com> wrote:

>On Oct 29, 9:49�am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>> You would use a CListCtrl instead. �It's in the toolbox and you can drag and
>> set it up and use much of the functionality of a listview, but you can also
>> have other controls on the dialog as well.
>>
>> Tom
>>
>> "srikadi" <srik...@gmail.com> wrote in message
>>
>> news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
>>
>>
>>
>> > Hi,
>>
>> > i would like to add CListView inside CFormView.the list adding to the
>> > database but not showing in the list to the user.Is it possible to
>> > add?..- Hide quoted text -
>>
>> - Show quoted text -
>
>Hi,
>thanx for reply,but now i can't use CListCtrl instead of Clistview..
>could you give any more ideas..
>I tried to add CdialogBar but i couldn't able to add..
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
10/29/2008 2:55:28 PM
As others have already mentioned you should use a CListCtrl in your 
CFormView.

But if you really insist on putting a CListView in your CFormView you could 
use this:
http://www.codeproject.com/KB/docview/dfv.aspx

AliR.


"srikadi" <srikadi@gmail.com> wrote in message 
news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
> Hi,
>
> i would like to add CListView inside CFormView.the list adding to the
> database but not showing in the list to the user.Is it possible to
> add?.. 


0
AliR3470 (3236)
10/29/2008 4:03:08 PM
Hi,

I know how difficult getting start is so don't worry about the questions...

You want a CFormView for your view then you can easily add a list control to 
it.  I mentioned this in a previous thread, but just wanted to mention here 
as well in case you don't see that one.  If you started the project with a 
list view (and you're just getting started) I'd just create a new project 
with a form view instead.  You can change the view easily while creating the 
project and it is a ton easier than changing it after the fact.

Tom

"srikadi" <srikadi@gmail.com> wrote in message 
news:b6e5c7f6-e140-49f2-9766-a791246cec5a@a17g2000prm.googlegroups.com...
On Oct 29, 9:49 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> You would use a CListCtrl instead. It's in the toolbox and you can drag 
> and
> set it up and use much of the functionality of a listview, but you can 
> also
> have other controls on the dialog as well.
>
> Tom
>
> "srikadi" <srik...@gmail.com> wrote in message
>
> news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
>
>
>
> > Hi,
>
> > i would like to add CListView inside CFormView.the list adding to the
> > database but not showing in the list to the user.Is it possible to
> > add?..- Hide quoted text -
>
> - Show quoted text -

Hi,
thanx for reply,but now i can't use CListCtrl instead of Clistview..
could you give any more ideas..
I tried to add CdialogBar but i couldn't able to add.. 

0
tom.nospam (3240)
10/29/2008 6:25:52 PM
General speaking it is not a good software design to assume MFC won't 
introduce new functions in CView that assume its parent window is a 
CFrameWnd. It introduces more headache than benefit.

I would extract a GetListCtrl interface from CListControl and CListView and 
operate the SysListView32 windows via the interface.



"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:oP%Nk.6866$YU2.3036@nlpi066.nbdc.sbc.com...
> As others have already mentioned you should use a CListCtrl in your 
> CFormView.
>
> But if you really insist on putting a CListView in your CFormView you 
> could use this:
> http://www.codeproject.com/KB/docview/dfv.aspx
>
> AliR.
>
>
> "srikadi" <srikadi@gmail.com> wrote in message 
> news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
>> Hi,
>>
>> i would like to add CListView inside CFormView.the list adding to the
>> database but not showing in the list to the user.Is it possible to
>> add?..
>
> 
0
sheng_jiang (305)
11/3/2008 12:27:35 PM
I agree.  There is no reason to say "I have to use a CListView" when there is no reason I
know of that this is required.  
				joe

On Mon, 3 Nov 2008 06:27:35 -0600, "Sheng Jiang[MVP]" <sheng_jiang@hotmail.com.discuss>
wrote:

>General speaking it is not a good software design to assume MFC won't 
>introduce new functions in CView that assume its parent window is a 
>CFrameWnd. It introduces more headache than benefit.
>
>I would extract a GetListCtrl interface from CListControl and CListView and 
>operate the SysListView32 windows via the interface.
>
>
>
>"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
>news:oP%Nk.6866$YU2.3036@nlpi066.nbdc.sbc.com...
>> As others have already mentioned you should use a CListCtrl in your 
>> CFormView.
>>
>> But if you really insist on putting a CListView in your CFormView you 
>> could use this:
>> http://www.codeproject.com/KB/docview/dfv.aspx
>>
>> AliR.
>>
>>
>> "srikadi" <srikadi@gmail.com> wrote in message 
>> news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com...
>>> Hi,
>>>
>>> i would like to add CListView inside CFormView.the list adding to the
>>> database but not showing in the list to the user.Is it possible to
>>> add?..
>>
>> 
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
11/3/2008 4:13:38 PM
On Nov 3, 9:13=A0pm, Joseph M. Newcomer <newco...@flounder.com> wrote:
> I agree. =A0There is no reason to say "I have to use a CListView" when th=
ere is no reason I
> know of that this is required. =A0
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 joe
>
> On Mon, 3 Nov 2008 06:27:35 -0600, "Sheng Jiang[MVP]" <sheng_ji...@hotmai=
l.com.discuss>
> wrote:
>
>
>
>
>
> >General speaking it is not a good software design to assume MFC won't
> >introduce new functions in CView that assume its parent window is a
> >CFrameWnd. It introduces more headache than benefit.
>
> >I would extract a GetListCtrl interface from CListControl and CListView =
and
> >operate the SysListView32 windows via the interface.
>
> >"AliR (VC++ MVP)" <A...@online.nospam> wrote in message
> >news:oP%Nk.6866$YU2.3036@nlpi066.nbdc.sbc.com...
> >> As others have already mentioned you should use a CListCtrl in your
> >> CFormView.
>
> >> But if you really insist on putting a CListView in your CFormView you
> >> could use this:
> >>http://www.codeproject.com/KB/docview/dfv.aspx
>
> >> AliR.
>
> >> "srikadi" <srik...@gmail.com> wrote in message
> >>news:9501fa74-679e-47b9-8813-db0b55cd376a@c2g2000pra.googlegroups.com..=
..
> >>> Hi,
>
> >>> i would like to add CListView inside CFormView.the list adding to the
> >>> database but not showing in the list to the user.Is it possible to
> >>> add?..
>
> Joseph M. Newcomer [MVP]
> email: newco...@flounder.com
> Web:http://www.flounder.com
> MVP Tips:http://www.flounder.com/mvp_tips.htm- Hide quoted text -
>
> - Show quoted text -

Hi,

why every one suggests me to use CListCtrl instead of CListView.if any
reason for this plz provide supported documents.
0
srikadi (8)
11/12/2008 4:29:15 AM
The only reason to use a list control over a list view is you get the 
benefit of making it easy to put other controls on the dialog in the 
CFormView.  Otherwise they are the same thing (CListView is just an 
encapsulated CListCtrl).  Being able to put other controls (a tree control, 
buttons, edit controls, etc.) on the dialog is often a really nice feature.

Tom

"srikadi" <srikadi@gmail.com> wrote in message 
news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com...

Hi,

why every one suggests me to use CListCtrl instead of CListView.if any
reason for this plz provide supported documents. 

0
tom.nospam (3240)
11/12/2008 5:25:11 AM
On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> The only reason to use a list control over a list view is you get the
> benefit of making it easy to put other controls on the dialog in the
> CFormView. =A0Otherwise they are the same thing (CListView is just an
> encapsulated CListCtrl). =A0Being able to put other controls (a tree cont=
rol,
> buttons, edit controls, etc.) on the dialog is often a really nice featur=
e.
>
> Tom
>
> "srikadi" <srik...@gmail.com> wrote in message
>
> news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com...
>
> Hi,
>
> why every one suggests me to use CListCtrl instead of CListView.if any
> reason for this plz provide supported documents.

k..but i have already CListViews code..so i want to use CListviews.so
plz suggest me with CListView.
0
srikadi (8)
11/12/2008 10:50:27 AM
On 12 nov, 11:50, srikadi <srik...@gmail.com> wrote:
> On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>
>
>
>
>
> > The only reason to use a list control over a list view is you get the
> > benefit of making it easy to put other controls on the dialog in the
> > CFormView. =A0Otherwise they are the same thing (CListView is just an
> > encapsulated CListCtrl). =A0Being able to put other controls (a tree co=
ntrol,
> > buttons, edit controls, etc.) on the dialog is often a really nice feat=
ure.
>
> > Tom
>
> > "srikadi" <srik...@gmail.com> wrote in message
>
> >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com..=
..
>
> > Hi,
>
> > why every one suggests me to use CListCtrl instead of CListView.if any
> > reason for this plz provide supported documents.
>
> k..but i have already CListViews code..so i want to use CListviews.so
> plz suggest me with CListView.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Well, you've asked a question and several very experienced developers
(MVPs and stuff) have told you the same answer, so maybe that's the
way to go. If you explain better what you want to do (not how you
think it should be solved, but what you want to achieve), what are
your costraints (maybe some external code you can't touch), etc. you
might get a more elaborate answer.
But I would say that for the general question "how can I put a
CListView in a CFormView?", the answer you'll get most of the time is
"Use a CListCtrl, not a CListView".

Now, not being a big expert myself, I would say that you put controls
in a CFormView, not views. You don't put views in views. There is
probably a way around it, but it's probably more troublesome than
adapting the code to use a CListCtrl.
0
mikel.luri (90)
11/12/2008 1:06:59 PM
I'm not sure what else to say.  I'm not sure why you are adamant about 
putting a view in a view when simply using the control and getting the exact 
functionality is so much easily, but it's your program and you can do it any 
way you'd like.  I do have a question though.  If you already have the code 
what exactly are you asking for from this group?

If you already have some code with a CListView and just want to plug that 
into a CFormView, I'd still suggest using a list control and just going 
through the code you have and putting something like the following after 
creating a control variable for the control in the form view:

m_cMyListCtrl.InsertItem(...);

in front of each of the calls that used to be called directly in the 
CListView (like a InsertItem call).  If you want to post a code snippet from 
your ListView code I'd be happy to do a few of the conversions for you as an 
example.

Tom

"srikadi" <srikadi@gmail.com> wrote in message 
news:ee490180-3ec8-410d-8f99-e8986aabef37@s9g2000prg.googlegroups.com...
On Nov 12, 10:25 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
> The only reason to use a list control over a list view is you get the
> benefit of making it easy to put other controls on the dialog in the
> CFormView. Otherwise they are the same thing (CListView is just an
> encapsulated CListCtrl). Being able to put other controls (a tree control,
> buttons, edit controls, etc.) on the dialog is often a really nice 
> feature.
>
> Tom
>
> "srikadi" <srik...@gmail.com> wrote in message
>
> news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com...
>
> Hi,
>
> why every one suggests me to use CListCtrl instead of CListView.if any
> reason for this plz provide supported documents.

k..but i have already CListViews code..so i want to use CListviews.so
plz suggest me with CListView. 

0
tom.nospam (3240)
11/12/2008 4:46:13 PM
I've seen people put views in views before, but never really understood why 
since there is almost always a correlative control for the specialized view 
and that is so much easier.  I have had occasion to put dialogs on dialogs 
(parent/child sort of thing), but I think that is a different animal.

Tom


"Mikel" <mikel.luri@gmail.com> wrote in message 
news:4b778c3f-8199-4e6e-8459-299657f3e77d@a26g2000prf.googlegroups.com...
On 12 nov, 11:50, srikadi <srik...@gmail.com> wrote:
> On Nov 12, 10:25 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>
>
>
>
>
> > The only reason to use a list control over a list view is you get the
> > benefit of making it easy to put other controls on the dialog in the
> > CFormView. Otherwise they are the same thing (CListView is just an
> > encapsulated CListCtrl). Being able to put other controls (a tree 
> > control,
> > buttons, edit controls, etc.) on the dialog is often a really nice 
> > feature.
>
> > Tom
>
> > "srikadi" <srik...@gmail.com> wrote in message
>
> >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com...
>
> > Hi,
>
> > why every one suggests me to use CListCtrl instead of CListView.if any
> > reason for this plz provide supported documents.
>
> k..but i have already CListViews code..so i want to use CListviews.so
> plz suggest me with CListView.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Well, you've asked a question and several very experienced developers
(MVPs and stuff) have told you the same answer, so maybe that's the
way to go. If you explain better what you want to do (not how you
think it should be solved, but what you want to achieve), what are
your costraints (maybe some external code you can't touch), etc. you
might get a more elaborate answer.
But I would say that for the general question "how can I put a
CListView in a CFormView?", the answer you'll get most of the time is
"Use a CListCtrl, not a CListView".

Now, not being a big expert myself, I would say that you put controls
in a CFormView, not views. You don't put views in views. There is
probably a way around it, but it's probably more troublesome than
adapting the code to use a CListCtrl. 

0
tom.nospam (3240)
11/12/2008 4:48:39 PM

srikadi wrote:
> On Nov 12, 10:25 am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>> The only reason to use a list control over a list view is you get the
>> benefit of making it easy to put other controls on the dialog in the
>> CFormView.  Otherwise they are the same thing (CListView is just an
>> encapsulated CListCtrl).  Being able to put other controls (a tree control,
>> buttons, edit controls, etc.) on the dialog is often a really nice feature.
>>
>> Tom
>>
>> "srikadi" <srik...@gmail.com> wrote in message
>>
>> news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com...
>>
>> Hi,
>>
>> why every one suggests me to use CListCtrl instead of CListView.if any
>> reason for this plz provide supported documents.
> 
> k..but i have already CListViews code..so i want to use CListviews.so
> plz suggest me with CListView.

Did your version of VS come with an editor ?

Really, you are making it hard for yourself.
0
11/12/2008 6:13:25 PM
On Nov 12, 5:50=A0am, srikadi <srik...@gmail.com> wrote:
> On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>
>
>
> > The only reason to use a list control over a list view is you get the
> > benefit of making it easy to put other controls on the dialog in the
> > CFormView. =A0Otherwise they are the same thing (CListView is just an
> > encapsulated CListCtrl). =A0Being able to put other controls (a tree co=
ntrol,
> > buttons, edit controls, etc.) on the dialog is often a really nice feat=
ure.
>
> > Tom
>
> > "srikadi" <srik...@gmail.com> wrote in message
>
> >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com..=
..
>
> > Hi,
>
> > why every one suggests me to use CListCtrl instead of CListView.if any
> > reason for this plz provide supported documents.
>
> k..but i have already CListViews code..so i want to use CListviews.so
> plz suggest me with CListView.

This is not making any sense. You should try to understand the
difference between listview and listctrl and why and when would you
use one over the other. If you are not using doc-view, stick with
listctrl. In a formview, you will not use listview as it will not
participate in doc-view architecture.

--
Ajay
0
ajaykalra (6842)
11/12/2008 7:24:51 PM
On Nov 13, 12:24=A0am, Ajay Kalra <ajayka...@yahoo.com> wrote:
> On Nov 12, 5:50=A0am, srikadi <srik...@gmail.com> wrote:
>
>
>
>
>
> > On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote:
>
> > > The only reason to use a list control over a list view is you get the
> > > benefit of making it easy to put other controls on the dialog in the
> > > CFormView. =A0Otherwise they are the same thing (CListView is just an
> > > encapsulated CListCtrl). =A0Being able to put other controls (a tree =
control,
> > > buttons, edit controls, etc.) on the dialog is often a really nice fe=
ature.
>
> > > Tom
>
> > > "srikadi" <srik...@gmail.com> wrote in message
>
> > >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.com=
....
>
> > > Hi,
>
> > > why every one suggests me to use CListCtrl instead of CListView.if an=
y
> > > reason for this plz provide supported documents.
>
> > k..but i have already CListViews code..so i want to use CListviews.so
> > plz suggest me with CListView.
>
> This is not making any sense. You should try to understand the
> difference between listview and listctrl and why and when would you
> use one over the other. If you are not using doc-view, stick with
> listctrl. In a formview, you will not use listview as it will not
> participate in doc-view architecture.
>
> --
> Ajay- Hide quoted text -
>
> - Show quoted text -

Hi,

i was using Doc-view architecture.
>I would say that you put controls
in a CFormView, not views. You don't put views in views.
why we don't put views in views.could you provide any document to
support your answer.
0
srikadi (8)
11/13/2008 6:04:07 AM
On 13 nov, 07:04, srikadi <srik...@gmail.com> wrote:
> On Nov 13, 12:24=A0am, Ajay Kalra <ajayka...@yahoo.com> wrote:
>
>
>
>
>
> > On Nov 12, 5:50=A0am, srikadi <srik...@gmail.com> wrote:
>
> > > On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wrote=
:
>
> > > > The only reason to use a list control over a list view is you get t=
he
> > > > benefit of making it easy to put other controls on the dialog in th=
e
> > > > CFormView. =A0Otherwise they are the same thing (CListView is just =
an
> > > > encapsulated CListCtrl). =A0Being able to put other controls (a tre=
e control,
> > > > buttons, edit controls, etc.) on the dialog is often a really nice =
feature.
>
> > > > Tom
>
> > > > "srikadi" <srik...@gmail.com> wrote in message
>
> > > >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups.c=
om...
>
> > > > Hi,
>
> > > > why every one suggests me to use CListCtrl instead of CListView.if =
any
> > > > reason for this plz provide supported documents.
>
> > > k..but i have already CListViews code..so i want to use CListviews.so
> > > plz suggest me with CListView.
>
> > This is not making any sense. You should try to understand the
> > difference between listview and listctrl and why and when would you
> > use one over the other. If you are not using doc-view, stick with
> > listctrl. In a formview, you will not use listview as it will not
> > participate in doc-view architecture.
>
> > --
> > Ajay- Hide quoted text -
>
> > - Show quoted text -
>
> Hi,
>
> i was using Doc-view architecture.>I would say that you put controls
>
> in a CFormView, not views. You don't put views in views.
> why we don't put views in views.could you provide any document to
> support your answer.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

Well, of course I don't have a document that says you can't put views
in views. In fact, documentation usually says what can be done, not
everything that can't or shouldn't be done. It would be infinite.
However, from Jeff Prosise's "Programming Windows with MFC" (Chapter
9):
"The frame window is the application's top-level window. It's normally
a WS_OVERLAPPEDWINDOW-style window with a resizing border, a title
bar, a system menu, and minimize, maximize, and close buttons. The
view is a child window sized to fit the frame window so that it
becomes, for all practical purposes, the frame window's client area." -
> So Frame Windows hold views.
Later: "[...] the frame window object, which defines the application's
physical workspace on the screen and serves as a container for a view.
"

So the MFC Doc/View architecture is designed so that Frame Windows are
the containers for Views. All the classes involved in this
architecture "think" that a View's container is a Frame Window, and
all the command routing and all the interactions between classes are
designed with this in mind.

Now, you want to put a CListView in a CFormView? There's probably a
way to do it. It will not be easy, though.

However, you still haven't said why you can't use a CListCtrl, which
is, as others (much more experienced than me, by the way) have already
told you, what you would _normally_ use to show a list in a CFormView.
If your "conditions" are not "normal", though, what you are asking
might make sense. But until you explain it better, I guess you'll get
the same answer over and over again.

Now, let's take a look at MSDN:
About CListView "CListView Simplifies use of the list control and of
CListCtrl, the class that encapsulates list-control functionality,
with MFC's document-view architecture."  And about CFormView: "A form
view is essentially a view that contains controls." (See? "controls",
not "views").

So if you want a view that is only a list, you would use CListView.
But if you want a view with several controls in it, you would use
CFormView. If one of this controls is a List, it will be a CListCtrl,
because it's controls what the CFormView holds.

0
mikel.luri (90)
11/13/2008 8:58:37 AM
On Nov 13, 1:58=A0pm, Mikel <mikel.l...@gmail.com> wrote:
> On 13 nov, 07:04, srikadi <srik...@gmail.com> wrote:
>
>
>
>
>
> > On Nov 13, 12:24=A0am, Ajay Kalra <ajayka...@yahoo.com> wrote:
>
> > > On Nov 12, 5:50=A0am, srikadi <srik...@gmail.com> wrote:
>
> > > > On Nov 12, 10:25=A0am, "Tom Serface" <tom.nos...@camaswood.com> wro=
te:
>
> > > > > The only reason to use a list control over a list view is you get=
 the
> > > > > benefit of making it easy to put other controls on the dialog in =
the
> > > > > CFormView. =A0Otherwise they are the same thing (CListView is jus=
t an
> > > > > encapsulated CListCtrl). =A0Being able to put other controls (a t=
ree control,
> > > > > buttons, edit controls, etc.) on the dialog is often a really nic=
e feature.
>
> > > > > Tom
>
> > > > > "srikadi" <srik...@gmail.com> wrote in message
>
> > > > >news:287acc7a-33a6-4231-a277-c3a4aa7ed567@h23g2000prf.googlegroups=
..com...
>
> > > > > Hi,
>
> > > > > why every one suggests me to use CListCtrl instead of CListView.i=
f any
> > > > > reason for this plz provide supported documents.
>
> > > > k..but i have already CListViews code..so i want to use CListviews.=
so
> > > > plz suggest me with CListView.
>
> > > This is not making any sense. You should try to understand the
> > > difference between listview and listctrl and why and when would you
> > > use one over the other. If you are not using doc-view, stick with
> > > listctrl. In a formview, you will not use listview as it will not
> > > participate in doc-view architecture.
>
> > > --
> > > Ajay- Hide quoted text -
>
> > > - Show quoted text -
>
> > Hi,
>
> > i was using Doc-view architecture.>I would say that you put controls
>
> > in a CFormView, not views. You don't put views in views.
> > why we don't put views in views.could you provide any document to
> > support your answer.- Ocultar texto de la cita -
>
> > - Mostrar texto de la cita -
>
> Well, of course I don't have a document that says you can't put views
> in views. In fact, documentation usually says what can be done, not
> everything that can't or shouldn't be done. It would be infinite.
> However, from Jeff Prosise's "Programming Windows with MFC" (Chapter
> 9):
> "The frame window is the application's top-level window. It's normally
> a WS_OVERLAPPEDWINDOW-style window with a resizing border, a title
> bar, a system menu, and minimize, maximize, and close buttons. The
> view is a child window sized to fit the frame window so that it
> becomes, for all practical purposes, the frame window's client area." -> =
So Frame Windows hold views.
>
> Later: "[...] the frame window object, which defines the application's
> physical workspace on the screen and serves as a container for a view.
> "
>
> So the MFC Doc/View architecture is designed so that Frame Windows are
> the containers for Views. All the classes involved in this
> architecture "think" that a View's container is a Frame Window, and
> all the command routing and all the interactions between classes are
> designed with this in mind.
>
> Now, you want to put a CListView in a CFormView? There's probably a
> way to do it. It will not be easy, though.
>
> However, you still haven't said why you can't use a CListCtrl, which
> is, as others (much more experienced than me, by the way) have already
> told you, what you would _normally_ use to show a list in a CFormView.
> If your "conditions" are not "normal", though, what you are asking
> might make sense. But until you explain it better, I guess you'll get
> the same answer over and over again.
>
> Now, let's take a look at MSDN:
> About CListView "CListView Simplifies use of the list control and of
> CListCtrl, the class that encapsulates list-control functionality,
> with MFC's document-view architecture." =A0And about CFormView: "A form
> view is essentially a view that contains controls." (See? "controls",
> not "views").
>
> So if you want a view that is only a list, you would use CListView.
> But if you want a view with several controls in it, you would use
> CFormView. If one of this controls is a List, it will be a CListCtrl,
> because it's controls what the CFormView holds.- Hide quoted text -
>
> - Show quoted text -

i need to take permission from my client..so i need to show some
document to support my answer..actually i did in another way..but my
client wants in this way...so i was trying to do this one..
i am very begginer in MFC..so its not easy for me change ListView to
Listctrl....

if u provide any doc it would be very helpful for me...
0
srikadi (8)
11/13/2008 10:47:16 AM
On Nov 13, 1:04=A0am, srikadi <srik...@gmail.com> wrote:

> in a CFormView, not views. You don't put views in views.
> why we don't put views in views.

A view is an attribute in doc-view architecture. You can force a view
to be a child of another view. But it doesnt make any sense. The
question you have to ask is, why do you want to do this. There is no
logical explaination to use listview as a child of CFormView instead
of Clistctrl.

> could you provide any document to support your answer.

No. Somethings are very obvious.

--
Ajay


0
ajaykalra (6842)
11/13/2008 1:59:51 PM
Didn't mean to imply you "couldn't".  You can certainly do anything you'd 
like.  I was simply saying I "wouldn't" and trying to provide an easier way 
to implement it.

Tom

"srikadi" <srikadi@gmail.com> wrote in message 
news:7154da7e-16cf-4ab0-af53-60fb8076ca80@d36g2000prf.googlegroups.com...
On Nov 13, 12:24 am, Ajay Kalra <ajayka...@yahoo.com> wrote:
Hi,

i was using Doc-view architecture.
>I would say that you put controls
in a CFormView, not views. You don't put views in views.
why we don't put views in views.could you provide any document to
support your answer. 

0
tom.nospam (3240)
11/13/2008 9:01:19 PM
Reply:

Similar Artilces:

How to add patterns to excel tia sal2
Greets All I would like to make/add a pattern for a background cell in excel how can I make one and add it to the options in excel to choose from? Tia Excel has a limited color model and you can't add/subtract from what's offered; Try using the Insert menu > Picture command > from file to import a jpeg or gif image, then size it to the cell. HTH "temp@temp.com" wrote: > Greets All > > I would like to make/add a pattern for a background cell in excel how can I > make one and add it to the options in excel to choose from? > > Tia > ...

(2nd attempt)How to create CMainFrame-based dialog to display variable number of listboxes in a CFormView
Hello, I have an app where I need to display a variable number of CListBoxes (in a single row) in a CFormView. I don't know how to dynamically create the CListBoxes and attach them to the CFormView, something that would normally be done through resources if it were a fixed number of listboxes.. Could anyone give me an idea of how to dynamically allocate and attach controls and then any cleanup? I also need to know how to manually hook up a CMainFrame with a CFormView, as the AppWizard only creates something like that as a topmost window, I think. Any help would be greatly appreciate...

CFormView #2
Hello, I am writing a wizard and I want to use the CFormView in a dialog for each window, except I can't figure out how to do that. Can someone give me some pointers? Thanks ...

I can't edit existing records, only add new
I created a form with the intent of being an 'add new contact' form. Well, I want to reuse the form as an edit/update contact form also. The problem is, I can't view any existing records. I have allow edits, deletions, additions enabled. Record locks = no locks. Record selector and navigation buttons = yes. What am i missing? Data Entry property Regards Jeff Boyce Microsoft Office/Access MVP "MeSteve" <MeSteve@discussions.microsoft.com> wrote in message news:11129652-032B-4966-80CC-7AAD8E18162C@microsoft.com... >I created a form with the intent of ...

MultiCurrency Question
Hi: I am in a situation where a canadian based company whose Products and Product List is in Canadian Dollars wants to create a Quote in US dollars. It seems that we cannot add the products with Canadian Dollars Currency in a USD Price List when we are using a Percent method of pricing. If that is the case, how can it be handled? I cannot create 2 sets of the same Product because the exchange rate is not fixed. Typically, CRM should be calculating the currency in USD using the exchange rate that's provided, but CRM simply is refusing to allow me to add a product with a different c...

Can't track message from outside to inside after enable message tracking on exchange 5.5 #3
Dear, I am using a Exchange 5.5 SP4 on Window 2000 SP4 We would want to track all message for debug use. So, I have enable the message Tracking. After enable it, I find that it can track the information for send mail between internal and send mail from internal to external But can't tray the information from outside to internal mailbox. I have do below setting on my exchange server, Is there any missing on the setting. Hope anyone can give me some help 1) Information Store Site Configuration Properties --> General --> tick Enable message tracking box 2) MTA Site Configuration Prop...

Can't add a standard inventory item
Hello, When we select "new" and "standard" we get "runtime error 94 invalid use of null". However we can add other types of items...matrix. We found an article on the knowledgebase and tried those suggestions (they were for Quicksell 2000) but it didn't work. We re-applied the most recent service pack and ran the maintainence and check on the database. Nothing is helping. Anyone seen this before or have any suggestiosn for me. Thanks. Pat Pat@arms wrote: > Hello, > When we select "new" and "standard" we get "runtime error ...

Workflow Call Assembly to add Date or Time
I cannot get a very simple workflow to work. All I want it to do is update a datetime field to add one month! Workflow monitor says it completed, but it has never worked... Has anyone ever been able to make this work? On 26 Mar, 18:54, "DubSport" <jamie.carmich...@cmgl.ca> wrote: > I cannot get a very simple workflow to work. All I want it to do is > update a datetime field to add one month! Workflow monitor says it > completed, but it has never worked... Has anyone ever been able to > make this work? Show your workflow rule OK here it is. its a manual rule, s...

How do I add LEFT to this array?
=SUMPRODUCT(--(ISERROR(SEARCH("Account Request",'Incident Data'!$E$2:$E$5000))=FALSE),--(MONTH('Incident Data'!$G$2:$G$5000)=MONTH(C$8))) I want to modify it to restrict where it looks for "Account Request". I figure add LEFT('Incident Data'!$E$2:$E$5000,15) however that returns an error. I also tried putting LEFT after SEARCH. I am still very new to SUMPRoduct and I had help coming up with the formula above; which works perfectly now. I am also reading through: http://www.xldynamic.com/source/xld.SUMPRODUCT.html I don't want to break my ...

Add new account
I have added a new bank account, I selected New and when I click the 'Investment' row, there is a drop menu with very old accounts which dont use anymore. Where can these accounts be viewed, and deleted as necessary? Thank you ...

How do I add a disclaimer to my outgoing emails
I want to add a disclaimer to the bottom of all my outgoing emails, after my signature. How do i do that please? > I want to add a disclaimer to the bottom of all my outgoing emails, > after my signature. How do i do that please? I hate to submit the obvious but: Add it to your signature, at the bottom of it? -- f.h. Microsoft Outlook MVP See http://www.slipstick.com/addins/sig.asp for tools. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Outlook Tips by email: mailto:dailytips-sub...

Can't add file to VC7 project
I'm sure this is a very idiotic question, but I can't seem to add file.h and file.cpp to my project.. -Both files are in the same folder with the other project files. -I did a File/add existing item/ then picked the files from the dialog. -Clicked open. But then Solution Explorer did not show the files??? (It does work OK on another computer with same software.) Why might this be??? Thanks, E-Jo Hello Everett, > I'm sure this is a very idiotic question, but I can't seem to > add file.h and file.cpp to my project.. > -Both files are in the same folder with the ...

Automatically add 1 until a number is found
Hiya, I am developing a spreadsheet which basically grosses-up a paymen which i have to make to an employee. What I'd like to do is take a cell and add 1 automatically until th number equals a specific equation. Is this feasible? Thanks Jame -- Message posted from http://www.ExcelForum.com Hi Have a look at Tools / Goal Seek. It might be what you are looking for. -- Andy. "jkyndt >" <<jkyndt.1a3rda@excelforum-nospam.com> wrote in message news:jkyndt.1a3rda@excelforum-nospam.com... > Hiya, > > I am developing a spreadsheet which basically grosses-u...

add from option to new mrssages
I want to add the option of choosing which account I am sending my mail from as I manage multiple accounts. "Sue" <Sue@discussions.microsoft.com> wrote in message news:701DABFB-2B8B-46CB-B21A-98F646FFA74A@microsoft.com... > I want to add the option of choosing which account I am sending my mail > from > as I manage multiple accounts. Click the Account button in the New Message window.... ...

Add the URL of a Task into a Task description on Workflow?
Hi there, i was wondering if it is at all possible to put the url of a task into the email that the object sends to the owner of the object (so that they can click and see the task). In the WFParameter table there's something like this: Due Date: &1160; Description: &1122; Scheduled Duration: &1144; Is there an &XXXX code for the id? Thanks, Jack. ------=_NextPart_0001_10CF516A Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Jack~ This may be possible to do with an e-mail activity. I would try posting this to the SDK group at microsoft.public.crm.deve...

Prohibiting mail from cia.gov and fbi.gov
Hi, I've noticed a lot of threads flying around about this problem. We've recently been inundated. We've got Symantec AVF for Exchange which works to some extent but doesn't stop the email from being submitted after removal of the attachment. What we did here in addition to Symantec AVF was to go into Exchange under Global Settings / Message Delivery properties / Filtering and enter *cia.gov and *fbi.gov as filtered domains. I tested this by entering *yahoo.com and sent myself a message from a yahoo account and the message was bounced back to me as a Mailer Daemon m...

Bulk E-mailing
Any recommendations for an add-on that allows users to perform bulk e-mails based on criteria that span across more than one entity ? For example, give me a list of accounts that are classified A, in the steel industry and have ‘allow bulk e-mail’ set to true … then for those accounts give me every associated contact but exclude contacts that have ‘allow bulk e-mail’ set to false and exclude contacts with an invalid e-mail address … (btw, some of the fields I used are custom fields we have added, so the add-on would need to recognise custom fields and allow filtering on them). Thanks I...

Report Manager Add-In #2
I am running Excel 2003. I tired downloading the report manager add in for Excel 2002. I cannot run the exe file to install the add in. I have heard others say they have done this successfully with Excel 2003. HELP!!!!! TIA Hi Sue does the information contained in http://support.microsoft.com/default.aspx?scid=kb;en-us;873209 help? Cheers JulieD "Sue" <anonymous@discussions.microsoft.com> wrote in message news:790601c52651$fa0f7290$a401280a@phx.gbl... >I am running Excel 2003. I tired downloading the report > manager add in for Excel 2002. I cannot run th...

How do I add Outlook Express to my Live ID-hotmail account?
I have a LiveID hotmail account, and now I would like to add Outlook Express program to the mix. Will someone tell me how to do this in the fewest possible steps. thank you, Why Me Too. "Why Me Too" <Why Me Too@discussions.microsoft.com> wrote in message news:6BC93EEC-D607-4F3B-B89E-48E958B78674@microsoft.com... > I have a LiveID hotmail account, and now I would like to add Outlook > Express > program to the mix. > Will someone tell me how to do this in the fewest possible steps. > thank you, > Why Me Too. Two points - firstly you've...

Possible to Promote Outlook Contacts to CRM Contacts?
Is there a way to promote Outlook Contacts to CRM Contacts? Further, if Contacts are loaded into CRM, and the CRM for Outlook Client is sync'd with Outlook, all the CRM Contacts come down to Outlook. That is great except for duplicates coming from CRM to Outlook. Any way to merge duplicate Contact records then in Outlook? Thanks, Boolean1 Boolean1 wrote: > Is there a way to promote Outlook Contacts to CRM Contacts? > > Further, if Contacts are loaded into CRM, and the CRM for Outlook > Client is sync'd with Outlook, all the CRM Contacts come down to > Outlo...

How do I add row total when cell contains both number and letter .
I have a timesheet spreadsheet. Cell contents include hours and coding. Example: 8 (8 hours regular pay-no letter) or 8V (8 hours vacation pay). I want to have a total at the end but my formula will only read the cells that don't have a letter after the number. If the text value is always "V" you could use something like =SUM(IF(RIGHT(A18:A21,1)="V",VALUE(LEFT(A18:A21,LEN(A18:A21)-1)),A18:A21)) entered as an array formula (control-shift -return) If there are other codes than just V, it gets a little more complex. if the coding is never more than just one charac...

AutoSave Add-in Not Loading-2nd request for assistance
(Posted last week in "Excel-SetUp" with no response; trying again in a more active group) Running Office 2000 with Excel on Windows XP. Just switched over from Windows 98 on a new computer and loaded Office 2000 with it. Works fine, except have to remember to recheck and reload the AutoSave (and any other) Add-in every time I open Excel. Have tried saving a new template to Excel start and have browsed thru the knowledge base but haven't found anything. With Windows 98, once they were installed, they stayed there and opened with Excel. Suggestions, please. Thanks Maybe...

CRM com add-ins disappear
We have more than 50+ user had CRM installed to their laptops and desktops. All fix and updates have been installed. For some odd reason, few of the user starting to experiencing CRM Com Add-ins disappearing. please advise Mitch, Many issues regarding Outlook Client were solved during the last months. I guess installing the Update Rollup 2 could help you narrow your problems. You can download the new pack here: http://support.microsoft.com/kb/927751 Regards, Leo Lopes @ L3 We're seeing the same thing. It seems especially problematic for those who have laptops that serve as the...

Is it possible to convert Ex5.5 CRs into AD mail-enabled users?
Hello, We have a mixed messaging environment with some users on Ex5.5 and some on another mailsystem. For convenience, the non-Exchange users have been added to the Ex5.5 GAL as Custom Recipients. If I understand correctly, the E2K ADC will create a Windows Contact for every CR as part of upgrading to E2K. Is there a way to convert the CRs into mail-enabled users instead of contacts? We can't delete the CRs because that would break any links to them in user's Personal Address Books... Thanks as always for the advice. - Alan. Active Directory Migration Tool: Use Active Directory...

Billing cycle / Account types add on avail?
It appears though you can make multiple account types with interest, etc, RMS does not allow or have an option to close or run statements for specific account types.(please see post "Closing Billing Cycle Question") Maybe it depends on account closing dates or other setup? but if having A/R accounts and any others, RMS wants to close all. Any add-on packages that can develope seperate accounts within RMS? Thanks ...