Converting Borland C++ Project to MFC: Using CListCtrl vs CListView

I started this project attempting to keep it simple with the idea of using a
ClistCtrl, but I am wonderng what I am missing and whether I should of used
a CListView in instead.

Basically, this old BC C++ GUI has a toolbar, a status line and a "list
control" that holds 4 columns.

    Toolbar
    4 column list control
    Status

The conversion to MFC/ VC++ was long overdue and I started it this weekend.
I used a MFC new project wizard with a SDI (Single Document Interface),  a
toolbar, etc.   Doing nothing else, a compile and run has the tool bar and
status control.   It also created a "ChildView.CPP"  which is just a class
of CWND.  The MainFrm.CPP  OnCreate() has:

     m_ChildView.Create()......
     m_Toolbar.Create()....
     m_Statusbar.Create()...

I manually worked with the BC resource files to convert/move over to VC the
dialogs about 10 in all, including the menu as well.  I got all the menus
items, dialogs working as I wanted.

So by this point, I got the layout looking the same except that I don't have
the List Control.

This is where I got stuck.  It seems simple, but I am missing something.

I explore this in CMainFrame::OnCreate, by adding a dynamically created
ListCtrl member

     m_ChildView.Create()......
     m_Toolbar.Create()....
     m_ListCtrl.Create(WS_VISIBLE|LVS_REPORT,CRect(0,0,0,0,),this,4001);
     m_Statusbar.Create()...

This wasn't quite right

It seems that toolbar and status control is part of the client window
(m_ClientView). It seems that it they automatically attach themselves to the
top and bottom.

So I guess is what is the best/easiest way to get a "ClistCtrl" in the
remaining "white space."   Do I have to work with dimensions here, placing
the CListCtrl  after the ToolBar Height position?

Using the default VS New Project Wizard to create a simple SDI with Toolbar
and Status control, how do I make the "client window" have only a List
Control?

Looking at examples for CListView using document and view interfacing , it
seems more simple, but I don't wish to do this just yet this if I don't have
have to.  I would like to understand what I am doing here with the SDI even
if I end up going to the CListView in the final analysis.

Thanks for any tips here.

Dude

0
dude2233 (2)
10/18/2004 2:27:03 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
579 Views

Similar Articles

[PageSpeed] 2

The solution (good enough) was to use the CFrameWnd::CreateView()  for a SDI
application. The COLLECT example was perfect.

Just passing this info to help others in the future.

Thanks


"dude" <dude@justdudes.com> wrote in message
news:#MpWjrLtEHA.2564@TK2MSFTNGP10.phx.gbl...
> I started this project attempting to keep it simple with the idea of using
a
> ClistCtrl, but I am wonderng what I am missing and whether I should of
used
> a CListView in instead.
>
> Basically, this old BC C++ GUI has a toolbar, a status line and a "list
> control" that holds 4 columns.
>
>     Toolbar
>     4 column list control
>     Status
>
> The conversion to MFC/ VC++ was long overdue and I started it this
weekend.
> I used a MFC new project wizard with a SDI (Single Document Interface),  a
> toolbar, etc.   Doing nothing else, a compile and run has the tool bar and
> status control.   It also created a "ChildView.CPP"  which is just a class
> of CWND.  The MainFrm.CPP  OnCreate() has:
>
>      m_ChildView.Create()......
>      m_Toolbar.Create()....
>      m_Statusbar.Create()...
>
> I manually worked with the BC resource files to convert/move over to VC
the
> dialogs about 10 in all, including the menu as well.  I got all the menus
> items, dialogs working as I wanted.
>
> So by this point, I got the layout looking the same except that I don't
have
> the List Control.
>
> This is where I got stuck.  It seems simple, but I am missing something.
>
> I explore this in CMainFrame::OnCreate, by adding a dynamically created
> ListCtrl member
>
>      m_ChildView.Create()......
>      m_Toolbar.Create()....
>      m_ListCtrl.Create(WS_VISIBLE|LVS_REPORT,CRect(0,0,0,0,),this,4001);
>      m_Statusbar.Create()...
>
> This wasn't quite right
>
> It seems that toolbar and status control is part of the client window
> (m_ClientView). It seems that it they automatically attach themselves to
the
> top and bottom.
>
> So I guess is what is the best/easiest way to get a "ClistCtrl" in the
> remaining "white space."   Do I have to work with dimensions here, placing
> the CListCtrl  after the ToolBar Height position?
>
> Using the default VS New Project Wizard to create a simple SDI with
Toolbar
> and Status control, how do I make the "client window" have only a List
> Control?
>
> Looking at examples for CListView using document and view interfacing , it
> seems more simple, but I don't wish to do this just yet this if I don't
have
> have to.  I would like to understand what I am doing here with the SDI
even
> if I end up going to the CListView in the final analysis.
>
> Thanks for any tips here.
>
> Dude
>

