CListCtrl question, Easy for the experienced

Hi.

VC++ 6.0.

I have a dialog with a list control in report mode. I can populate the items 
and sub items fine. What I desire is to make my items (column 0) have a bold 
font. I have managed to make the whole control bold by getting the font 
using the various members, but this is not what I want to do.

My question is: how does one change the font on one item? I can't seem to 
get an edit control using CListCtrl::GetEditControl(). I don't know why. 
I've tried to select the item using CListCtrl::SetItemState() and then try 
to get the edit control but this still doesn't work.

I'm following the documentation but this control seems particularly tricky 
to work with.

Please, no references to code guru advanced projects with subclassing and 
such, I need to understand the basic functionality of this control. After I 
understand, then the code guru stuff is cool.

Thanks so much.

Bob



0
bsagusti1 (31)
3/1/2006 5:24:18 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
426 Views

Similar Articles

[PageSpeed] 1

This is a very good example of what you are trying to accomplish

He shows how to do sub item formatting for a listcontrol in report mode

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

you might find this useful also
http://www.codeproject.com/listctrl/ReportControl.asp

AliR.

"Bob" <bsagusti@risingedge.com.NO_SPAM_HERE> wrote in message
news:OzHTpSVPGHA.1532@TK2MSFTNGP12.phx.gbl...
> Hi.
>
> VC++ 6.0.
>
> I have a dialog with a list control in report mode. I can populate the
items
> and sub items fine. What I desire is to make my items (column 0) have a
bold
> font. I have managed to make the whole control bold by getting the font
> using the various members, but this is not what I want to do.
>
> My question is: how does one change the font on one item? I can't seem to
> get an edit control using CListCtrl::GetEditControl(). I don't know why.
> I've tried to select the item using CListCtrl::SetItemState() and then try
> to get the edit control but this still doesn't work.
>
> I'm following the documentation but this control seems particularly tricky
> to work with.
>
> Please, no references to code guru advanced projects with subclassing and
> such, I need to understand the basic functionality of this control. After
I
> understand, then the code guru stuff is cool.
>
> Thanks so much.
>
> Bob
>
>
>


0
AliR3470 (3236)
3/1/2006 5:47:22 PM
Thanks. I checked it out, it's a lot to digest but EXTREMELY informative. My 
problem is my weakness with the DC.
Wow, that guy did some job; I really like that control. There is a lot to 
learn from that example.

Cheers,

Bob


"Bob" <bsagusti@risingedge.com.NO_SPAM_HERE> wrote in message 
news:OzHTpSVPGHA.1532@TK2MSFTNGP12.phx.gbl...
> Hi.
>
> VC++ 6.0.
>
> I have a dialog with a list control in report mode. I can populate the 
> items and sub items fine. What I desire is to make my items (column 0) 
> have a bold font. I have managed to make the whole control bold by getting 
> the font using the various members, but this is not what I want to do.
>
> My question is: how does one change the font on one item? I can't seem to 
> get an edit control using CListCtrl::GetEditControl(). I don't know why. 
> I've tried to select the item using CListCtrl::SetItemState() and then try 
> to get the edit control but this still doesn't work.
>
> I'm following the documentation but this control seems particularly tricky 
> to work with.
>
> Please, no references to code guru advanced projects with subclassing and 
> such, I need to understand the basic functionality of this control. After 
> I understand, then the code guru stuff is cool.
>
> Thanks so much.
>
> Bob
>
>
> 


0
bsagusti1 (31)
3/1/2006 6:49:03 PM
Reply:

Similar Artilces:

Help question
I have a column of text data that has random data. (e.g.-a1, a10, a34,...) I want to set a2-a9 equal to a1, a11-a33 equal to a10, etc. How can I do this? Thanks. W Weldin If I understand you correctly you want cells A2 thru A9 equal to the first random text in your column and cells A11 thru A33 equal to the second random text in the column. But then you say etc. I don't see a pattern here for the etc. If all you want is to have A2 thru A9 equal the first random text then; Random text in column B2 to B5 In cell A2 enter =$B$2 Then copy the formula down to A9 Do the same for A11 thru...

