Hopefully trivial CListCtrl question

I've got a CListCtrl in the report format.

I'm adding my data via an function I got from CodeProject
(http://www.codeproject.com/listctrl/clistctrl_insertrow.asp)

InsertRow(int nPos, int nNoOfCols, LPCTSTR pText, ...);

Anyway. Once I've inserted my data, say I want to modify a row. How do
I do this?
Or do I just delete the row, and add the modified one back in?

0
Hamish.Dean (174)
9/30/2006 5:02:15 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
263 Views

Similar Articles

[PageSpeed] 53

hamishd =E5=86=99=E9=81=93=EF=BC=9A

> I've got a CListCtrl in the report format.
>
> I'm adding my data via an function I got from CodeProject
> (http://www.codeproject.com/listctrl/clistctrl_insertrow.asp)
>
> InsertRow(int nPos, int nNoOfCols, LPCTSTR pText, ...);
>
> Anyway. Once I've inserted my data, say I want to modify a row. How do
> I do this?
> Or do I just delete the row, and add the modified one back in?


I think it's inefficient if you delete the row and then insert a new
row. You can use SetItemText to change the text of some item, or use
SetItemData to change the data of some item.

0
Hooyoo
9/30/2006 5:09:58 AM
Reply:

Similar Artilces:

CListCtrl problem
I have a MFC application that has a lot of list view in report mode. I have implemented a CGenericListCtrl (derived from CListCtrl) that contains common functionality used in all those list views. All the list views used in my applicatons are derived from CGenericListCtrl. What I am trying to do is basically impement the sorting functionality based upon the type of the columns. For example some columns could be numeric whereas other could be string or date type. In the CGenericListCtrl I have implemnted a Compare function that apply the sorting algorithm depending upon type of the column. So ...

Exchange crash hopefully last post
Hello Everyone, Thanks for your past replies. The errors I am getting after the motherboard crash and repair is the 7001 system attendant service which failed to start because of following error %%0. I am thinking about just doing a clean install on a new machine.Couple of question though. I am checking is these steps seem correct. I only had one w2k member server running as exchange server 2k. 1. Can I simply remove exhange through add/remove programs on this box. Is there anything else I need to do to remove exchange? 2. After removed should I run forestprep and domain prep again? The...

My final question
Hi Again, This is my last question I promise, I have finished my project almost but I was wanting to know I'm setting up a macro which I hope will just send that one sheet in an email not as an attachment. is there any code that someone knows or how I can do this. thanks again for you all help -- Reign ------------------------------------------------------------------------ Reign's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29134 View this thread: http://www.excelforum.com/showthread.php?threadid=489301 You can get lots of examples and tips from R...

Chart question
Hello I have a data collecting system that automatically goes and polls 4 seperate systems and populates 1 worksheet for each system. Certain systems will not always produce data, leaving gaps in the data viewed from a date prospective. I have 1 chart with 4 series. Before I plot this data, I scan the 4 worksheets and set the category (X) of my chart to reflect the series that has the most days of data in it. All data will be displayed in my chart but will not be charted against the date that it occurred except for the series I choose to be category (X). Example: System 1 ...

xml repeater question
I want to show the fields ErrorID, Quarter, AnomalyLabel and EmployerClass in a repeater (or datagrid?). How can I do this? All the data must be shown in 1 table. I know I can put the xml in a dataset and bind it to the repeater but it only shows 1 table (AnomalyReport). Any help would be nice :) <AnomalyReport> <ErrorID>00089-044</ErrorID> <AnomalyClass>NP</AnomalyClass> <AnomalyLabel>blablabla</AnomalyLabel> <SystemCorrection> <CorrectionType>RC</CorrectionType> <BlockAction> <Action>1</Action> <...

Many of you hope for the same
That Kevin Panzke, our resident mental patient, would finally meet his personal garbage truck driven by a drunk driver. Today Kevin generated approx. 16 spamming messages which you don't see here, but we can see thru Google Groups and i wonder if FBI will finally take this guy seriously and end his trail of cretinism. "Stan Starinski" <China@stealsUSJobsPatentsSoftwareMusicVideo> wrote in message news:O0cWV1FtKHA.3660@TK2MSFTNGP05.phx.gbl... > That Kevin Panzke, our resident mental patient, would finally meet his > personal garbage truck driven by a...

Scrolling CListCtrl
Hi, all I'm developing a project using VC++ My CListCtrl should display records from database. If there are too many records, I would like not to insert all of them into my list ctrl, but only part that fits it (or a little bit more). If the user clicks scroll bar (or drags it? ), then I'll have to redraw my list ctrl correspondingly. Did somebody do something like this or knows the link to some example. I've checked already CodeProject and CodeGuru and didn't manage to find this kind of a project. Thanks, Andy Andy, While you probably won't find databas...

Distribution List Question #5
Hi All I have a Windows 2003 w/SP1 and Exchange 2003 w/SP1 in a single forest with multi-domains. I have a user in the same domain as the distribution list that has been permitted to manage it but he can not due to it says he does not have permissions. I have the distribution list box checked to allow him to manage. Thanks in advance. The problem is to do with the location of DC/GCs. Read this to see if it is applicable. http://support.microsoft.com/kb/318074/en-us Nue "Mike Moore" <MikeMoore@discussions.microsoft.com> wrote in message news:264A6797-259B-4F66-91B0-EDB...

Unable to use CListCtrl.FindItem after CListCtrl.SortItems
I have a CListCtrl which I want to sort, but after I sort I can no longer use FindItem because it always returns a failure. Any assistance with this is greatly appreciated. Thanks! >I have a CListCtrl which I want to sort, but after I sort I can no longer >use FindItem because it always returns a failure. Any assistance with this >is greatly appreciated. Show a concise code example of what you're doing then someone may be able to point out what's wrong. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq LVFINDINFO findinfo; findinfo.flags=LVFI_STRING; findinfo.ps...

Chart Question
Greetings: I am a novice user, attempting to perform an X-Y chart of some data, under Windows 98 Excel 2000, using the Chart Wizard to set things up. I would like to set the data range to values of my own choosing, but the Chart Wizard will only accept a formula that includes values from the data set from which I am making the chart. How can I do what I want to do? Regards, Ron Barry. Hi Ron, To create a chart with values not contained within a worksheet you can use the Source Data step of the chart wizard. Start chart wizard, select XY scatter chart type. At step 2 of 3 on the Serie...

CListCtrl Item Selection Questions
Hi I want to ask several things about CListCtrl here: 1. How to disable multiple item selection? 2. How to disable the column header click? Since I don't have any sorting facility in my application. Thank you very much. Select the ListCtrl object in resource editor and set the following properties Single Selection True No Sort Header True Cheers Check Abdoul --------------------- "Landon" <Landon@discussions.microsoft.com> wrote in message news:589C8584-BE50-4BA0-AA56-58297A072FC3@microsoft.com... > Hi I want to ask severa...

Questions Answered Here
I know this is not proper netiquette in this group, I apologize, but I just want to give my thanks to the crew here, especially Daiya and John, who have answered both of my Word 2008 questions without my having to ask them. How to change my default page view which got lost in transition from Word 2004? (Resave the Normal template.) And how to stop getting blank new documents when switching to Word? (Don't use the dock; use command- tab.) They were little things, but 1) They were bugging the heck out of me, and 2) Microsoft could not itself be bothered to tell us how to work...

Histogram Question, Please
Hello, Using W7 and Excel 2007. Still a bit uncertain re some of the "nuances" of Histograms, although I can generate one. a. If I have Bins for the data set up as, e.g., 100, 105, 110, 115... How are data values that has a value of 103, 106, 114, etc. that fall between handled ? Are they included in a preceding, or following, Bin ? b. The columns on the Histogram have "large" horizontal spaces separating them (the Bins) when plotted. Any way to make the columns as plotted be essentially contiguous; right next to each other ? Thanks, Bob On Jan 4, 4:22=A0am, B...

side by side manifests question
Hi, I have a side by side assembly with two dependencies instead of just one, and I want to make sure I did it correctly. It works on my machines here but I am getting reports it is not working on another machine (WinXP SP1). The side by side components are the RTCdll (RTC real time communications api) and the MSXML 4.0 sp2. The manifest is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" proc...

Drawing blank
two part question first need a cell (A) that represents "=>94, =<100" that cell (B) = A Then need a vlookup against that table that if 95 entered would result in the "A" I'm better than this but I am drawing a complete blank today. Thank You Ted -- Ted @ AX 4.0.2503 I think you need to rephrase this in a bit more detail Cell A contains a number ? You want to test if this number lines between 94 and 100? What does the table look like that will be the subject of the lookup? best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme...

A ray of hope
Looks like the gods at MS must have been working overtime this week since my accounts seem to be finally be settling in and no new or duplicate accounts have appeared on my account list in the last few days. I did have to make several calls to Checkfree and re-submit some payment requests and the msn bill pay web site is still a week out of date (ignore the last updated message, its meaningless) but I think my bills will be paid on time (hard to type with your fingers crossed). It should only take me a few more days to straighten out my investment accounts. Pierre Aterianus I wou...

CListCtrl debug assert failure when adding row
I have a class CMyListCtrl which is derived from CListCtrl. On the OnInitDialog() method of the owner dialog of the List Control I have my methods that set up the report List Control columns and add one test line of data (InsertRow()) to it. The List control displays fine after this and the data is added without any problems. However if I try to add data later (i.e. call InsertRow()) I get the following error: ======= Debug Assertion Failed! Program: ..\Debug\Test.exe File: winctrl.cpp Line: 483 ======== The last line to execute in my code before this assertion error is in CMyListC...

Workflow Question 11-10-05
I am create a workflow for new prospects. I need to add an additional Wait condition but, when I add the Wait condition (to check an activity) my Task isn't in the activity drop-down list. I am inserting the wait condition within an If..then..else statement. If I insert a Wait condition outside of the if..then..else statement then all of my tasks are listed. Here is what I have so far: WHEN OPPORTUNITY IS CREATED if opportunity.prioritycode = Prospect then Task: Schedule an Appointment Email to:[account];Subject:Introduction to PA If opportunity.currentbro...

DFD Question #2
I'm re-posting this again... since someone else has posted a totally different question within my thread. Hi all I'm very new to Visio. I need to create a diagram that explains the different data sources I used to generate my reports. I have a worksheet in Excel that linked to MS Access... I use that sheet to generate different reports. Basically I need to show: I have linked tblA and tblB from one dB and tblC from another dB and tblD from a third dB which gets uploaded from an Excel file... I have linked all these tables to a new master dB, then from there I have created diffe...

Header and Footer Question
Does anyone know if you can put the contents of a cell into a custom footer? I have a worksheet with 75 tabs and I want to be able to easily change the footer by only changing it in a specific cell once, rather than having to edit each footer for each tab. I want the footer to say :Effective: October 15, 2004" and I need to be able to quickly change this date. Thanks for any help. Hi only possible using vBA (the workbook_beforeprint event) -- Regards Frank Kabel Frankfurt, Germany "Perplexed Accountant" <PerplexedAccountant@discussions.microsoft.com> schrieb im ...

newbie question on MFC ActiveX ControlWizard
Hi, I am trying to create a control that can be used by VB, I choose MFC ActiveX ControlWizard template when creating project. When I tried to add a property, there is no BSTR in the dropdown box , what should I do? As far as I know, VB does not recognize CString. TIA I'm no expert in ActiveX development, but I believe you must use a COLEVariant in your control and make it a BSTR type. Then you pass back to VB the COLEVariant cast to a VARIANT. For example: VARIANT PropertyInControl() { COLEVariant* v = new COLEVariant(String, VT_BSTR); return *v; } I'm not sure abo...

Sumif Question
I have the following information: a b 2 Carrie David 42.50 3 Chris David 63.00 4 David David 47.75 5 John David 36.00 6 Katy David 41.25 7 Mike David 40.00 In Call b9 I would like to sum b2:b7 if a2:a7 = Carrie David or David David or Katy David. Please help. Thanks Johnnie =SUMPRODUCT(--(A2:A7="Carrie David"),--(A2:A7="David David"),--(A2:A7="Katy David"),B2:B7) Note, if you had a list of n...

CListCtrl #14
I'm trying to create a derived version of CListCtrl for a CDialog app. The data in the control will be read-only, so I want to make the column headers fixed-width, and (ideally) prevent cell selection. My first instinct was to use the ClassWizard to add handlers for the notification messages, but for some reason these aren't ever called. OnNotify is called, but I'm not seeing the messages I'd expect (e.g. when I resize a header, HDN_BEGINTRACK never happens), and the control doesn't seem to listen when I tell it to ignore the message anyway. Any thoughts? Erik J ...

Digital ID question?
Hi! If I want to use Digital ID which does not contain email address to sign emails how can I do that in Outlook 2003. I know it is possible, but what I should do excatly? Cheers, Mikko "news.microsoft.com" <argonaut@jippii.fi> wrote in message news:%23%23sw3mHlDHA.2528@TK2MSFTNGP12.phx.gbl... Now this should show correct name... Cheers, Mikko ...

Product Key Code Question
I have Vista - and i'm trying to run Office and now it's services are diminished because i didn't enter the product key code. I have the code - tried to enter it - no luck. Where online can i enter the code? Or what other options might i have. Thanks for any consideration to this in advance. Dave, You might have better luck in the Office newsgroup: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.office.misc&cat=en_US_24f872ec-a5b6-4cc1-925d-0364c03e6da6&lang=en&cr=US. This is the Dynamics GP newsgroup. -- Victoria Yudin D...