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
553 Views

Similar Articles

[PageSpeed] 23

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:

Excel Sheet does not display properly
Hello all, I have a basisc Excel chart that included 4 columns and approximately 30 lines, certain columns have different colors...As you can see nothing much... When I save the document as html, and upload that file to my web server - people are complaining that they can only see the top portion of the chart - they keep clicking on the Internet Explorer refesh button and some are able to view it afterwards, some need to remove their cache - and some don't have a problem (some times)...We are all using the exact same version of Office, and IE... Does anyone have any suggestions on...

Re: Displaying Electrical Connections on Two Wires
Hi all, Just wondered if someone may be able to explain to me - in layman's terms - how to show electrical connections between two-wires on an electrical schematic drawing in Visio. I am currently using Visio 2002. Say for instance if I draw a three-phase diagram, and from the first phase, I connect a single-phase switch and lamp, how do I show the black-dot connection between the two wires? Many thanks, Regards, Matt On Thu, 1 May 2008 05:23:00 -0700, tips6 <tips6@discussions.microsoft.com> wrote: >Hi all, > >Just wondered if someone may be able to explain to me...

Why the backgroud color changed ?
Hi, friends, I registered a frame window class by: AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, LoadCursor(NULL, IDC_DEFAULT), (HBRUSH) ::GetStockObject(LTGRAY_BRUSH), LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_BZ))); After this frame window (pFrameWnd) was created, I created a view: KBViewWnd->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW, rect, pFrameWnd, AFX_IDW_PANE_FIRST, NULL); which ocuppied part of the frame window (specified by rect). However, when the view got focus and its parent frame was resized, the non-occupied part of the parent frame window became white col...

why are my excel file name colored blue ?
Why are some of my excel files colored blue and some are in black? This occurred after an IT tech servicing was done> "valbwoy" <valbwoy@discussions.microsoft.com> wrote in message news:5A643AA1-3971-4498-A24D-2C569D330225@microsoft.com... > Why are some of my excel files colored blue and some are in black? This > occurred after an IT tech servicing was done> If this is when you are viewing the files in Windows Explorer, the blue may well mean that the relevant files are compressed. There is an option in Control Panel that allows compressed files to be shown ...

IE 8 displays nothing for a page with a high-order Unicode character
Below is a minimal file that IE fails to display: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <body> <p>Big Unicode &#65185;<br />0 items</p> </body> </html> If I change the "0 items" to start with something non-numerical, such as "A items" it displays OK. Similarly, changing the high value Unicode char to something much lower and it al...

how to create a console while MFC is running?
Hi, I want to show some information of an application. Anyone knows how to dump a console while the major MFC application is running? Thanks in advance Jack see AllocConsole() "Jacky Luk" <jl@knight.com> wrote in message news:Olm2pwV3GHA.4164@TK2MSFTNGP05.phx.gbl... > Hi, > I want to show some information of an application. > Anyone knows how to dump a console while the major MFC application is > running? > Thanks in advance > Jack > ...

CRT, VCRT, MFC merge modules not updated with VS2003 SP1.
Merge modules are not updated by the VS2003SP1 installer. Where can I get new msm files with updated components?-- Thanks, Stefan Hi Stefan, I have checked those msm files after applying the VS2003 SP1, their contained DLL files have already been updated to the 7.10.6030.0 version ones. If this is not the case in your machine, I suggest you run that VS2003 SP1package under the admin account. Thanks! Best regards, Gary Chang Microsoft Online Community Support ================================================== Get notification to my posts through email? Please refer to http://msdn.m...

Do indexed colors of a color palette save any conventional RAM?
Do indexed colors of a color palette save any conventional RAM? I just read a text book that said the only purpose of color palettes of indexed colors was for video cards that did not support 24-bit or 32-bit color. Because of this I am estimating that even graphics files that are stored as 8-bit pixels (such as GIF) are loaded into the memory device context as either 24-bits or 32-bits. Is this correct? On 22 Mai, 15:36, "Peter Olcott" <NoS...@SeeScreen.com> wrote: > Do indexed colors of a color palette save any conventional > RAM? Yes. Image your VGA card doe...

