473,657 Members | 2,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CTreeCtrl icons without 256 colours

I am using a tree from CTreeCtrl.

To create the imagelist I am using a bitmap with 256 colours.

But the icons in my tree only appear with 16 colours.

What is supposed to do to have icons with 256 colours in tree?

This is my code:
-------------------------------------------------------------
CTreeCtrl& lcl_tree = GetTreeCtrl();
CImageList icl_listaImagem ;
icl_listaImagem .Create( IDB_BITMAP_VECT OR_IMAGEM256, 17, 1, RGB(5,255,5) );
lcl_tree.SetIma geList(&icl_lis taImagem, TVSIL_NORMAL);

// Set tree control styles
long style = GetWindowLong(l cl_tree.m_hWnd, GWL_STYLE);
style |= (TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS |
TVS_SHOWSELALWA YS | TVS_DISABLEDRAG DROP);
SetWindowLong(l cl_tree.m_hWnd, GWL_STYLE,style );

// Insert some items
HTREEITEM lcl_auxItem;
HTREEITEM lcl_vaultItem = lcl_tree.Insert Item("Teste..." , 1, 1 );

-------------------------------------------------------------

Thanks & Regards,
Rui Oliveira

Nov 17 '05 #1
0 1028

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3185
by: sto | last post by:
look at this picture http://upload.cs99.net/e.gif i use the function SHGetFileInfo to get file icons. but these icons are not very nice. there are some black things round of the icons. many applications use system icons for files. how did their programmers solve this problem in these apps?
1
3448
by: ask | last post by:
Hi NG Hop you can help me out here. I have a CTreeCtrl and bold selected items with the "myTreeCtrl->SetItemState( mySelectedItem, TVIS_BOLD, TVIS_BOLD );" - but how do I set it back to the normal state when another item is selected?! Thnx ask
3
21429
by: QLD_AU | last post by:
Is their a way in a VB.Net application to set all sub form icons to the main form ? or even set all icons to the Application icon, without having to reference the icon as a filename ? With Thanks Jason
1
1538
by: O.A.Haugum | last post by:
Hi I want to use a lot of icons in panels in a status bar. The icons shall show the current status of operations and has to be changed programmatically. Is it possible to store the icons in the application in the same way as you store images in an image list? I prefer not get the icons from files.
2
3373
by: hans_fakie | last post by:
Hello everybody, I created a CTreeCtrl and I'd like to move the expand button to the right. here's my code CTreeCtrl tree; tree->Create(WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SINGLEEXPAND | TVS_SHOWSELALWAYS |
3
2397
by: Istvan Albert | last post by:
I've been using the new python icons for windows for about two weeks now and I must say they've turned out to be far less functional than I thought. From purely visual standpoint the new icons look better, the old ones had a certain level of 'cuteness' associated to them .. I could see why that might have been a turnoff for some. But these new icons are too large, too blocky and too pastel. On my laptop time and again I found myself...
3
1702
by: Jeff Jarrell | last post by:
We are migrating a large app to .net. There are many forms and there will be many, many icons. What are some suggested techniques for more or less sharing imagelists (easy enough), BUT without giving up the design time experience. jeff
1
3169
by: sunishvk | last post by:
I am using CTreeCtrl in my project and i want to list all the files and subfolders in a folder recursively in CTreeCtrl. I am stuck with this.. I want the code to list all the files and subfolders in a given Folder.
4
2330
by: christery | last post by:
Is there a way (without buying a component) to accomplish something like in a hotel overwiev if a room is for the moment free/booked/ occupied/checked out/cleaned/back to free or out of service/reserved for repairs or something. Charts can be done (maybe that was with excel reference, dont remember) bur easy gantt (maybe installing a MS Project viewer?) Anyone done this, or on the web (ahh thats maybe ASP.net, hmm) Well any comments...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.