changing colour of individual items of control created through CListCtrl

Hello,
How can I change the colour of individual items inserted in a
area, created by using CListCtrl class.Can somebodyguide me? Thank
inadvance

--
Sadi
-----------------------------------------------------------------------
Sadia's Profile: http://www.msusenet.com/member.php?userid=252
View this thread: http://www.msusenet.com/t-187057967

0
7/1/2005 2:00:52 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
430 Views

Similar Articles

[PageSpeed] 30

You have to use a owner draw list control.

Here is an example

http://www.codeproject.com/listctrl/xlistctrl.asp

AliR.

"Sadia" <Sadia.1rhwgj@no-mx.msusenet.com> wrote in message
news:Sadia.1rhwgj@no-mx.msusenet.com...
>
> Hello,
> How can I change the colour of individual items inserted in an
> area, created by using CListCtrl class.Can somebodyguide me? Thanks
> inadvance.
>
>
> -- 
> Sadia
> ------------------------------------------------------------------------
> Sadia's Profile: http://www.msusenet.com/member.php?userid=2524
> View this thread: http://www.msusenet.com/t-1870579674
>


0
AliR3470 (3236)
7/1/2005 4:02:17 PM
Use an owner-draw CListCtrl. I recommend the article

http://www.codeproject.com/listctrl/lvcustomdraw.asp

as a start, and also see my note added to that article on properly handling horizontal
scrolling. Basically, I used this class as the basis for my own owner-draw control.
				joe

On Fri, 1 Jul 2005 09:00:52 -0500, Sadia <Sadia.1rhwgj@no-mx.msusenet.com> wrote:

>
>Hello,
>How can I change the colour of individual items inserted in an
>area, created by using CListCtrl class.Can somebodyguide me? Thanks
>inadvance.

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)
7/1/2005 5:59:38 PM
Reply:

Similar Artilces:

Item Dynamic table size
Hello,e I've been doing some cleaning in our HQ db on items that are no longer sold in our locations. I've had success in deleting the appropriate items however I noticed that our item dynamic table is quite large, over 2,000,000 rows. Is there an sql script available to update the Item Dynamic table based on the Items in the Item table? Thanks in adavance Joe This is a multi-part message in MIME format. ------=_NextPart_000_0020_01CA9A95.F6339260 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joe, Bad idea to de...

Excel 2007 Need to permanently change Normal settings for gridlines
I am using Excel 2007 for the first time and find the gridlines delineating the cells are so faint as to be nearly indistinguishable. I can go into the cell formatting and modify the normal style, and it is just the way I want it. But I can't find a way to make Excel remember this and treat it as the new definition of the Normal style. I don't want to have to redefine Normal every time I open a new spreadsheet. Someone please help! Regards Leonard Priestley The changes you describe are changing the Border color and NOT gridlines. Go into Excel Options and cl...

Changing which database Business Portal points to
If I install Business Portal 2.5 (GP) and point it to our Great Plains development server with an old Dynamics database, once we decide to take it live, how do I go back and point it to the live Great Plains server? Is this something that can only be done during the installation? Let me preface my response by saying I only have experience with BP 3.0.... In BP 3.0 several tables are created in the Dynamics database to support the various BP functions. Unless you plan to move or copy those tables you will probably have to reinstall BP 2.5 in order to have them created. Our attempt to cop...

New mail appearing as old deleted item
When new mail arrives in inbox an old long deleted item appears in place of the new mail showing in bold as new mail. The real new mail is not visible at all and is therefore lost. This problem also used to happen in Windows Mail so I bought Outlook 2007 but it still happens intermittantly. -- Kate What do you see in your Unread Mail folder? "Kate B" <KateB@discussions.microsoft.com> wrote in message news:D9A95DD7-CFC4-423F-9B2B-F8B72177E2CE@microsoft.com... > When new mail arrives in inbox an old long deleted item appears in place of > the new mail...

Cannot set menu in MFC ActiveX control
I am dynamically creating a CMenu object and trying to assign it to my ActiveX control. Windows balks and gives me a 1436 error, something to effect that a child window cannot have a menu. It is not a child window, it is the instance of COleControl, the top level window. (I verified this by inspecting m_parentHwnd.) I am trying to assign the menu within the OnCreate event at which time the control has a valid handle, and have tried it before and after the call to the parent OnCreate. Does anyone know the magic words to make this work? Thanks On Mon, 8 Dec 2008 16:22:02 -0500, Duane A. C...