doc/view multiple documents question
hi again. I have an MDI app, and am really new to MDI and SDI. I started with a notepad like doc/frame/view using a COLEServerDoc derived class, a CMDIChildWnd derived frame, and a CEditView derived view. A different part of my design, I needed a splitter, so I have a second doc/view/frame group with a CDocument derived doc, a CMDIChildWnd derived splitter frame, and two views, one is a CFormView derived view, the other is also a CFormView derived view. I embedded different dialogs, and they contain different controls, which is why I'm using two different classes. The function of thes...

Offline Defrag question
Hi, If an Exchange Database is 50 Gb and the only amount of free space is 5 Gb, is an offline defrag possible? After some reading it appears that an online defrag is NOT possible, but I wanted to ask the group to confirm. Am I mistaken? thanks, Mel I mistyped: (corrected) It appears that an offline defrag is NOT possible, but wanted to confirm.. "Mel" wrote: > Hi, > > If an Exchange Database is 50 Gb and the only amount of free space is 5 Gb, > is an offline defrag possible? After some reading it appears that an online > defrag is NOT possible, but I ...

POP3 Question #3
We have SBS 2003 and ISA 2004, with Outlook 2003 running on the workstations. We are using Exchange for corporate email, but each user also has several different pop3 email addresses at different ISP's we want to send and receive with (Old email address, Boss's personal email, etc). Right now I am using Outlook to add these additional pop3 accounts for the users, which is working fine. Except that I would like to take advantage of Exchange's spam filtering capabilities and centralized administration of the accounts. Should I be using the POP3 Connector of Exchange i...

Custom Task Form
I'm using O2003 and I created a new task form and had a few questions. 1. I added the DTPicker custom control for my date picker. When I expand the calendar, it seems to always pick a date around 30 days in the future. For example, I just clicked on it and it defaulted to January 7, 2010. Is there a way to have it default to today's date at 5:00 AM? 2. Currently I am using the Notes and including attachments. Is there another control I can use to also add attachments (in addition to the notes control) as Outlook will only allow one Notes / Message box? 3. Is there a w...

Exchange 2003 Migration Wizard question #2
I'm looking at doing a migration from Exchange 5.5 to 2003 this weekend. However, my testing on the live server is taking a lot longer than my offline testing did. At this point, I'm not sure why. However, I see there is some documentation on running the migration wizard in a multi instanced mode. From the deployment guide To run Migration Wizard in multi-instance mode, at a command prompt, type D:\Program Files\Exchsrvr\bin\mailmig.exe (where D:\Program Files is the drive on which Exchange 2003 is installed), and then click OK. But I can't do that more than once, it says the...

CListCtrl with Owner Data and Group View
When a CListCtrl has the Owner Data attribute, EnableGroupView fails. The documentation for using GroupViews in a CListCtrl states that its purpose is to organize large quantities of data. So I would presume that it should work somehow with Owner Data. Has anybody managed to get a CListCtrl to work with Owner Data? Gerard ...

Roger Dubuis Easy Diver Prices
Roger Dubuis Easy Diver Prices Lower Price Roger Dubuis Easy Diver: http://www.fashion163.com/Roger_Dubuis_Easy_Diver.html Luxury Watches Lower Prices: http://www.fashion163.com/ Cheapest Roger Dubuis Watches http://www.fashion163.com/Roger_Dubuis.html We guarantee our Roger Dubuis Easy Diver and Roger Dubuis Easy Diver aren't just a simple imitation. We use the same fine materials and technology that the original does. Each Roger Dubuis Easy Diver produced is examined carefully by our quality test department and every watch is inspected again before being moved out from our warehouse....