0
dude2233 (2)
10/18/2004 4:34:45 AM
Reply:

Similar Artilces:

But it's NOT a different version
My computer was recently reformatted. The same Publisher 2000 program was installed, but now I can't open my files anymore. I'm not running any antivirus programs. Any suggestions?? Thanks. Sue Do you have all of the appropriate patches downloaded? -- JoAnn Paules MVP Microsoft [Publisher] "sue" <anonymous@discussions.microsoft.com> wrote in message news:6B4E5426-B4EC-4B1F-B2C7-DDBF97C69D8A@microsoft.com... > My computer was recently reformatted. The same Publisher 2000 program was installed, but now I can't open my files anymore. I'm not running an...

How to Convert UTC to localTIme(C# )
I have got the value of user account's lastlogon time. Its type is Int64. This value is stored as a large integer that represents the number of 100 nanosecond intervals since January 1, 1601 (UTC)(Refer to MSDN). I don't know how to convert this value to localTime. The following is my code. ################################################################ DirectoryEntry deUser = new DirectoryEntry(ldappath); DirectorySearcher src = new DirectorySearcher(deUser); src.Filter = "(&(objectClass=user)(SAMAccountName=" + accountNa...

console use of GUI app?
Hi, trying to extend an MFC GUI app so that it can be given some command line parameters and will then run in "quiet" mode, without displaying the GUI. Up to here it works fine. The problem is that when the app is launched e.g. from a cmd.exe console, the console doesn't wait for the app to finish. Which also means the cmd.exe console won't display the text written by the app to cout or stdout. Any ideas on how to 'correct' this? thanks! - Jan No surprises here. This is how Windows is defined to work. A console app writes to a console, a GUI app doesn't ha...

VBA using VC++ 7.1
I am trying to convert an application from VC++ 6.0 to VC++ 7.1 that has support for VBA. We are using VBA 6.3. I am getting errors trying to build this applcaion in VC++ 7.1 using unmanaged code. I am getting the following error... I have tried building the VBA sample called multipad and it also does not compile with the following error. ERROR: ----- c:\Program Files\VBA6SDK\Include\objext.h(331) : error C2011: 'IProfferService' : 'struct' type redefinition c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\ShObjIdl.h(4124) : see declaratio...

Convert text to time value
I have a series of time values in a 'General' format. They are of the type: 184525 Which is 18:45:25 or 6:45:25 pm. A time which is am would be of the type: 12345 Which is 1:23:45 am. Is there a way to convert those 'General' values to an Excel serial so that I can figure out the difference between two times? I've seen a bunch of examples on the net, but none of those that I have found deal with this format that I can tell. Thanks. Hi try =--TEXT(A1,"00:00:00") -- Regards Frank Kabel Frankfurt, Germany "Andy" <amelton@gmail.com> schrieb...

how to convert date
Hi, I'm looking for some method to convert mail date, in format: eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. I tried CTime but without resoults. m. Have you tried COleDateTime::ParseDateTime()? m.wski21.usunto@aust.com wrote: > Hi, > > I'm looking for some method to convert mail date, in format: > eg. "Sun, 18 Sep 2005 20:57:08 +0200", to computer local time. > I tried CTime but without resoults. > > m. >I'm looking for some method to convert mail date, in format: >eg. "Sun, 18 Sep 2005 20:57:08 +0200&qu...

Project Accounting Documents
My client will be using Project Accounting to accumulate costs associated with a job (product, consulting fees, expenses) and then bill the costs to their client at a profit. They will make a product and then transfer it to the project to be billed. This product ships out to the client, so a Packing Slip is needed. Also, a Sales Order Confirmation is needed. I believe I can use the Quote for the Sales Order Confirmation, but it does not have shipping information on it (Ship to, Requested Ship Date, Shipping Method, etc.). The Packing Slip seems non-existent. Has anyone else had th...

What are the advantages of a query using a derived table(s) over a query not using them?
I know how derived tables are used, but I still can=92t really see any real advantages of using them. For example, in the following article http://techahead.wordpress.com/2007/1= 0/01/sql-derived-tables/ the author tried to show benefits of a query using derived table over a query without one with an example, where we want to generate a report that shows off the total number of orders each customer placed in 1996, and we want this result set to include all customers, including those that didn=92t place any orders that year and those that have never placed any orders at all ( he=92s ...

MS Money 2007 Deluxe vs Money Plus?
Is their any reason to upgrade? I downloaded the Demo of Plus but it looks just like 2007. I see no reason to drop $30 bucks. I wish they'd get a feature where I can enter a transaction on the money website and then sync when I get home. I like to enter stuff into my account register just as quickly as I can. One extra year before it turns into a pumpkin. The feature you are looking for was there and was removed. Not clear why it was removed--perhaps not enough people used it? Lots of users did find the very presence of the feature a reason to stay awake at night worrying that Bill...

How do I convert dates to text keeping the format?
I'm trying to convert a column of data in date format *m/d/yyyy to a text format without converting to serial numbers. Ie: I want to retain the mm/dd/yyyy format. Is there a way to do this? =TEXT(A1,"MM/DD"/YYYY") "sprlarry" <sprlarry@discussions.microsoft.com> wrote in message news:69669AA6-FD15-47D7-843D-FC768728BF7A@microsoft.com... > I'm trying to convert a column of data in date format *m/d/yyyy to a text > format without converting to serial numbers. Ie: I want to retain the > mm/dd/yyyy format. Is there a way to do this? That ...

Using Datagrid with updates
Datagrid with 4 columns: Name, Company, Evaluator, Reviewer Name and company are not updatable. Evaluator and reviewer should be dropdowns for updating. I've got my grid populated and I've got the dropdowns populated for Evaluator and Reviewer options. However, I can't figure out how to bind the dropdown selected values to the values in the dataset for the grid. I let the wizard create the Edit and Item templates but that means my users will need to select, edit, and update (save) as many as two hundred records in teh grid. I was trying to configure the grid to do...

My follow up folder has disappeared after one use.
I'm using Outlook that came in the Office Pro 2003 package. I used the FOLLOW UP search folder in the "Favorites" window... to hold one message... 24 hours later I handled that matter... and took the message away to file in a place where I can find it... the folder also disappeared. Next I tried to replace the folder by creating a new one... now (next day) no follow-up folder. Help is complex -- takes too long (for me) more demos would be helpful. In news:99DC2D96-3646-4C23-9DA3-EED57E8F0CA4@microsoft.com, JEBCOINC <JEBCOINC@discussions.microsoft.com> typed: > ...

Excel: Auto converting text to numbers
I am downloading an Excel sheet, and the numbers come in as text. It basically comes in as "33 %" but Excel registers this as text, not a percentage. I have a cell that will be used to add the numbers, but since they are text it doesn't work. Given this information, is there a way to convert the imported data into numbers. I would prefer to include this into my formula. The potential numbers are: 0, 1, 2, 3, 4, 0 %, 25 %, 33 %, 50 %, 67 %, 75 %, 100 %, and N/A I would prefer a function, again if possible, that could convert any number. Please note, the space between the nu...

how to convert excel's .cvf file to .csv file
...

Can I use the value of a field as predeterminate value of another.
I am making a table to know who is working in each surgery in a heath center. For each day, I have a field "owner" (of the surgery) and another "working" (the one that really works that day there). But the majority of the days, the "owner" is who works in his surgery, so I want to establish the value of "owner" as predeterminate value of "working" . Is it possible? Thank you Not directly in the tables. You could do this in a form by making the value of one text box the default value of another text box. -- --Roger Carlson MS Access M...

looking for an excel? template for ebay use...
any help for the best way to manage sales when dealing with lots of ebay listings. Thanks ...

Convert Access97 to 2000
Hello, we're currently running access97 and would like to convert it to 2000, but we don't know what is the administrator password for this database. Also this database is running on multi user and have difference permission for diffence users. Could someone help me how to do make this happen but keep the currently permission retaint. Thanks ...

Savings a/c cashflow doesn't show withdrawals
Money 2003 When I do a cashflow forecast for my savings a/c it doesn't take into account transfers to my "cash" account - the one I use to keep track of what I spend my cash on. Consequently when I do the cashflow it gives an unreal projection of savings. I wish I could save $3000 in 2 months but it's not going to happen... ...

Convert 2000 Calendar to web page
Greetings, When I convert my calendar for 2005 to a webpage, the page is off by 1 day. Is there a template or fix available to fix this? Thanks, Duane I can edit the html file but this should not be the case. Fixes? Suggestions...other than use Apple? "Duane Perry" <dlp_sr@yahoo.com> wrote in message news:yZRtd.5561$0r.1710@newsread1.news.pas.earthlink.net... > Greetings, > > When I convert my calendar for 2005 to a webpage, the page is off by 1 day. > Is there a template or fix available to fix this? > > Thanks, > > Duane > > Duane, ...

Using position() in XmlDataQuery
In Excel 2003 Professional, is it possible to do the following using XmlDataQuery - ie: use the "position()" function in the XPath: CType(ThisWorkbook.Worksheets(1), Excel.Worksheet).XmlDataQuery("/Doc/LineItem[position()=1]/Field") Where the XML in the map is: <Doc> <Stuff/> <MoreStuff/> <LineItem> <Field>FirstField</Field> </LineItem> <LineItem> <Field>SecondField</Field> </LineItem> </Doc> And have it return the cell for the "SecondField "? The XmlDataQuery...

XML Note convert to DataSet
Hello, I have this function: object acmResponse = acmLogin.acmString("4001", "", paramFormLogin + paramUserBasics);System.Xml.XmlNode[] acmNodes = (System.Xml.XmlNode[])acmResponse; What I have todo, to convert the XML Object in the DataSet Object? Thank you Matthias ...

Problem converting from Quicken to M2005
My Quicken files are mostly investment related, and generally converted fine. However all bonds (regular and muni's) converted as Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) How do you change the Investment Type for an item? Thank you. In microsoft.public.money, Mike wrote: >My Quicken files are mostly investment related, and generally >converted fine. However all bonds (regular and muni's) converted as >Investment type: Mutual Fund, not Bond. (1) How do I prevent that, (2) Money typically converts custom data types from Quicken into funds. I thou...

How do I use excel with simply accounting
I would like to make a daily cash sheet In excel where I can enter data which I can then import into Simply accounting as a general journal entry. Is this possible and if so how -- If you could help I'd be grateful Dar I haven't used Simply Accounting, so I don't know the exact answer. There's probably some Simply Accounting who can answer. Nevertheless, thought I would comment. Have you looked Simply Accounting's built-in Help and searched for info in importing data? If it can be done, the info should be in Help, and it would probably give detailed instructions o...

Convert
Is it possible to convert a Money file created in the USA version to that of the UK version? Thanks in advance The general way is QIF Export then Import. It's involved and has limitations like loan accounts don't QIF. See http://www.bollar.org/msmoney/#Q1. "Crispy" <nowayspammers@hotmail.com> wrote in message news:uQKSfzfyDHA.2500@TK2MSFTNGP09.phx.gbl... > Is it possible to convert a Money file created in the USA version to that of > the UK version? ...

Numbers converting to decimal
I a trying to figure out why when I type 11 and automatically converts it to .11, if I type 11. it will stay 11,if I change all the cells to text then back to number they willstay. I have checked the formatting of the cells, it even happens when I open a brand new worksheet. Any ideas? Thanks Dawn Hi Dawn, Tools>Option>Edit, uncheck Fixed Decimal -- Kind Regards, Niek Otten Microsoft MVP - Excel "DawnP" <anonymous@discussions.microsoft.com> wrote in message news:c3cf01c48a05$d75359d0$a501280a@phx.gbl... > I a trying to figure out why when I type 11 and &...