simple MFC treeview question

Started by
4 comments, last by davekerr 22 years, 6 months ago
i''m working on a 3D modeller, and i wanted to display the textures in a tree control. i have implemented the custom draw for various font changes etc, but i cannot find any way to actually change the size of the item (height especially). i have tried using the itemex items, and modifying iIntegral, but it doesn''t do the job acuratly enough. any ideas?
Advertisement
This isn''t a screen to client coordinate issue, is it?
Have you ever seen a treeview control with glyphs of a different size than 16x16?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
it''s not a coordinate issue, it''s really an issue of displaying a 24 bit image in a tree control.
i can only think of two ways, to use the custom draw to draw each item myself, but when i''ve tried this, i can''t actually set the sizes of the tree items properly. ideally each item would be 64 pixels high. the other way would be to save the image to a bitmap and use it as part of an image list. however, i haven''t (as asked before) ever seen a treeview with anything other than 16x16 images.
i''d use a custom control, or a list control, but the entire scene has to be viewed as a heirarchy with this tree control, it has all the objects and settings as well.
Maybe you could make both 64x64 & 16x16 icons - use the 16x ones in the treeview and then display a listview with 64x ones (just like exploder)
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
that''s a good idea. i''m really low on screen space, the treeview takes a large side of the left of the window. I suppose if i had just the names of the textures in the tree, and then a button that hid the tree window, and showed a list control, and populated it with the items in the tree, that would be the best way to do it (short of writing a custom control, which i cannot face doing!).
thanks for all your help!

This topic is closed to new replies.

Advertisement