newntui/discovermdi/src/qaparams.cpp
//-----------------------------------------------------------------------
// This callback will run when all windows are created but still invisible.
// We will use it to fill our mode selector tab control.
//-----------------------------------------------------------------------
This callback will run when all windows are created but still invisible.
We will use it to fill our mode selector tab control.
This callback will run when all windows are created but still invisible . We will use it to fill our mode selector tab control .
void CQAParams::OnInitialUpdate()  {
TC_ITEM item;
CString query;
CString types;
BSTR sysQuery;
	CFormView::OnInitialUpdate();
	if(m_Updated==FALSE)  {
        SIZE sizeTotal;
        sizeTotal.cx=0;
        sizeTotal.cy=0;
        SetScrollSizes( MM_TEXT, sizeTotal);
		m_Updated=TRUE;
	    item.mask         = TCIF_TEXT;
        item.pszText      = "Settings";     
        item.cchTextMax   = 20;     
	    m_ModeSelector.InsertItem(0,&item);
		EnableReport(false);
	    m_Properties.SetUserSelection(1);
	    m_Properties.SetFixedRows(1);
	    m_Properties.SetFixedCols(0);
	    m_Properties.SetCols(2);
	    m_Properties.SetRows(1);
        m_Properties.SetColWidth(0,200);
        m_Properties.SetColWidth(1,100);
	    m_Properties.SetCellText(0,0,"Property name");
	    m_Properties.SetCellText(0,1,"Property value");
	    ShowReportPage(FALSE);
        query="sev_get_input_types";
        sysQuery=query.AllocSysString();
        types=DataSourceAccessSync(&sysQuery);
	    SysFreeString(sysQuery); 
		BOOL in=FALSE;
		CString name;
		int line=0;
		for(int i=0;i<types.GetLength();i++) {
			if(types[i]=='{') {
				in=TRUE;
				continue;
			}
			if( (types[i]=='}') || (types[i]==' ' && in==FALSE) ) {
				if(name.GetLength()>0)
                     m_ScopeCombo.InsertString(line++,name);
				name="";
                in=FALSE;
				continue;
			}
			name+=types[i];
		}
		m_ScopeCombo.SetCurSel(0);
	}
}
void CQAParams :: OnInitialUpdate ( ) { TC_ITEM item ; CString query ; CString types ; BSTR sysQuery ; CFormView :: OnInitialUpdate ( ) ; if ( m_Updated == FALSE ) { SIZE sizeTotal ; sizeTotal . cx = 0 ; sizeTotal . cy = 0 ; SetScrollSizes ( MM_TEXT , sizeTotal ) ; m_Updated = TRUE ; item . mask = TCIF_TEXT ; item . pszText = " " ; item . cchTextMax = 20 ; m_ModeSelector . InsertItem ( 0 , & item ) ; EnableReport ( false ) ; m_Properties . SetUserSelection ( 1 ) ; m_Properties . SetFixedRows ( 1 ) ; m_Properties . SetFixedCols ( 0 ) ; m_Properties . SetCols ( 2 ) ; m_Properties . SetRows ( 1 ) ; m_Properties . SetColWidth ( 0 , 200 ) ; m_Properties . SetColWidth ( 1 , 100 ) ; m_Properties . SetCellText ( 0 , 0 , " " ) ; m_Properties . SetCellText ( 0 , 1 , " " ) ; ShowReportPage ( FALSE ) ; query = " " ; sysQuery = query . AllocSysString ( ) ; types = DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; BOOL in = FALSE ; CString name ; int line = 0 ; for ( int i = 0 ; i < types . GetLength ( ) ; i ++ ) { if ( types [ i ] == ' ' ) { in = TRUE ; continue ; } if ( ( types [ i ] == ' ' ) || ( types [ i ] == ' ' && in == FALSE ) ) { if ( name . GetLength ( ) > 0 ) m_ScopeCombo . InsertString ( line ++ , name ) ; name = " " ; in = FALSE ; continue ; } name += types [ i ] ; } m_ScopeCombo . SetCurSel ( 0 ) ; } }
This callback will run when all windows are created but still invisible.
This callback will run when all windows are created but still invisible .