displaying colors in an mfc application

Hi everyone,

I'm working on an MFC application. The application is a treeview in 
which are represented some objects (persons, roles....). I have declared 
some bitmaps in the visual project to represent these objects.
My problem is that some colors of the bitmaps are not displayed.
I guess there is a palette problem or something like that. Does anybody 
have an idea of what the problem is?

Thanks a lot for your help....

Fred
0
fred9909 (2)
10/8/2004 12:53:16 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
447 Views

Similar Articles

[PageSpeed] 43

Try using  ILC_COLOR24 | ILC_MASK when you create your imagelist.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"fred" <fred@laposte.net> wrote in message
news:41668dda$0$300$626a14ce@news.free.fr...
> Hi everyone,
>
> I'm working on an MFC application. The application is a treeview in
> which are represented some objects (persons, roles....). I have declared
> some bitmaps in the visual project to represent these objects.
> My problem is that some colors of the bitmaps are not displayed.
> I guess there is a palette problem or something like that. Does anybody
> have an idea of what the problem is?
>
> Thanks a lot for your help....
>
> Fred


0
ajaykalra (6842)
10/9/2004 2:01:19 AM
Ajay Kalra a �crit :
> Try using  ILC_COLOR24 | ILC_MASK when you create your imagelist.

This works great!! Thanks!

Fred
0
fred9909 (2)
10/11/2004 7:34:13 AM
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. ...

Running a process in MFC
I'm trying to run a C program I wrote inside a MFC Gui wrapper. The Gui stuff selects some files then kicks off the C program. I want to run the program in one tread, while a progress slider runs in another, until the first tread is complete. I have the initial code for the file selection dialogs, but am not sure about the tread stuff in MFC. Any Ideas? Thanks. You can use AfxBeginThread to start your thread. Look up AfxBeginThread on MSDN. To run your C-program, use ShellExecute or CreateProcess. For the progressbar, it's going to be tricky. You'll have to get the C-progr...

Printing a dialog from an SDI based application
In an SDI application that I am developing I am trying to print the contents of a graph hosted in a dialog...my question is can I somehow hook into the default printing support that the SDI app has built in or do I have to come up with a new class to support printing from the dialog??? Dominic Dominic, You can indeed jack into the printing framework. It's as easy as adding an override to OnPrint in your view, and print to the CDC* you get as an in-parameter. A nifty side effect is that you'll get support for the print-preview this way as well. Johan Rosengren Abstrakt Mekanik ...

Must I convert my VB4 application with Jet DB if I install Office XP
I have a VB4(32) program that accesses an Access 97 database (.mdb) and seems to run fine under my recent upgrade to Windows 2000 Pro. I have Office 97 Pro installed but Windows 2000 Pro has major problems with Office 97 apps, so I am considering upgrading to Office XP. I have been unable to find any info about "fixing" Office 97 to operate properly under W2K Pro. (it often will not load and I have to end it with Task manager). I'm also faced with the problem of not being able to open Office Files I will receive from others using later versions of Office. -- Message posted vi...

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...

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 ...

Colored cells are showing white on screen, want to see color?
I have sheet cells that I know are colored, but they show white on my system, and print grayscale, while showing their true colors on other office systems.... Does this article help http://support.microsoft.com/d��efault.aspx?kbid=320531 Changes to fill color and fill pattern are not displayed in Office programs -- HTH Bob Phillips "dean" <dean@discussions.microsoft.com> wrote in message news:B1990525-1D7B-4E94-9653-80074F9AAEFD@microsoft.com... > I have sheet cells that I know are colored, but they show white on my system, > and print grayscale, while showing ...

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...

