Displaying images in CListCtrl

Hi,

I have a Report-style CListCtrl and I need to display an image in the
second column of the list control.  Calling SetItem() by specifying
the image index from the ListCtrl's imagelist member and the subitem
index corresponding to the second column does not work.  I can only
get the image to display in the first column, and I dont want the
image there.  Would appreciate any help in this regard.

Thanks
Gautham
0
tattelota (1)
2/2/2004 5:40:05 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1118 Views

Similar Articles

[PageSpeed] 55

You're going to have to derive you're own class from CListCtrl and draw it
yourself.  Here are a couple of links to articles where they use bitmaps in
CListCtrls that may help get you started:

http://www.codeproject.com/listctrl/ThumbsViewer.asp
http://www.codeproject.com/listctrl/thumbnailview.asp

Tom

"Gautham Katte" <tattelota@hotmail.com> wrote in message
news:eb445b5f.0402020940.2b529d72@posting.google.com...
> Hi,
>
> I have a Report-style CListCtrl and I need to display an image in the
> second column of the list control.  Calling SetItem() by specifying
> the image index from the ListCtrl's imagelist member and the subitem
> index corresponding to the second column does not work.  I can only
> get the image to display in the first column, and I dont want the
> image there.  Would appreciate any help in this regard.
>
> Thanks
> Gautham


0
tserface (3861)
2/2/2004 6:03:53 PM
Did you set LVS_EX_SUBITEMIMAGES extended style for your control?


"Gautham Katte" <tattelota@hotmail.com> wrote in message
news:eb445b5f.0402020940.2b529d72@posting.google.com...
> Hi,
>
> I have a Report-style CListCtrl and I need to display an image in the
> second column of the list control.  Calling SetItem() by specifying
> the image index from the ListCtrl's imagelist member and the subitem
> index corresponding to the second column does not work.  I can only
> get the image to display in the first column, and I dont want the
> image there.  Would appreciate any help in this regard.
>
> Thanks
> Gautham


0
Yan
2/2/2004 9:37:35 PM
Reply:

Similar Artilces:

MSCRM 4.0User Summary Report not displayed Properly in IE 8
User Summary report in Microsoft Dynamics CRM 4.0 is not displayed properly in IE 8 . It is getting expanded in IE 8, hence the table columns are lost. It is getting displayed perfectly in rest all versions. Any help in this regard is appreciated. ...

Quick way to change display name from first last to last, first
Is there a quick way to change the display name from first last to last, first other than manually or manually editing a .csv export file? Many thanks, Brian That is the only (Microsoft) way in Exchange 5.5 You can modify settings in the admin to do this for new users. -- Hope that helps, Dan Townsend This posting is provided "AS IS" with no warranties, and confers no rights. Please do not send email to this address, post a reply to this newsgroup. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Brian Bri...

GP 10.0 VPC Image #2
Has anyone else had problems extracting the 10.0 image. We received a CD at the Partner's Conference. It fails in the extraction process. Is there another image that is available for download? Joanne Mahoney SDN Jacksonville I don't think there's a way to download it. I had problems with the first disk and got somebody to send me a second disk, which worked. You may want to talk to your Microsoft rep to see if you can get one. The technical specialists should have them. -- Charles Allen, MVP "Joanne" wrote: > Has anyone else had problems extracting the 10.0...

display ratios as written in web query
I am using a web query to display data about screen contrasts, all written with the formatting of "700:1" or "3000:1" It displays corectly in the edit web query window, but everything I try to make it display as delivered fails. I tried text, custom formats with @ etc, but it seems to insist on doing the calculation before turning it back to text, or as a ratio it does the division. (The text formatting for this works OK if I type directly into the spread sheet) Is there a way to make a web query display as written? Any help appreciated. Keith ...

Images and links don't work
I’ve published a site using MS Publisher to build it and FileZilla to publish it. The problem I have is that the images / pictures don’t appear and the links to other pages in the site don’t work. I understand that the HTML coding for these objects are not correct...for instance: The site name is http://stdb.eu and the HTML coding for an image is http://stdb.eu/images_file/image234. I need to rename it to read http://stdb.eu/image234 but don’t know how to do it...any suggestions? Many thanks Rooster UK Go here news://msnews.microsoft.com/microsoft.public.publisher.webdesign -- ...