Colors gone from my office apps
My hard drive crashed and I re-installed Office 2007 on a new install of XP Pro. All updates to XP and Office are installed. In Word, Excel and Outlook etc... the top of the pages have the traditional blue accross, but the rest of the screen is grey and white. Some colors on the ribbon, bit otherwise very strange looking. I've checked my graphics card and my monitor. All seems fine. My other programs work fine as does my browser. I went into settings and compared line for line with my laptop. Anyone have an idea how i can get this to look like it always has. For what it...

Changing background colors
I see where you can toggle the colors off in the print preview but what I want to know is how do you change the color? Currently it is yellow and I would like to change it to blue or green. It won't work in color schemes. I am using Publisher 2003 on an XP computer. ...

Help: Can't display contents of Adobe Acrobat Document in Sheet
Hoping that someone can help with this. I'm trying to insert an Adobe Acrobat document into an Excel worksheet. I'd like to see the document contents, not an Icon. According to the Excel help files, it should be possible to display the file as it shows up in Acrobat but no matter what I do, I see only an Icon. I went through the procedure listed in the help files to convert the document (ensuring that "show as an Icon" is not checked) but nothing makes any difference! Any idea what I'm doing wrong? When I try this with other document types (eg AutoCad) everythi...

When viewing an MFC dll's dependancies can't seem to find MFC80D.d
While compiling a project that has recentlly been upgraded to VS2005 from VS6.0 i keep getting a registration error. at the end of the process the project tries to register the newly compiled DLL. when i looked at the DLL through Dependancy Walker i discovered that it could not seem to find three DLLs: MFC80D.dll, msvcp80d.dll and msvcr80d.dll. any ideas why this would happen? On Oct 20, 7:28 am, Shawn <Sh...@discussions.microsoft.com> wrote: > While compiling a project that has recentlly been upgraded to VS2005 from > VS6.0 i keep getting a registration error. at the end of ...

How to color multiple cells
I have a sheet for a soccer tournament with 10 teams that have to play games each home and away. , this means that each team appears 18 time in this sheet. How can I color each team (cell) without having to colo one cell at a time. I will use different colors for each team. Thanks a million for your help in advance. P/S, ex: Column A Column B USA vs. France France vs. USA USA vs. Italy Italy Vs. USA USA vs. Spain Spain vs. US Attachment filename: premier division.xls Download attachment: http://www.excelforum.com...

Ping Jon Peltier: Custom colors above & below horizontal lines
Hello again, I was wondering if you had any suggestions on how to color-code "zones" within a chart. Using some the techniques described on your (EXTREMELY helpful!!) website, I have created a box-and-whisker plot, and added horizontal lines indicating certain target values (upper and lower). I would like to conditionally color-code the plot areas delineated by these upper and lower horizontal lines...i.e. below the 5th percentile line=red, above the 25th percentile line=green, between the 5th and 25th percentiles=yellow. Any thoughts, ideas, recommendations etc. would be greatly ap...

Color Banding stopped working with Excel 2003
Prior to installing MS Office 2003 Pro, I was able to use color banding in Excel 2002 worksheets, using a Conditional Formatting formula such as =mod(row(),2)=1. But, now with Excel 2003 it gives a "formula you typed contains an error" message. It hightlights the ",2" portion of the formula. I've tried a number of variations suggested on Chip Pearson's web pages, but always get an error. How do I get color banding to work in Excel 2003? Hi Jerry maybe you're using the semicolon as delimiter? Does =mod(row();2)=1 work? -- Regards Frank Kabel Frankfurt, Germany ...

