TreeView "cut" not exactly right 
Author Message
 TreeView "cut" not exactly right

I created a tree control with 16-bit bitmapped icons:

    if( !m_Tree.Create( WS_VISIBLE | WS_BORDER
     CRect( 0, 0, 100, 100 ), this, ID_TREE ))
 return -1;

    m_ilIcons.Create( 16, 15, ILC_COLOR16 | ILC_MASK, TREE_ICON_COUNT, 1);
    m_bmpIcons.LoadBitmap( IDB_16BIT_ICONS);
    m_ilIcons.Add( &m_bmpIcons, RGB(255,255,255));
    ASSERT( m_ilIcons.GetImageCount() == TREE_ICON_COUNT);
    m_Tree.SetImageList( &m_ilIcons, TVSIL_NORMAL);

So now I have real color (instead of dithered) faded icons when I put an
item into the cut state, just like Windows

 m_Tree.SetItemState( p_hItem, TVIS_CUT, TVIS_CUT);

Everything works great until I click on the item that was cut. The faded
image is redrawn with its original colors so
that it no longer looks cut--until I select a different item, at which time
it is drawn faded again. Changing the
selection with the keyboard does not exhibit this behavior; only the mouse
has this effect.

Actually, it takes two clicks to get the image to redraw with the real
original colors. The first click makes the faded
image darker, while a second click makes it even darker.

Sun, 02 Sep 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Source formatters -- not the "right" solution

2. Source formatters -- not the "right" solution

3. How exactly should I use "malloc"?

4. What exactly is this "C Standard"?

5. What exactly is a "Unit Test"?

6. Newbie: What exactly is "The Shell"?

7. "cutting" a string

8. Source code for unix "Cut" utility

9. Setting not Null field to ""(empty string) does not work with CRecordset

10. Setting not Null field to ""(empty string) does not work with CRecordset

11. Progress Bar "right to left"

12. Cannot find the right "mfcs42d.pdb".


Powered by phpBB® Forum Software