change display name
Hi all, Exchange 2003 /windows 2003 envir. Currently, we have users show as First name last name in our GAL. If we want to show users as Last name, First name, where should I change for all lists in the GAL? Thank you. On Fri, 25 Jun 2010 14:48:35 -0700, ed <ed@discussions.microsoft.com> wrote: >Hi all, > >Exchange 2003 /windows 2003 envir. > >Currently, we have users show as First name last name in our GAL. If we >want to show users as Last name, First name, where should I change for all >lists in the GAL? To change the existing AD ob...

Displaying images in CListCtrl
Hi, I have a Report-style CListCtrl and I need to display an image in the second column of the list control. Calling SetItem() by specifying the image index from the ListCtrl's imagelist member and the subitem index corresponding to the second column does not work. I can only get the image to display in the first column, and I dont want the image there. Would appreciate any help in this regard. Thanks Gautham You're going to have to derive you're own class from CListCtrl and draw it yourself. Here are a couple of links to articles where they use bitmaps in CListCtrls that ma...

Display a PDF in a Windows Form.
I've got a kiosk program that displays information that runs unattended. I need to have the ability to put PDF up on the screen. I have other stuff on the screen that needs to still be displayed. Adobe opens as a new window with menus and whatnot so this is not acceptable. Does anybody know of a way to display a PDF in a winform? I don't need any of the menus or stuff like that - just display the pdf. It would also be nice if I could programmatically control what page it's displaying so I could display multiple pages in succession. TIA - Jeff. "Mr. ...

OWA doesnt display inbox items when clicked on.
I work for a private school, so money isn't flowing endlessly for out IT department. Having said that, we are still using exchange 5.5 (quite comfotably and securely actually). The version of OWA with 5.5 works great for about 95% of my faculty members. However, for a few, they can login to OWA fine and see thier inbox items fine, but when they click on those items to read them, a box appears on screen for a split second, then disappears. It is almost as if their built in pop-up blocker is running, but even disabling that doesnt fix this problem. Any suggestions? thanks in advance jazz ...

CListCtrl inserting an item
Hi I have my list control being populated and nicely working from my scrollbar and page up/down buttons. The problem I have is, that when I click an item it gets erased. I had thought that maybe I could retrieve the LV_ITEM information, but I am not totally sure how to retrieve my LV_ITEM struct from my list control. I have tried doing a hit test and getting the information with GetItem(LV_ITEM*) from the acquired item number, but this doesnt get populated in any way. Any help guys? Secondly, is it possible to use the LV_ITEM lParam member to store an address of data, so that it can be...

Display a count of unique records in a query in Access 2007
Hi, I'm not sure if I should be in this group, or Reports, but I'll start here. I have a user who would like to do a count of unique records and display the information in a query, or a report. Here are the basics: She has a list of donors, some of the donors donate more than once to the same cause. What she would like is a list of the number of donors, per cause. But, if the donor ID repeats for the same cause, she does not want that ID counted again. Example: We can get a query to return a count of the records per cause. It is returning a value of "7" for a cause,...

My excel no longer displays the modification date when I hover on
Previously when I hovered my curser over a file when it is in the list mode, it would show the date it was last modified, now it just shows the type of file and the file size. Cannot be sure but it may have disapeared when I did the Office Update. How can I get it back ...

Pivot tables- 0 counts don't display
How can I get a 0 counts to display in the pivot chart and subsequent graphs. Thanks to Debra for answering my last question, it was a big help! You could enter a dummy record for each combination in the table, and leave the door field blank. For example: door floor core doortype 1 1 1 2 1 1 3 1 1 These records will be displayed in the column and row area, but won't be counted in the data area, where 'Count of Door' is used. Jim wrote: > How can I get a 0 counts to display in the pivot chart > and subs...

Icon Sets
I would like to display in cell A2 a red diamond if the value in U2="Storage"; a Green Circle if the value in U2="Central Files" "Office" or Floor"; and a yellow triangle if the value in U2="Missing". I saw the response to "ICON Arrows UP or DOWN", but I couldn't understand where the different parts were supposed to go. Nolene, you can put an IF statement in column A that reflects the information in column U: =IF(U2="Storage", 1,IF(or(U2="Central File",U2="Office",U2="Floor"),2,...

How do I correct formula display errors?
I use Word 2003, and recently formulas created by my professor do not display properly on my laptop. For instance, the ampersand symbol seems to appear where some superscripting or ' characters should be. What is the problem and solution? Hello Brian brian wrote: > I use Word 2003, and recently formulas created by my professor do not display > properly on my laptop. For instance, the ampersand symbol seems to appear > where some superscripting or ' characters should be. What is the problem and > solution? what version of Word has your professor been...

