newntui/discovermdi/src/simplifytree.cpp
//-----------------------------------------------------------------------------------------
// This will inspect the include files tree and will tell simplify not to
// comment all files it marked as unneeded.
//-----------------------------------------------------------------------------------------
This will inspect the include files tree and will tell simplify not to
comment all files it marked as unneeded.
This will inspect the include files tree and will tell simplify not to comment all files it marked as unneeded .
void CSimplifyTree::DisableAllExclusions(HTREEITEM item) {
CIncludeTreeNode* node;
CString query;
CString status;
    if(item==NULL) return;
 	node=(CIncludeTreeNode *)m_Tree.GetItemData(item);
	if(node) {
		if(node->m_Marked==0) {
             CString query;
             BSTR sysQuery;
             query.Format("tell_simplify %d",node->m_ID);
             sysQuery=query.AllocSysString();
             DataSourceAccessSync(&sysQuery);
             SysFreeString(sysQuery); 
		}
	}
    HTREEITEM child   = m_Tree.GetChildItem(item);
	if(child!=NULL)  DisableAllExclusions(child);
    HTREEITEM sibling = m_Tree.GetNextSiblingItem(item);
	if(sibling!=NULL)  DisableAllExclusions(sibling);
}
void CSimplifyTree :: DisableAllExclusions ( HTREEITEM item ) { CIncludeTreeNode * node ; CString query ; CString status ; if ( item == NULL ) return ; node = ( CIncludeTreeNode * ) m_Tree . GetItemData ( item ) ; if ( node ) { if ( node -> m_Marked == 0 ) { CString query ; BSTR sysQuery ; query . Format ( " " , node -> m_ID ) ; sysQuery = query . AllocSysString ( ) ; DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; } } HTREEITEM child = m_Tree . GetChildItem ( item ) ; if ( child != NULL ) DisableAllExclusions ( child ) ; HTREEITEM sibling = m_Tree . GetNextSiblingItem ( item ) ; if ( sibling != NULL ) DisableAllExclusions ( sibling ) ; }
This will inspect the include files tree and will tell simplify not to
comment all files it marked as unneeded.
This will inspect the include files tree and will tell simplify not to comment all files it marked as unneeded .
// We need a pointer to the user structure attached to the UI element. // For all include files which we want to be included we will send command to the simplify