Creating a Listbox

Hello to all! 
I'm creating my first aplicattion in MFC and now i need to create a listbox 
like this in the picture : 
http://www.clarionmag.com/cmag/v1/images/listbox-fig1.gif

How do i create the top line with the Country, Current ..., and put the 
correct data in the correct column??


0
Costa (2)
1/29/2007 10:35:01 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
384 Views

Similar Articles

[PageSpeed] 37

That's actually a List Control, in report mode.  That should be pretty easy 
to create.  Add a List Control to your dialog through the resource editor, 
set it to report mode, and attach a variable to it. Then in your dialogs 
OnInitDialog you can add columns to it, and then add items to it.

Here is a good demo to get started with.
http://www.codeproject.com/listctrl/listctrldemo.asp

You can find more here
http://www.codeproject.com/listctrl/#Beginners

AliR.

"Filipe Costa" <Filipe Costa@discussions.microsoft.com> wrote in message 
news:C3599FE1-24EC-417B-A899-B866C9BAC175@microsoft.com...
> Hello to all!
> I'm creating my first aplicattion in MFC and now i need to create a 
> listbox
> like this in the picture :
> http://www.clarionmag.com/cmag/v1/images/listbox-fig1.gif
>
> How do i create the top line with the Country, Current ..., and put the
> correct data in the correct column??
>
> 


0
AliR3470 (3236)
1/29/2007 10:45:46 PM
"Filipe Costa" <Filipe Costa@discussions.microsoft.com> wrote in message 
news:C3599FE1-24EC-417B-A899-B866C9BAC175@microsoft.com...
> Hello to all!
> I'm creating my first aplicattion in MFC and now i need to create a 
> listbox
> like this in the picture :
> http://www.clarionmag.com/cmag/v1/images/listbox-fig1.gif
>
> How do i create the top line with the Country, Current ..., and put the
> correct data in the correct column??