Multiplying a cell and displaying the result in the same cell
Hi Is it possible to perform a calculation on a cell (well a column) an replace the data in the cell with the result? I have a spreadshee which uploads data to a database (not sure which type - it's mechanical estimating package) and I need to increase the price colum by a certain percentage. I cannot add or delete any of the column otherwise the upload won't work. Thanks Ro -- robspo ----------------------------------------------------------------------- robspot's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1532 View this thread: http://www.excelfo...

Automatic colors for text
Can you set excel to automaticly fill in a cell color for specific text entered? yes - check out conditional formatting on the format menu if you'ld like further assistance, please post back with more details -- Cheers JulieD check out www.hcts.net.au/tipsandtricks.htm ....well i'm working on it anyway "mogravy" <mogravy@discussions.microsoft.com> wrote in message news:65C89261-54D6-4E54-9569-0C19AB86DF64@microsoft.com... > Can you set excel to automaticly fill in a cell color for specific text > entered? ...

A4 not displayed on screen.
I have Word2003 & XP SP3 The appearance of a blank page on the screen does not correspond to the A4 size even though I have set it to this on the PageSetup/Defaut. Please help, Frank At a guess, see http://sbarnhill.mvps.org/WordFAQs/WhiteSpace.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Frank Martin" <fm@general.com.au> wrote in message news:uMqVM88aKHA.2160@TK2MSFTNGP02.phx.gbl... >I have Word2003 & XP SP3 > > > The appearance of a blank page on the screen ...

Displaying multivalue field data in report
I have an Access 2007 database that was built upon the Access Contacts template. A multivalue field called Tags was added to the Contacts table that may have any or all values available in a table called Attributes. I have some sample data of contacts where the tag field for a record may contain a single tag like smart, or several values like smart, tall, agressive. When I try to display the tag values for each record in a report the displayed value is numeric like 2, 4, 7. How can I get the report to show the actual values instead of what appears to be an index value for eac...

Public Function to display in text box
Have public function (loaded in the global module) that produces a variable as a double. That all works fine as evidenced by the debug.print method in the immediate window. I desire to have the current value of the variable displayed in a text box. I created a callback function (loaded in global module) that looks like: Public Function GetCurrentWork_GPCI() As Double Dim CurrentWork_GPCI As Double GetCurrentWork_GPCI = CurrentWork_GPCI End Function I can't figure out how to make it display; I've currently got the control source property ...

Startup Item pops up twice, taskbar color flips
On an Acer Aspire One, I put a notepad TO DO file in All Users Startup and it comes up twice. On this machine, I also have a wierdness in that the taskbar sometimes comes up Blue XP and others grey (like Win 98). - = - Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist http://www.panix.com/~vjp2/vasos.htm http://www.facebook.com/vasjpan2 ---{Nothing herein constitutes advice. Everything fully disclaimed.}--- [Homeland Security means private firearms not lazy obstructive guards] [Urb sprawl confounds terror] [Phooey on GUI: Windows...

Shared Calendars not Displaying User Name
Outlook 2003 / Exchange 2003, both fully patched and running on XP Pro SP2. Shared calendars added under "Open a shared calendar". Header of calendars only displays "Calendar", not the username of the shared calendar owner. How can I get Outlook to display the username, please. At the moment I have multiple calendars open and they all are headed "Calendar". Not very useful :-( TIA, Bill http://www.outlook-tips.net/archives/2005/20050809.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for W...

Application.wait
Can anyone tell me what library reference I have to install to use application.wait in my VBA in access 97 ? Thanks Jon There is no Wait method for the Application object in Access. What are you trying to do? You might be able to use the Sleep API (see http://www.mvps.org/access/api/api0021.htm at "The Access Web" for an example), or, if you're trying to wait until a shelled process is finished, see http://www.mvps.org/access/api/api0004.htm -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "jon" <jon@dontemailme.c...

PPT 2004 image not displaying in PPT 2008
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have created a PowerPoint slideshow using MS Office 2004. I have several slides that have images what were copied from Excel (using the Copy Picture... option by holding down Shift > Edit >Copy Picture...) then pasted into the PowerPoint file. The images show up great in PPT 2004. When I open the file in 2008 I get the following results: 1) part of the image is displayed but not complete, 2) the image doesn't show up at all. Here is a sample of what the files look like in 2004 vs. 2008 (image doesn't show...

VISTA & MFC icon
Hi I am showing icons in a List control . It works ok in XP,2000, and 98 But when I run application in Vista the icons are displayed as black square(16 X 16 ) Please can you tell me is their any format difference in the Vista and other OS for Icons. Or can you please let me know what should be done to correct this error. Thanks Anup I have several programs that use icons in list controls. Perhaps you could show some of the code where you create the image list? Maybe your image list is going out of scope and it just happens to work on XP? Tom "Matrixinline" <anup.katari...