Newbie in need: Simple Application Design 
Author Message
 Newbie in need: Simple Application Design

I am fairly new to C++ and want to make a very simple application layout but
are not quite sure how to create it.
I have tried the application wizard but the only way i could get what i
wanted was with document/view architectrue and i dont need anything like
that.

All i want is a resisable window, menu, toolbar, statusbar and a list that
fills the client area, just like control pannel.

I someone could tell me how to create the framework for an application like
that I would be greatly appreciated.
There is no need to try and explain how to use the List, i have figured out
how to create list items etc. I just want to know how to make it fit in the
window like that. If you dont want to attempt to explain it then a simple
example project would be great!!!

Thanx, headexplodes.



Sat, 28 Feb 2004 19:26:59 GMT  
 Newbie in need: Simple Application Design
Hello,
[cut]

:)) Please go to File\New and select Project tab then MFC AppWizard (exe)
then select Single document and uncheck Document/View architecture.

If you want to use ListView you must add to CChildView class new memaber
called: CListViewCtrl m_wndListViewCtrl. And when the CChildView is created
(WM_CRATE message) you can create CListViewCtrl. The last thing you must do
is implementing WM_SIZE message which must resize CListViewCtrl.

Thats all (in short).

Regards.

P.S. My english isn't my native language, therefore it may be terrible:))
Sorry, but I hope you understand me:)



Sat, 28 Feb 2004 19:48:17 GMT  
 Newbie in need: Simple Application Design
Greetings,

Make an SDI / MDI application with Document / View support.
In the last , Change the base class of View class  from CView to
CListView. and Press the Finish button

Now your view class is inherited from CListView. There is a function
GetListCtrl, which you can use to get the ListControl and do

whatever you want to do with it. Just see the function OnInitialUpdate
in your view class and there is a comment there saying

    // TODO: You may populate your ListView with items by directly accessing
    //  its list control through a call to GetListCtrl().

enjoy.

Aamir Jelani.
.

Quote:

>I am fairly new to C++ and want to make a very simple application layout but
>are not quite sure how to create it.
>I have tried the application wizard but the only way i could get what i
>wanted was with document/view architectrue and i dont need anything like
>that.

>All i want is a resisable window, menu, toolbar, statusbar and a list that
>fills the client area, just like control pannel.

>I someone could tell me how to create the framework for an application like
>that I would be greatly appreciated.
>There is no need to try and explain how to use the List, i have figured out
>how to create list items etc. I just want to know how to make it fit in the
>window like that. If you dont want to attempt to explain it then a simple
>example project would be great!!!

>Thanx, headexplodes.



Sat, 28 Feb 2004 20:49:43 GMT  
 Newbie in need: Simple Application Design
Thanxs for the help but i still cant get it working. Its probably very
simple because i dont understand everything yet.
Here's the code i used to create it:

 if (!m_ListCtrl.Create(LVS_ICON, CRect(0,0,400,400), this, 1))
 {
  TRACE0("Failed to create list control\n");
  return -1;
 }

Is that correct?? Coz i cant get it to appear. I dont get any error either.

Thanx, headexplodes


Quote:
> Hello,
> [cut]

> :)) Please go to File\New and select Project tab then MFC AppWizard (exe)
> then select Single document and uncheck Document/View architecture.

> If you want to use ListView you must add to CChildView class new memaber
> called: CListViewCtrl m_wndListViewCtrl. And when the CChildView is
created
> (WM_CRATE message) you can create CListViewCtrl. The last thing you must
do
> is implementing WM_SIZE message which must resize CListViewCtrl.

> Thats all (in short).

> Regards.

> P.S. My english isn't my native language, therefore it may be terrible:))
> Sorry, but I hope you understand me:)



Sun, 29 Feb 2004 08:44:10 GMT  
 Newbie in need: Simple Application Design
dont worry, i figured it out. I needed to put WS_VISIBLE in the create
thingie.
thanx for all your help.


Quote:
> Thanxs for the help but i still cant get it working. Its probably very
> simple because i dont understand everything yet.
> Here's the code i used to create it:

>  if (!m_ListCtrl.Create(LVS_ICON, CRect(0,0,400,400), this, 1))
>  {
>   TRACE0("Failed to create list control\n");
>   return -1;
>  }

> Is that correct?? Coz i cant get it to appear. I dont get any error
either.

> Thanx, headexplodes



> > Hello,
> > [cut]

> > :)) Please go to File\New and select Project tab then MFC AppWizard
(exe)
> > then select Single document and uncheck Document/View architecture.

> > If you want to use ListView you must add to CChildView class new memaber
> > called: CListViewCtrl m_wndListViewCtrl. And when the CChildView is
> created
> > (WM_CRATE message) you can create CListViewCtrl. The last thing you must
> do
> > is implementing WM_SIZE message which must resize CListViewCtrl.

> > Thats all (in short).

> > Regards.

> > P.S. My english isn't my native language, therefore it may be
terrible:))
> > Sorry, but I hope you understand me:)



Sun, 29 Feb 2004 08:56:10 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. newbie question: a simple c++ application

2. Newbie needs help on simple problem

3. Newbie needs help with something simple!

4. Newbie needs urgent help, simple question

5. Need help in simple VC++ application

6. C# NewBie need help:How to automatically create a MDI program by application wizard

7. Simple problem across processes - need simplest answer

8. A SIMPLE, EASY OBJECT ORIENTED DESIGN DRAWING TOOL

9. Simple Callback Design

10. Newbie: Help regarding design approach

11. Newbie: Program Design help

12. Newbie with design issue

 

 
Powered by phpBB® Forum Software