My brochure is printing in mirror image. I don't know why? Help!
Don't know what I did but my 2 page brochure is printing in mirror image. I don't know how to fix it. Help! Look at your printer settings. -- Mary Sauer http://msauer.mvps.org/ "Carol Y" <Carol Y@discussions.microsoft.com> wrote in message news:C0419E47-663B-4638-93F8-B6D4822CA4AD@microsoft.com... > Don't know what I did but my 2 page brochure is printing in mirror image. I > don't know how to fix it. Help! ...

Unable to copy images in emails
I can no longer copy animated images embedded in forwarded emails. When I right click "save picture as" I receive an error message that says "file type not specified for system." What to do? ...

Money 2004: Displaying an associated cash account in the Account List
My brokerage firm provides me with an investment account that also acts as a chequing account. As a result, I track the cash balance of the account in its associated cash account. It appears that in order to get a summary of the balance, I must switch to either the portfolio or transaction view. Is it possible to view a summary of this associated cash account in the main account list? I would like to do so without creating a new cash account and transfering all the transactions to it. Thanks! Steve Guidi In microsoft.public.money, Steve Guidi wrote: >My brokerage firm provides me wi...

Hide the Gridline for a cell in CListCtrl ??
Hi: I have a CListCtrl with gridlines turned on. Just wonder, is there a way to remove or hide the grid line for a particular cell? Thanks Polaris ...

Displaying Yes or No rather than 0 or 1
I have a query that includes a Yes/No field. When it displays the results in a list box, I want it to display Yes or No, rather that 0 or 1. I'm sure this must be easy, but... You can format the field of use an IIF statement like this -- My_Field: IIF([SomeField] = -1, "Yes", "No") -- Build a little, test a little. "Jerry Anderson" wrote: > I have a query that includes a Yes/No field. When it displays the results in > a list box, I want it to display Yes or No, rather that 0 or 1. I'm sure this > must be easy, but... ...

Displaying the text for the 'Save as Complete' button
Hello, Is there a way to display this button text on the toolbar like the SAVE and Close button when logging completed activities? Can this be done in the isv.config file? Thanks, Maria First, open the URL of the activity in IE, such as: http://yourcrmurl/activities/phone/edit.aspx Go to View, Source. Find the button you're looking for within the <SPAN> tags. On my CRM page, I used: <SPAN tabindex="0" class="menu" style="padding:3px 3px 0px 3px" pl="3" pr="3" title="Save as Completed" action="SaveAsCompleted()...

CListCtrl question: dock columns to right
Hi, I have a CListCtrl which is a child of a resizable dialog. (The list control changes its size when the dialog is resizing). I need that the columns of the list will always be aligned to the right. All the columns (accept the first) have a fixed size. In order to achieve this behaviour I catch the WM_SIZE event of the list control and call to SetColumnWidth of the first column. The width that I set to the first column is the width of the list control minus the sum of the width of all other columns. (see code at the end of the question). Generally it works fine, but I get the most strange be...

Table of Contents not displaying
I have been succssfully using the Table of Contents feature forever. Suddenly, it displays only codes on the screen, yet will properly print and will display properly in "Full Screen Reading" mode. Creating a PDF also displays the ToC correctly. This occurs only on my computer and will display properly on other computers. How do I fix this? Press Alt+F9 to toggle the display from field codes to field results. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "tomMedClinic" <tomMedClinic@discussion...

Would like to have local graphic files displayed by Windows Picture Viewer instead of Internet Explorer
My spreadsheet contains a bunch of the so-called hyperlinks which, when clicked, start an external program that takes care of the actual displaying of the image file. Is there any way to select the external program (file viewer)? All the graphics files (PNG format) reside in my hard disk, not on the Internet. This case is handled very nicely by Open Office, with the images being handled by the Windows Picture and Fax Viewer which loads lightning fast. Excel, on the other hand, prefers to use Internet Explorer, which is a drag. Can I tell Excel NOT to execute IE for some hyperlinks? -Ramo...

Linking images questions
I am preparing my 16 page newsletter for publication on offset printing. Most images in the newsletter are jpegs, a few are TIFFs. Once I insert all the images, I will convert them all to "Process Colors: CMYK" under the "Commercial Printing Option." I have a few questions about inserting images. What is the advantage of "linking" an image instead of "embedding" it for offset printing? Also, if I do link an image to a file, do I have to size the image exactly as it will appear in the newsletter before inserting it or can I insert the image and ...