Item assign to vendors
Would like to have the ability to mass assign items to all vendors. IE: When purchasing services such as delivery or installations. These are service items in the inventory module and are passed on to customers in the sales cycle. They can be purchased from any vendor so would like to be able to mass assign to all vendors. This is particularly an issue when integrating POs and Reciepts. Thank you. -- Christopher L. Mast, MBA Echelbarger, Himebaugh, Tamm & Co., P.C. 5136 Cascade Rd., S.E., Ste. 2A Grand Rapids, MI 49546-3728 phone 616.575.3482 fax 616.575.3481 ----------...

How do I add a hyperlink to an individual word in an Excel cell?
I am using Excel 2000 (not by choice) and I need to add a hyperlink to an individual word within the cell, not the whole cell itself. For example in the sentence "Click here or here to go to the appropriate web page." I want the words "here" to each have a separate hyperlink. Any ideas? I can manage some VBA too if necessary. Thanks, Rosalie Hi Rosalie, You can't do that in Excel. You would have to use HTML or Word or some other means. You could fake it, the entire cell would be a link, but you could after assigning the hyperlink select another...

Changing Titles by a formula
From cell A1:A10 I have standard titles that are linked to another sheet. I only need to change the office and date per each title. Is thier a way to do that making the office and date a formula in another cell? example of title ABC Comp, Office 38L Sales as of 6/07/2004 I need to only keep changeing the 38L and date. Any suggestions----Thanks Say Office # is in Column 'C' in cell A1: ="ABC Comp, Office "&C1&" Sales as of "&Today() ----- Heather wrote: ----- From cell A1:A10 I have standard titles that are linked to ...

Create interactive pivot table chart based on item selected
I'm trying to remember how to drag a chart object to the top left cell of a pivot table thus displaying a charted image of the detail item selected. Any suggestions? ...