Not sure what level to start this. Assuming you can create a dialog in the 
resource editor and can add a list control to the dialog, then right click 
on the listbox and setup the class and member variables. In the 
OnInitialUpdate method (for example) of the dialog, you can do InsertColumn 
to create each header (the grey bit at the top of the list box) and you can 
use InsertItem to add the values (you need to use InsertItem once per column 
for every row in the list.

Look up these things in the MSDN and you should at least get a start:

CListCtrl
CListBox
OnInitialUpdate
InsertColumn
InsertItem 


0
1/29/2007 11:09:19 PM
Reply:

Similar Artilces:

how do I create continuous ruler / dimension line
I would like to create a line that has a dimension displayed every 12". I would also the dimension fields to appear or disappear as I change the length of the line, example a 12" line would have a 12" marker, a 36" line would have 12, 24 and 36" displayed. How can I do this? Thank you, Vito Create a line pattern. (Not for the faint of heart) John... Visio MVP Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm Need VBA examples? http://www.mvps.org/visio/VBA.htm Common Visio Questions http://www.mvps.org/visio/common_questions.htm Visio Wishli...

creation of mailing list in Publisher using already created Excel file
Iam trying to create a mailing list in Publisher and it wants me to manually enter addresses. I have an Excel file with all addresses in it. I cant find a way to import the file to Publisher. Can anyone help? Thanks Brian Help > Mail Merge. Would be good place to start. -- John G <brianmcgaha@gmail.com> wrote in message news:1165281212.680383.15900@n67g2000cwd.googlegroups.com... > Iam trying to create a mailing list in Publisher and it wants me to > manually enter addresses. I have an Excel file with all addresses in > it. I cant find a way to import the file to Publishe...

Can't create html file from pub file
I don't have Frontpage and I used Publisher for doing web page. Now I can't acess to some funcions, in the wb, because I have made a ".pub" file instead a ".html" file! What can I do??? Run Publisher, open your file and do, File Save as a Web page This will create the html files and the gif files. Upload all the files except the .pub file. And don't do what I did on my first web page project, deleted the pub file. You will need it to make changes with your web page. You open the pub file, make changes, save as a web page and upload the new files. Don ...

How to Create Dynamic Range in Formula
I have a formula using a vlookup command. I want the range of the looku table within my formula to change based on the date I enter in separate cell. For example, If the date I enter into a separatecell matches the dat that is the heading for my first column of my array, that first colum would be the start of the range in the vlookup formula. For example, i I type 6/6/04, and my column heading matches that date, then I want th vlookup array to use the first column in its formula, which is =VLOOKUP(A5,SongSelect!M$2:$AM$90,27,FALSE) . If, however, I ente 6/13/04, ibecause 6/13/04 is the hea...

How do I create a 4 page brochure
I want to create a simple Bi-Fold or Tri-Fold brochure There are templates available. Are you having a problem? -- JoAnn Paules MVP Microsoft [Publisher] "EWGMD" <EWGMD@discussions.microsoft.com> wrote in message news:A9DD5794-5A07-4590-A260-687FE49CD9B8@microsoft.com... >I want to create a simple Bi-Fold or Tri-Fold brochure "JoAnn Paules" wrote: > There are templates available. Are you having a problem? > > -- > JoAnn Paules > MVP Microsoft [Publisher]Where do I find the template > > > > "EWGMD" <EWGMD@di...

Problem dynamically creating Custom Controls
I want to create a custom control dynamically that displays a row with 4 controls for 0 to N number of drawings that I will only know only at runtime. My problem is that in the Parent Dialog the create function always returns 0 and then never displays. Per MSDN I expect a Return Value = Nonzero if successful; otherwise 0. Hence, I am failing every time. Note, I am ably to display my custom control properly if I place it at design time, but that will not work. Relevant Code Parent Dialog BOOL ReviewDialog::OnInitDialog() { CDialog::OnInitDialog(); BOOL bcreate; bcreate = m_testRow.Cre...

Create a Formula When there are gaps.
:) Hello All. I joined the group this morning. I have a spreadsheet where I am calculating Runtimes. Job Name Date Start Time End Time Run Time ABCDEFG 9/27/2005 1:11:55 1:59:21 0:47 Start and End Times are in cells G and H, BUT the cell # changes o each row. I am typing this formula for each row: =H(some #) - G(some# =Run time. Is there a way I can calculate the Run time w/out entering the abov formula for each line? Thanks In Advance P.S. Also when the spreadsheet begins a new Job Name, there will be blank row -- Growin ------------------...

create report based on variable date/time
I have created a simple dbase based on an export of an excel sheet. The dbase is named "ExportSC" I have created 3 reports which are base on 3 date colums in de dbase. report 1: open -> based on column "open date" and the results in report are a result from a filter "=> "dd-mm-yyyy hh:mm" report 2: close -> based on column "close time" and the results in the report are a result of same filter with diff values. report 3: planned -> based on column "planned start" and the results in the report are a result of a filter "B...

Excel creates .XAR & .TMP files on network drive
Hello, We're having a weird issue with one of our shares on our server. We have a share (\\server\share) and within this share we have multiple folders with subfolders and whatnot but this is the primary share that is mapped to all our users via login script. Within some of the subfolders within this share there are excel files. What's happening is that for some reason, we'er getting a lot of .xar and .tmp files appear in the root of the share (\\server\share) even though there are no Excel files on the root of the share, the only objects there are folders with subfolders. I know ...

Creating a macro to find duplicate names
I'm trying to locate all the duplicate names in a long list that I have. Is there a macro or something that I could use to tell Excel to do that? What I usually do is sort by name and then insert a temporary column and run a formula like this down it to mark the dups: =IF(B1=B2,"X","") -- Jim "Carter Devereaux" <CarterDevereaux@discussions.microsoft.com> wrote in message news:452EE350-E2E4-4E24-A2B4-E7D483E85D4E@microsoft.com... | I'm trying to locate all the duplicate names in a long list that I have. Is | there a macro or something that I ...

what type to creat a user
HI i need to know what is the best option to creat a user whether Server Logins or Database Users Tools >> Setup >> System >> SQL Options and what are the differences between these two options if i am creating Database Users then is it limited or can creat as many as i want thanks Ammar under the sql options, you should select both server logins and database logins. this way ..when you create a new user in great plains, the user is automatically created in your sql database and added to the correct group for all great plains users. ...

common ways creating projects.
Hello. I want to create a project, with many programs (100). There is a main menu that is running, which can call many programs. What is the common way doing so, in VB.NET 2008. 1. Each program is executable, and the main menu program send each program parameters. 2. Each program is ActiveX. 3. MDI. or each program is on the same panel (whenever I can do so). 4. Else ? Thanks :) On 3/26/2010 5:18 AM, Mr. X. wrote: > Hello. > I want to create a project, with many programs (100). > There is a main menu that is running, which can call many programs. > > Wh...

Help an amateur create a formula?
Howdy, Total Excel amateur seeks your expertise. What is the correct syntax to enter the following formula, spelled out for clarity (I hope): 2 times (10 raised to the power of (x/29.5 - 3.3)) where "x" will be a certain cell? TIA, -=s =[10^{((x/29.5)-3.3)}}*2 chek if it works! -- Hope it Helps! Jim India "Scott Willing" <NOTwilling2BSPAMMED@mts.net> wrote in message news:9covn0dmpsobgkt2n45gmt19bi4tuhvhj2@4ax.com... > Howdy, > > Total Excel amateur seeks your expertise. > > What is the correct syntax to enter the following formula, spell...

Create a phone message
At work we are switching from Groupwise to Outlook, using the Groupwise connect feature. Is there a "send phone message" option in Outlook, similar to that of Groupwise? Pamela <Pamela@discussions.microsoft.com> wrote: > At work we are switching from Groupwise to Outlook, using the > Groupwise connect feature. Is there a "send phone message" option in > Outlook, similar to that of Groupwise? http://www.google.com/search?q=%2Boutlook+-express+%2Bphone+%2Bmessage+%2Bform -- Brian Tillman ...

