xvoobshe ia zabul eshe skazat', chto derevo sozdaetsia ne v dialode a v okne s poneliami. I v odnoi iz panelei, kak raz poiavliaetsia derevo.
A vot kusok koda:
DWORD dwStyle = WS_CHILD | WS_VISIBLE | TVS_SHOWSELALWAYS | TVS_HASLINES;
//DWORD dwOptions = 0; //OT_OPTIONS_SHADEEXPANDCOLUMN | OT_OPTIONS_SHADEROOTITEMS | OT_OPTIONS_SHOWINFOWINDOW;
RECT rcTaskTree;
GetClientRect( &rcTaskTree );
int w = rcTaskTree.right - rcTaskTree.left;
int h = rcTaskTree.bottom - rcTaskTree.top;
rcTaskTree.top = 10;
rcTaskTree.left = 10;
rcTaskTree.right = w*2/5;
rcTaskTree.bottom = rcTaskTree.bottom - 10;
// Create tree options
if( m_pTaskTree->Create( dwStyle, rcTaskTree, this, IDC_TASKTREEVIEW ) == FALSE )
{
TRACE0("Failed to create task tree control.\r\n");
return -1;
}
m_pTaskTree->PopulateTree();
}
a voobshe na skoka ia ponimau ne rabotaet... vot eta ficha:
ON_NOTIFY_REFLECT(TVN_ITEMEXPANDING, OnTvnItemexpanding)
kak bu poluchaetsia tak chto derevo ne poluchaet soobsheniia!