problem in changing the text of sentences before tables
I am developing a word automation application. In a method of mine, I change the text of some sentences of an opened word file, but the problem is when I change the text of a sentence which located before a table, it will be moved to the first cell of the table. My code is as follow: void myMethod( long startingSentenceNumber, const char *toBeSearched, const char *replacement, bool replace ) { Range currentSentenceRange; Selection sentenceSelection; Sentences sentencesList = m_document.GetSentences(); long sentencesCount = sentencesList.GetCount(); CString replacementCStr(...

can't change/delete bills and deposits
suddenly one day i realized that when i tried to change a bill, i could click "ok" but nothing would happen. I thought it was because i upgraded to 2004, so i deleted the bills and rescheduled. about 5 of the bills will not delete either. the error message is: "Money could not write to your Money file. The operation could not be performed or another application finished this task before you. Please try again." Now some of the newly scheduled bills will not allow me to change the properties, i click ok but nothing happens when i edit the series. I have repaired ...

Outlook 2007: When i Save a New Rule outlook Change it automatically...
Hi people! I have this problem with Outlook 2007. I have 15 e-mails addresses in my outlook, but i can=B4t create the rules for send all the received mails to each emails folder. Example: I want to create a simple rule that move all the e-mail that i get from "example1@example1.com" to the folder "Inbox/ example1@example1.com". When i create the rule, all works fine, i select the correct e-mail account name, the correct destination folder, etc... but when I hit the SAVE button in rules window, Outlook 2007 changes the account automatically to another one. Not automatically...

Change Row/Column Height & Width
I know I should be able to automatically set a row height to the max necessary by hovering the cursor between the 2 rows I want to adjust and double-clicking, but sometimes this doesn't always work. Why is that that - do I need to adjust a setting? And is there any way to set it so that if text is added or deleted the row height would change automatically so thatthe text fit appropriately? Set the row format to Autofit and cells to Wrap Text Gord Dibben MS Excel MVP On Tue, 19 May 2009 12:14:04 -0700, DaveL <DaveL@discussions.microsoft.com> wrote: >I know I should be ...

Changing Functional Currency #4
Try to change the functional currency to Z-CNY. ERROR = Activity for this currency already exist. Finance made 2 GL transactions. Can we remove the transactions (Tools >> Utilities >> Financial >> Remove History) or (File >> Maintenance >> Clear Data ) then change the functional currency? Which tables should I remove history or clear data. Can someone on the board help us? regards, Once you process a transaction, you are stuck with the functional currency. I have not seen a table fix for this problem on the board. Consider creating a new database an...

Creating a Check Box
I would like to learn how to create a check box. Is there a way to do that? The simplest checkbox (I think) is from the Forms toolbar. So View|tool bars and show that Forms toolbar. Click on the checkbox and then click on the topleft corner where it should be placed. Then draw to the opposite lowerright corner. When you've placed it correctly, right click on it and select "Format Control" On the Control Tab, you can assign a cell link that you can use to determine if the checkbox is checked or not. =if(A1=True,"It's checked","It's not checked") ...

odd files created
Every time I open and edit an excel spreadsheet on a network share, small odd files get created. They are usually no larger than 25-40k and don't have any extensions to them. Looking at the properties page for any file, the file description says File. Anyone know what this is from or how to get rid of them? Permissions are setup correctly for me, Word files don't have this behavior. Excel 2000 SP3 Thanks, Hi Brian, A file the same size as the workbook would be created in the same directory as the workbook. The filename would be nonsensical (or appear to be random) character...

Change default "SaveAs" to *.msg rather than *.html
Hi!, Using Outlook 03, I regularly need to save emails and prefer to save as *.msg so the attachments are contained within the one file. How can you change the default SaveAs command to Save as Type in a *.msg format (rather than *.html) so the type is already *.msg without having to use the pull down? Thank you Troy Outlook provides no way to change that. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "TroyB" <boeky72@hotmail.com>...

Colour mode
Hello, is there a function to get the current colour depth of the Monitor /Grafic card (24 Bit, 32 Bit, 16k colours etc.)? Thanks for any clue! Kai Sandner hdcScreen = GetDC(0); int depth = GetDeviceCaps(hdcScreen,BITSPIXEL); ReleaseDC(0,hdcScreen); Andrew Fedoniouk. http://terrainformatica.com ...

adding date/time picker to inputbox control
Hi all,is there a way to add a date/time picker control to inputbox?...

change column name from letters to numbers?
I'm importing a 3rd party CSV file into Excel and then comparing some of the contents to a printed spec. Each numbered field in the spec corresponds to a column in the work sheet. I'd like to change the column headers from letters to numbers. Is that possible? Tools-->Options, General tab. Check the R1C1 Reference Style. ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "Jerry" <jerry@nowhere.com> wrote in message news:OoyPef$eFHA.3048@TK2MSFTNGP12.phx.gbl... > I'm importing a 3rd party CSV file into Excel and then comparing ...

Create Login with T-SQL
Hello, I am creating, using T-SQL, a database with its file groups, tables, constraints, etc. Can I also create, using T-SQL, a Login with Username and Password to access that database? Usually, I go to Security > Logins of SSMS to manually create the login. However, if I could do the same using T-SQL I would have it all made automatically. Thanks, Miguel EVERYTHING that the GUI does winds up as tsql executions on the server. :-) Most of them you can generate a script for using the Script menu in the upper left of the current dialog window. This is a great way to ...

Creating Charts for Use in Powerpoint
I have a series of charts that I need to create for a Powerpoin presentation. I thought it would be easy to just create the charts/graphs in Exce and then just cut and paste to the PP-Slides. I'm finding that it isn' quite that easy. Here are some of my problems that I hope someone might be able to she some light on and give me some direction. 1. In Excel how do you control the size of the chart? - When I create a chart 1 and define the data ranges I get a goo looking chart then I thouht, why reinvent the wheel so I just copy th chart to create chart 2 and change the data range, but...

Create incident on website : localhost ok
Hello everybody, I'am using /service/serviceportal.aspx when i open a new case in http://localhost:1917/service/serviceportal.aspx it creates the "incident" normally but when i open a new case in http://danubecrm:1917/service/serviceportal.aspx -> Operation failed due to a SQL integrity violation. Platform System.Web.Services.Protocols.SoapException: Server was unable to process request. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.W...

Create Calendar mtg invite template to avoid retyp'g conf no's?
I want to create a calendar template so that I can avoid retyping my conference call details in the location field everytime I create a new invite. How do I do this? In what version of OUtlook? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "GM" wrote: > I want to create a calendar template so that I can avoid retyping my > conference call details in the location field everytime I create a new > invite. How do I do this?...

Changing of range (Address) to (Cell)
Hi people I have encounter a problem with the use of range From a recorded macro, it's listed this way ActiveChart.SetSourceData Source:=Sheets("Trend").Range("A1:M2,A24:M28"), PlotBy:=xlRow And I edit it to this way ActiveChart.SetSourceData Source:=Sheets("Trend").Range("A1:M2," & Cells(StartX, StartY), Cells(LastX, LastY)), PlotBy:=xlRow And obviously VBA compiler won't let me go this easily, it happen to give an "evil-comment" on my source range, May i know how can i solve this Thank You Hi Kaiyang, Try this, assuming the...