How to create this query. Not easy
Hi. I nedd a query that eliminates or update records and the crietria is the diferent of two columns. I have a tabel with records like this: Cod LoteNo LoteQt QtNeeded 12 A 20 15 12 B 20 15 To have this: Cod LoteNo LoteQt QtNeeded 12 A 20 15 In that example I have the an item code (12) with two Lotes, A and B but I only need to consume 15 so I would like to remover the second line because the quantaty ...

Creating HTML from an XML and XSLT
Hi, I'm a newbee at XML so I need to ask this. I have an xml data like follows. <?xml version="1.0" encoding="utf-8" ?> <salesRep repnum="123" orgdate="16"> <fname>Joe</fname> <lname>Jones</lname> <active>1</active> <jobtitle>Sales Manager</jobtitle> <alternateRepNumbers> <alternateRepNum>124</alternateRepNum> <alternateRepNum>125</alternateRepNum> <alternateRepNum>128</alternateRepNum> </alternat...

Creating scientific data collection form
Is access right for me? I am a natural resource and environment management specialist and I would like to create a data collection sheet for an ecological survey. I have used access in the past for data management, however, I am still a beginner. I understand that I can use access to create forms that can be used to collect and enter data. But I am not sure how to do this as it has been a while since I have used access. Are there tutorials available for this? I wish to collect scientific data on a number of ecological characteristics. Are there examples of forms that have been...

Create sublist in new worksheet
I have one worksheet of all the people invited to an event. One column indicates y for they're coming, n for they're not and blank if they have not yet replied. I want to set up a separate worksheet that lists *only* the acceptances. In other words, I want a separate worksheet that extracts the rows of data that contain y in column B but none of the other rows. Any advice? Madeline in Toronto Make sure you have a header row! Select A1! Data>Filters>Autofilter Set Autofilter to "y" in column of comings! Select all visible rows (click on row1 he...

Unable to Create MDE 09-01-03
Dear all, I have created an MsAccess Application. The MDB version is working fine and it is compacting & repairing fine. But When i try to convert it as MDE it is saying "Unable to Created MDE". No compilation errors were occuring. When i tried to import objects of this database to a new one it is giving the below errors 1.Name conflicts with the existing project,module or library. 2.'The form name Acc_Log_Nonos/Edit_Entry is misspelled or refers to a form that doesnt exist' 3.No module found 4.operation not supported in transactions while creating mde I have ...

Failed to create SubFolder
Hi Any one know why i cant create SubFolder to the Inbox Folder from a Service Application.. I can create Sub Folder from my Exe but the same code failed when it run as service ? any ides Jibesh.V.P www.m2comsys.com Outlook simply is not suitable to automate from a service.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "jibesh" <jibesh.vp@m...

Creating a simple text file
I am trying to produce a simple text file in Excel that I can save as a text file which I can then import into another program (ACT by Sage). The list is very simple, just a single column containing text in each row. The problem I have is that ACT expects to see each line item enclosed by quotes as text qualifiers, and I can't see how to save an Excel file in this format. If I just create a list down a column (Item 1, Item 2 Item 3 etc) and save it as Unicode text *.txt or *.csv I don't get the quotes around the text, if I write the text in Excel with quotes ("Item 1"...

Creating a drop-ship invoice report in POP
Hello: I am attempting to create a drop-ship invoice report in POP. Where does GP pull the quantities received for any Purchasing Invoice Entry? Is it from the PO? Some other table? My report is using POP30300, POP30310, and POP30110. I'm able to get the list of drop-ship invoice line items, but they are sometimes duplicated. Once I remove the POP30110 table, the duplicates go away. I know this is something really obvious I am missing. Any assistance is appreciated. GP9 SP4. Thanks. -Joe There are no "quantities received" with drop-ship invoices, only...

Creating a Button that is type="button" and does not call __doPostBack
I want to create a Button that does not do a postback (I simply want to use it for JavaScript). Some of the ways I know of to do this are: 1. Include "return false;" in the OnClientClick property. However, if UseSubmitBehavior is set to True, it is type="submit", and if UseSubmitBehavior is set to False, onclick still includes __doPostBack even though it doesn't get called 2. Use an HtmlButton control. However, I would like to be able to use a Button control. Are there any ways to create a Button that does not do a postback? Thanks. -- Nathan Sokalsk...

Creating An Installer
Using InstallShield 6 but their Newsgrouup is horrible: How do you make a singe exe setup file. This is a small setup that only contains 6 files along with the appropriate shortcuts. Currently the default media is set to create a CD. I have choices to change the media to disks, Internet Install and soforth, however, I don't see anyway for creating a single exe installer. Please advise! JCO wrote: > Using InstallShield 6 but their Newsgrouup is horrible: > > How do you make a singe exe setup file. This is a small setup that > only contains > 6 files along with the ...

Help! Creating an HTML 'signature card' to insert in Outlook
john inzer has saved by butt before hoping he or someone else can save me again. I need to create a signature for email that looks like a business card complete with picture with one exception. It needs to have tab tops and appear layered and on the top of those tabs there needs to be hyperlinks to various pages on a website. I can create the look but dont know if I make it in webpage design on pub or ?. I dont know html (i've used ebays turbo lister to create stuff then copy and pasted the html view - ez cheat) I had a wells fargo guy send me an email that had one in his with ...