Replication Question
If I have server01 running exchange 5.5, and I introduce a new server (server02) running 5.5 to the domain, How complete is the replication. After replication takes place can I take server01 offline seamlessly? Do all folder mailboxes etc. replicate? Hi, The following Knowledge Base article will help you with this process. 152959 XADM: How to Remove the First Exchange Server in a Site http://support.microsoft.com/?id=152959 -- Thanks, James Burrage This posting is provided "AS IS" with no warranties, and confers no rights. Please do not send email to this address, post a rep...

Is there a more active board for Mac/Office questions?
Just wondering. Most discussion groups I visit have much more traffic and answers within minutes rather than days. Am I posting in the wrong areas? Pete -- Pete May May Productions http://www.petemay.com On 2/17/05 10:41 PM, in article BE3AEA57.2E72%MayProductions@petemay.com, "May Productions" <MayProductions@petemay.com> wrote: > Just wondering. Most discussion groups I visit have much more traffic and > answers within minutes rather than days. Am I posting in the wrong areas? > Pete So far you'd only waited for 1 hour and 11 minutes. And your question...

I'm sure there's an easy answer to this...
I'm a bit of a novice in Excel and wanted to do the following: I have several pages within a workbook (say sheet 1,2 & 3) and a further page (information page). I want a user to be able to link to the information page from any of the other sheets. Here's my problem - once the user has viewed the information I want to set up a link back to the sheet they came from. So if the user came from sheet 1 I want the link to go back to sheet 1, if they came from sheet 2 then I want to go back to sheet 2 etc. I don't want to set a link to each individual sheet because there...

Simple code question
I have a beginners code question. My Sheet1 has a large table with 15 columns. If I delete an entry in any cell in Column A, I'd like the any entries in columns C, D, G and I of the same row to also be deleted. What's the best way to do this? thanks -- cinnie Select the sheet tab which you want to work with. Right click the sheet tab and click on 'View Code'. This will launch VBE. Paste the below code to the right blank portion. Get back to to workbook and try out. Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If ...

XML Deserialization design question
I have a question about the methodology used to Serialize / Deserialize objects using XML in .Net 2005 using the v2.0 framework. Say, for example my application creates an instance of Object A, and and instance of Object B. Then these two objects are then added to multiple collections. Thus I have one instance of objects A & B, but multiple references to each object instance in the multiple collections. Then I serialize all the collections. And finally I Deserialize all the collections. The question is this: following deserialization, do I get back a single instance of each...

A Simple Question
How can I set the password in Excel so that no one can view the contents? I tried the password setting, and its only protecting from viewing. I checked the help and its saying --tools->general options-->etc, But I cannot find "general options" under tools menu. I'm using MS Office 2000 Thanks, Shafeek Khalidh Hi there, I also use Office 2000 and had a look around my own system. Open the worksheet you want to protect. Click File, Save As, with this box open, look along the top to the right of the dialogue box, it says "tools", click the arrow, it says &quo...

Newbie question about Project Explorer window
When I look at the Project Explorer window, I can see all of my modules, but sometimes I also see a module called utility(UTILITY) containing entries like SOA_Biff, SOA_Txt, SOA_Rtf, Form_ZoomForm... etc. I didn't write these. What are they and are they needed? Also, why does it only appear on occasion? thank you -- cinnie ...

my question
How do I find my question that I posted yesterday? Thanks Assuming you get this... I have no idea how the web portal works, except that you can probably search through it and find your thread. However, you can always search the archives (use your name/email address in the Author box): http://groups.google.com/advanced_group_search?q=group:*excel* When I did that, I found one thread, posted yesterday, with two replies. Note that it takes 4-12 hours for posts to show up in the archives. In article <76ADF587-D738-4A6B-A3B0-490271F6A65A@microsoft.com>, Suzgreive <Suzgreive@...