warning level 4 an MFC
Hello, I would like to compile my app with level 4, but getting loads of warnings from the MFC source, like this: c:\program files\microsoft visual studio\vc98\include\xmemory(39) : warning C4100: '_P' : unreferenced formal parameter Am I doing something wrong? Vaclav >I would like to compile my app with level 4, but getting loads of warnings >from the MFC source, like this: Which version of VC++ are you using? Dave 6.0 "David Lowndes" <DavidL@example.invalid> p�se v diskusn�m pr�spevku news:ls5v3299bq4hblk6gt4ed0co3cbqssaqfu@4ax.com... > >I ...

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. ...

Cannot start the source application for this object #2
I added a .pdf file into an excel spreadsheet workbook. Whenever I try to open the file, I get an error message that say " Cannot start the source application for this object". It will not let me open this Adobe Acrobat document. I do not have a problem opening the .pdf document by itself outside the excel spreadsheet. Thanks, Charlie Hi, we have the same problem with TIF files. On an XP computer it doesn't work. If we do this on an Office 2000 running on Terminal Server it works fine ... Any idea ? It has to do with the Imaging application. Wangimg.exe is not running...

COM support in my application
Hello, I have a MFC (dlg) application with several child dialogs. Each child dialog has it own functionality e.g., one child dialog can be used to test the performance of your hard disk, another child dialog can be used to play audiocd's, ... But now I want that these child dialogs can be used by other applications (to exchange test results, to display the child dialog from within other applications, etc. ). Maybe directly or maybe indirectly through the main application. I read a little about COM. Can I use this ? or are there better/other ways ? If you wan to expose functionality ...

Can you add color to a graphic?
Im use to InDesign mainly and it has a way to colorize a grayscale or bitmap file on the document without having to manually do it in photoshop or some other program. Does Publisher have a simillar feature? answering my own question...right click on image, FORMAT PICTURE/PICTURE/RECOLOR :-) "Greg" wrote: > Im use to InDesign mainly and it has a way to colorize a grayscale or bitmap > file on the document without having to manually do it in photoshop or some > other program. Does Publisher have a simillar feature? ...

Visual basic for application project in database is corrupt
I'm running Office 2003 on Windows XP. I have a database that does not open, and gives me a message stating that Microsoft Access has detected corruption in this file. The message goes on to suggest that I run Compact and Repair Database from the Tools menu. When I do, I get the error message above. Is there any way of recovering this database? Thank you for your response. I actually tried both ways, linking and inporting, but I'm unable to gain access to the corrupted database. The only thing I have been able to do is access it through MSQuery in Excel, but that only gets me to ...

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 ...

Getting path and Hwnd of application
1. How can I get the path of the application? I used FILE* fp = fopen("log.txt", "wt"); to create a log file. But the file is located in the folder in which I opened a file using CFileDialog. I would like the log to be in the same folder as the app. I think a better way to do is to reset the folder setting (is there such a thing?) after CFileDialog so that ".\" is the folder of the application. 2. I'm writing a dll that is called by some third party app, how could I get the app's HWND? I'm not using MFC. Thanks. Leesei wrote: > 1. How can I get...

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...

Spot Color separations not printing correctly
I am trying to print seperations for a two color project ( black + one pantone color). When I print on my InkJet and Laser printer the seperations are screwed up. When I took the file to the printer for preflight they were OK ?? Anybody know why ? "Screwed up" how? How was job preflighted? "Stuart F." <sfirstdc@hotmail.com> wrote in message news:004501c352d6$8c5f7150$a601280a@phx.gbl... > I am trying to print seperations for a two color project > ( black + one pantone color). When I print on my InkJet > and Laser printer the seperations are screwed up...

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 ...

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,...

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,...

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...

Question on mixing MFC and Winform
We had some problems (I posted earlier about overlapping windows that may be transparent, draw order etc). Well we got the drawing working more or less but there is quite a bit of flicker. I was curious if we switched to WinFroms if perhaps things might work better. Our app is an unmanaged MFC app (we don't really use any of the Doc/View support). I've started reading and researching mixing of WinForms with MFC. I'm curious if I replace the CView with CWinFormsView and then create child windows of the type CWinFormsControl if this may help. But I'm not finding mu...