newntui/discovermdi/src/qatree.cpp
//---------------------------------------------------------------------------------------
// This callback will run when all windows are created but still 
// invisible.
//---------------------------------------------------------------------------------------
This callback will run when all windows are created but still
invisible.
This callback will run when all windows are created but still invisible .
void CQATree::OnInitialUpdate()  {
CString query;
BSTR sysQuery;
	CFormView::OnInitialUpdate();
    SIZE sizeTotal;
    sizeTotal.cx=0;
    sizeTotal.cy=0;
    SetScrollSizes( MM_TEXT, sizeTotal);
	CBitmap folder_opened;
	folder_opened.LoadBitmap(IDB_FOLDER_OPENED);
	CBitmap folder_closed;
	folder_closed.LoadBitmap(IDB_FOLDER_CLOSED);
	CBitmap query1open;
	query1open.LoadBitmap(IDB_QUERY1_OPEN);
	CBitmap query1close;
	query1close.LoadBitmap(IDB_QUERY1_CLOSE);
	CBitmap query2open;
	query2open.LoadBitmap(IDB_QUERY2_OPEN);
	CBitmap query2close;
	query2close.LoadBitmap(IDB_QUERY2_CLOSE);
	CBitmap folder_opened_dis;
	folder_opened_dis.LoadBitmap(IDB_FOLDER_OPENED_DIS);
	CBitmap folder_closed_dis;
	folder_closed_dis.LoadBitmap(IDB_FOLDER_CLOSED_DIS);
	CBitmap query_open_dis;
	query_open_dis.LoadBitmap(IDB_QUERY_OPEN_DIS);
	CBitmap query_close_dis;
	query_close_dis.LoadBitmap(IDB_QUERY_CLOSE_DIS);
    m_ImageList.Create(24,16,TRUE,7,1);
	m_ImageList.Add(&folder_opened,    GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&folder_closed,    GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query1open,       GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query1close,      GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query2open,       GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query2close,      GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&folder_opened_dis,GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&folder_closed_dis,GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query_open_dis,   GetSysColor(COLOR_BTNFACE));
	m_ImageList.Add(&query_close_dis,  GetSysColor(COLOR_BTNFACE));
	m_Tree.SetImageList(&m_ImageList,TVSIL_NORMAL); 
    query="license VI3 co";
    sysQuery=query.AllocSysString();
    CString res = DataSourceAccessSync(&sysQuery);
	SysFreeString(sysQuery);
	if(res!="1") {
		MessageBox("No Quality license is available.","Error",MB_OK|MB_ICONERROR);
		CFrameWnd* pParent = this->GetParentFrame();
		pParent->PostMessage(WM_CLOSE);
	} else
		m_bLicensed = true;
    query="sev_init";
    sysQuery=query.AllocSysString();
    DataSourceAccessSync(&sysQuery);
	SysFreeString(sysQuery);
    query="source_dis sel2sym.dis";
    sysQuery=query.AllocSysString();
    DataSourceAccessSync(&sysQuery);
	SysFreeString(sysQuery);
	FillTree();
}
void CQATree :: OnInitialUpdate ( ) { CString query ; BSTR sysQuery ; CFormView :: OnInitialUpdate ( ) ; SIZE sizeTotal ; sizeTotal . cx = 0 ; sizeTotal . cy = 0 ; SetScrollSizes ( MM_TEXT , sizeTotal ) ; CBitmap folder_opened ; folder_opened . LoadBitmap ( IDB_FOLDER_OPENED ) ; CBitmap folder_closed ; folder_closed . LoadBitmap ( IDB_FOLDER_CLOSED ) ; CBitmap query1open ; query1open . LoadBitmap ( IDB_QUERY1_OPEN ) ; CBitmap query1close ; query1close . LoadBitmap ( IDB_QUERY1_CLOSE ) ; CBitmap query2open ; query2open . LoadBitmap ( IDB_QUERY2_OPEN ) ; CBitmap query2close ; query2close . LoadBitmap ( IDB_QUERY2_CLOSE ) ; CBitmap folder_opened_dis ; folder_opened_dis . LoadBitmap ( IDB_FOLDER_OPENED_DIS ) ; CBitmap folder_closed_dis ; folder_closed_dis . LoadBitmap ( IDB_FOLDER_CLOSED_DIS ) ; CBitmap query_open_dis ; query_open_dis . LoadBitmap ( IDB_QUERY_OPEN_DIS ) ; CBitmap query_close_dis ; query_close_dis . LoadBitmap ( IDB_QUERY_CLOSE_DIS ) ; m_ImageList . Create ( 24 , 16 , TRUE , 7 , 1 ) ; m_ImageList . Add ( & folder_opened , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & folder_closed , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query1open , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query1close , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query2open , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query2close , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & folder_opened_dis , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & folder_closed_dis , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query_open_dis , GetSysColor ( COLOR_BTNFACE ) ) ; m_ImageList . Add ( & query_close_dis , GetSysColor ( COLOR_BTNFACE ) ) ; m_Tree . SetImageList ( & m_ImageList , TVSIL_NORMAL ) ; query = " " ; sysQuery = query . AllocSysString ( ) ; CString res = DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; if ( res != " " ) { MessageBox ( " " , " " , MB_OK | MB_ICONERROR ) ; CFrameWnd * pParent = this -> GetParentFrame ( ) ; pParent -> PostMessage ( WM_CLOSE ) ; } else m_bLicensed = true ; query = " " ; sysQuery = query . AllocSysString ( ) ; DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; query = " " ; sysQuery = query . AllocSysString ( ) ; DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; FillTree ( ) ; }
This callback will run when all windows are created but still
invisible.
This callback will run when all windows are created but still invisible .
// This will fill "tmp" TCL list with all childeren internal names.