question about mailbox.pst file
I recently got a new computer and transferred my Outlook mailbox. All the mail folders were intact and everything worked fine except that all my calendar notations were somehow lost in the shuffle. If anyone has any clues about where they might have gone, I'd appreciate hearing them. A more vexing problem is that when I looked for the mailbox file in the new computer today, I found that the last one was dated about ten days ago, the day it was transferred to this computer. In the past, I think Outlook undated this file whenever I closed the program. Can someone tell me why this isn&#...

Basic DirectX Questions
Hi Can anyone help with the following : 1) A brief example on how to set up a filter graph to display live images from a camera (all examples found require that you are either reading from or writing to files) 2) Are there specific header files that should be included ? Currently, getting examples to compile involves getting the AmCap example, typing in whatever it is that won't compile in my app, select menu "Go to definition of ..." and add whatever header file pops up to my project ! I clearly haven't grasped something fundamental TTFN Jon ...

Complex Excel Question
This is pretty detailed, I hope you can follow my train of thought. Normally I would attempt to do this in Access, but since the participants in this project do not have the program or the ability, we will need to do it in Excel. I can't get my brain around where to begin or what tools to use on this one. I think I'm just overwhelmed. We have manually placed in formulas and such to get us through #2. I'm just not sure where to go from there that would be easy for me to get to work and for the end users who have limited skill working with Excel. Also, once this is programed to give ...

[Question] Rules in error #2
Hello: I have an Outlook 2003 client side rule, which copies email from an Exchange folder to an IMAP folder. Sometimes, for intermittent network failure reasons, the rule is failing. I then receive a dialog bok stating: "Rules in error" The rule is then disabled, which is annoying as this is an intermittent issue. Is there a way to have this rule not desactivated or automatically re-activated? Thank you -- AS ...

A graphing question...
I'm looking at a graph and I have been told to replicate it. My problem is that I need to add a treadline on a '100% Stacked Column' chart. I see where you can do this on the 'Line - Column on 2 Axes', but I need to get the line across the 100% stacked columns. The option to add a treadline is grayed out when using the chart type of 100% Stacked Column. I'm using Office XP. All help would be greatly appreciated. ...

insert thumpnails in ClistCtrl
i have to insert some thumbnails in ClistCtrl and i hav shown many example in codeguru and codeproject but that was not so clear cut ........ if some one hav a Source code of that plz send on group ......... i m using dilog box ........... as a fresher i know some of my seniour definately can help me i will thxful to all of u in advance ...

General design question
hi! i'd like to design a class - let's call it CDrawObject - that is able to contain some data and draw itself. furthermore i'd like to have a class CDrawMultiObject that is derived from CDrawObject and can contain objects of type CDrawObject. i imagine to have the following situation: CDrawMultiObject -> base object (i.e. an object manager ) CDrawObject -> first element CDrawObject -> secound element CDrawMultiObject -> third element CDrawObject -> first element CDrawObject...

--->Batch command question<---
Hi- I am trying to create a 2-5 second delay in a batch file. I need for the viewer to have enough time to see the text "application is opening" before it actually opens. I am running vista, and the ping command and wait command do not work on it. PLEASE HELP!! -- batchconfused ------------------------------------------------------------------------ batchconfused's Profile: http://forums.techarena.in/members/182259.htm View this thread: http://forums.techarena.in/vista-help/1302535.htm http://forums.techarena.in On 06 Feb 2010, batchconfused <batchconf...

RMS 1.3 PCI question
It's my understanding that RMS 1.3 is not PCI compliant because of the SQL database not being encrypted. Is that correct? Also, when the credit card information is submitted during the end-of-day processing, is the transmission of that data encrypted or is the data itself encrypted? This is a multi-part message in MIME format. ------=_NextPart_000_0030_01CABF8A.8157FDE0 Content-Type: text/plain; charset="Utf-8" Content-Transfer-Encoding: quoted-printable There are probably many reasons why RMS 1.3 is not PCI compliant but yes = one of the main reasons is the...