Exemple #1
0
BOOL CxDlgIceRole::OnInitDialog() 
{
	CString csTitle;
	CDialog::OnInitDialog();
	m_ctrlIceRoleName.LimitText(sizeof(m_pStructRoleInfo->RoleName)-1);
	m_edRoleComment.LimitText(sizeof(m_pStructRoleInfo->Comment)-1);
	if (m_pStructRoleInfo->bAlter)
	{	//"Alter Ice Role %s on %s"
		csTitle.Format(IDS_ICE_ALTER_ROLE_TITLE,
			(LPCTSTR)m_pStructRoleInfo->RoleName, 
			(LPCTSTR)m_csVirtNodeName);
		m_ctrlIceRoleName.SetWindowText((char *)m_pStructRoleInfo->RoleName);
		m_ctrlIceRoleName.EnableWindow(FALSE);
		m_edRoleComment.SetWindowText((char *)m_pStructRoleInfo->Comment);
		PushHelpId (HELPID_ALTER_IDD_ICE_ROLE);
	}
	else
	{
		CString csFormat;
		GetWindowText(csFormat);
		csTitle.Format(csFormat,m_csVirtNodeName);
		PushHelpId (HELPID_IDD_ICE_ROLE);
	}
	SetWindowText(csTitle);
	EnableDisableOKbutton();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #2
0
BOOL CxDlgRemoteCommandInterface::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	PushHelpId (REMOTEPILOTDIALOG);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #3
0
BOOL CxDlgIceCommonCombo::OnInitDialog() 
{
	CDialog::OnInitDialog();

	SetWindowText(m_csTitle);
	FillComboBox();
	EnableDisableOK();
	PushHelpId (m_nHelpId);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #4
0
BOOL CxDlgIceProfile::OnInitDialog() 
{
	CString csTempo,csTitle;
	CDialog::OnInitDialog();

	if (m_pStructProfileInfo->bAlter)
	{	//"Alter Ice Profile %s on %s"
		csTitle.Format(IDS_ICE_ALTER_PROFILE_TITLE,
		(LPCTSTR)m_pStructProfileInfo->ProfileName, 
		(LPCTSTR)m_csVnodeName);
		m_ctrledName.EnableWindow(FALSE);
		PushHelpId (HELPID_ALTER_IDD_ICE_PROFILE);
	}
	else
	{
		GetWindowText(csTempo);
		csTitle.Format(csTempo,m_csVnodeName);
		PushHelpId (HELPID_IDD_ICE_PROFILE);
	}
	SetWindowText(csTitle);
	FillDatabasesUsers();
	m_bAdmin			=	m_pStructProfileInfo->bAdminPriv; 
	m_bSecurityAdmin	=	m_pStructProfileInfo->bSecurityPriv;
	m_bUnitManager		=	m_pStructProfileInfo->bUnitMgrPriv;
	m_bMonitoring		=	m_pStructProfileInfo->bMonitorPriv;
	m_lTimeout			=	m_pStructProfileInfo->ltimeoutms;
	m_csName			=	m_pStructProfileInfo->ProfileName;
	m_csDefUser			=	m_pStructProfileInfo->DefDBUsr.UserAlias;
	UpdateData(FALSE);
	char buffer[20];
	_ltot(LONG_MAX,buffer,10);
	m_ctrledTimeOut.LimitText(lstrlen(buffer));
	m_ctrledName.LimitText(sizeof(m_pStructProfileInfo->ProfileName)-1);

	EnableDisableOK ();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #5
0
BOOL CxDlgIceDbUser::OnInitDialog() 
{
	CString csTitle;
	CDialog::OnInitDialog();

	m_ctrlAlias.LimitText(sizeof(m_pStructDbUser->UserAlias)-1);
	m_ctrlName.LimitText(sizeof(m_pStructDbUser->User_Name)-1);
	m_ctrlPassWord.LimitText(sizeof(m_pStructDbUser->Password)-1);
	m_ctrlConfirm.LimitText(sizeof(m_pStructDbUser->Password)-1);
	m_ctrlComment.LimitText(sizeof(m_pStructDbUser->Comment)-1);
	if (m_pStructDbUser->bAlter)
	{
		// "Alter Ice Database User %s on %s"
		csTitle.Format(IDS_ICE_ALTER_DATABASE_USER_TITLE,
			(LPCTSTR)m_pStructDbUser->UserAlias, 
			(LPCTSTR)m_csVirtNodeName);
		m_ctrlAlias.SetWindowText((char *)m_pStructDbUser->UserAlias);
		m_ctrlName.SetWindowText((char *)m_pStructDbUser->User_Name);
		m_ctrlAlias.EnableWindow(FALSE);
		m_ctrlPassWord.SetWindowText((char *)m_pStructDbUser->Password);
		m_ctrlConfirm.SetWindowText((char *)m_pStructDbUser->Password);
		m_ctrlComment.SetWindowText((char *)m_pStructDbUser->Comment);
		PushHelpId (HELPID_ALTER_IDD_ICE_DATABASE_USER);
	}
	else
	{
		CString csFormat;
		GetWindowText(csFormat);
		csTitle.Format(csFormat,m_csVirtNodeName);
		PushHelpId (HELPID_IDD_ICE_DATABASE_USER);
	}
	SetWindowText(csTitle);
	EnableDisableOK ();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #6
0
BOOL CxDlgUserMod::OnInitDialog()
{
	CDialog::OnInitDialog();
	LPUCHAR parent [MAXPLEVEL];
	TCHAR   buffer [MAXOBJECTNAME];
	CString csFormatTitle,csCaption;

	//
	// Make up title:
	GetWindowText(csFormatTitle);
	parent [0] = (LPUCHAR)(LPTSTR)(LPCTSTR)m_csDBName;
	parent [1] = NULL;
	csCaption.Format(csFormatTitle, (LPTSTR)GetVirtNodeName(m_nNodeHandle), (LPCTSTR)m_csDBName);

	if (!m_csTableName.IsEmpty() && !m_csTableOwner.IsEmpty())
	{
		GetExactDisplayString (m_csTableName, m_csTableOwner, OT_TABLE, parent, buffer);
		csCaption += buffer;
		bChooseTableEnable = FALSE;
	}
	else
		bChooseTableEnable = TRUE;
	SetWindowText(csCaption);

	if ( bChooseTableEnable )
		m_ctrlButtonTables.EnableWindow(FALSE); // Grayed "Tables" button
	else
	{
		m_ctrlButtonTables.ShowWindow(SW_HIDE); // hide button "tables"
		m_CheckSpecifTbl.ShowWindow(SW_HIDE);   // hide checkBox "specify tables"

		m_ctrlStaticTblName.ShowWindow(SW_SHOW); //Show static "table"
		m_ctrlStaticTblName.EnableWindow(TRUE) ; //Ungrayed static "table"
		m_ctrlTblName.ShowWindow(SW_SHOW);       //Show edit controle with the table name.
		m_ctrlTblName.EnableWindow(FALSE);       //Grayed edit controle with the table name.
		m_ctrlTblName.SetWindowText(m_csTableName);
	}

	m_lpTblParam.lpTable = NULL;

	PushHelpId(IDD_USERMOD);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #7
0
BOOL CxDlgCheckPointLst::OnInitDialog() 
{
	CString csTitle,csNewTitle;
	CDialog::OnInitDialog();

	GetWindowText(csTitle);
	csNewTitle.Format(csTitle, m_csCurVnodeName ,m_csCurDBName);
	SetWindowText(csNewTitle);

	PushHelpId(IDD_CHECKPOINT_LIST);

	InitializeListCtrl();
	fillListCtrl();

	if ( !m_cListCtrl.GetItemCount() )
		GetDlgItem(IDOK)->EnableWindow(FALSE);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #8
0
BOOL CxDlgPreferencesBackgroundRefresh::OnInitDialog() 
{
	CDialog::OnInitDialog();

	int nContext = theApp.GetOneWindowType();
	switch (nContext)
	{
	case TYPEDOC_DOM:
		if (m_strAllObject.LoadString (IDS_ALL_DOMOBJECT))
			m_strAllObject = _T("All DOM Objects");
		break;
	case TYPEDOC_MONITOR:
		if (m_strAllObject.LoadString (IDS_ALL_IPMOBJECT))
			m_strAllObject = _T("All Monitor Objects");
		break;
	default:
		if (m_strAllObject.LoadString (IDS_I_ALLOBJECT))
			m_strAllObject = _T("All Objects");
		break;
	}
	m_cEditFrequency.LimitText (4);
	m_cSpin1.SetRange (1, 9999);
	InitUnit ();

	FillObjectType();
	FillUnit();

	m_cComboObjectType.SetCurSel (0);
	m_cComboUnit.SetCurSel (0);
	ShowCharacteristics (0);

	SetDefaultMessageOption ();
	PushHelpId (IDD_REFRESHSET);

	if (nContext == TYPEDOC_MONITOR)
		m_cComboObjectType.EnableWindow (FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #9
0
BOOL CxDlgTablePrimaryKey::OnInitDialog() 
{
	ASSERT (m_pKeyParam);
	if (!m_pKeyParam)
		return FALSE;
	CDialog::OnInitDialog();
	VERIFY(m_cButtonUp.SubclassDlgItem(IDC_MFC_BUTTON6, this));
	VERIFY(m_cButtonDown.SubclassDlgItem(IDC_MFC_BUTTON7, this));
	VERIFY (m_cListCtrl.SubclassDlgItem (IDC_MFC_LIST1, this));
	m_ImageCheck.Create (IDB_CHECK_NOFRAME, 16, 1, RGB (255, 0, 0));
	m_cListCtrl.SetCheckImageList(&m_ImageCheck);

	LV_COLUMN lvcolumn;
	TCHAR     szColHeader [2][16];
	lstrcpy(szColHeader [0],VDBA_MfcResourceString(IDS_TC_COLUMN));   // _T("Column")
	lstrcpy(szColHeader [1],VDBA_MfcResourceString(IDS_TC_NULLABLE)); // _T("Nullable")
	int       i;
	int       hWidth [2] = {130, 80};
	//
	// Set the number of columns: 2
	// List of columns of Base Table:
	memset (&lvcolumn, 0, sizeof (LV_COLUMN));
	lvcolumn.mask = LVCF_FMT|LVCF_SUBITEM|LVCF_TEXT|LVCF_WIDTH;
	for (i=0; i<2; i++)
	{
		lvcolumn.fmt = LVCFMT_LEFT;
		lvcolumn.pszText = szColHeader[i];
		lvcolumn.iSubItem = i;
		lvcolumn.cx = hWidth[i];
		if (i==0)
			m_cListCtrl.InsertColumn (i, &lvcolumn); 
		else
		{
			lvcolumn.fmt = LVCFMT_CENTER;
			m_cListCtrl.InsertColumn (i, &lvcolumn, TRUE);
		}
	}
	m_cEditKeyName.LimitText (33);
	LPSTRINGLIST ls = m_pKeyParam->pListTableColumn;
	while (ls != NULL)
	{
		AddTableColumn (ls->lpszString, (ls->extraInfo1==0)? TRUE: FALSE);
		ls = ls->next;
	}

	ls = m_pKeyParam->pListKey;
	while (ls != NULL)
	{
		m_cListKey.AddString (ls->lpszString);
		ls = ls->next;
	}
	m_nDelMode = m_pKeyParam->nMode;
	m_bAlter = m_pKeyParam->bAlter;
	SetDisplayMode();
	m_cButtonDeleteCascade.ShowWindow (m_bAlter? SW_SHOW: SW_HIDE);
	EnableControls();

	//
	// Hide the button index enhancement if not Ingres >= 2.5
	if ( GetOIVers() < OIVERS_25 || 
		(IsVW() && m_pTable && ((LPTABLEPARAMS)m_pTable)->bCreateVectorWise)) //disable for Ingres VW
	{
		m_cButtonIndex.ShowWindow (SW_HIDE);
	}

	PushHelpId(m_bAlter? HELPID_IDD_PRIMARYKEY_ALTER: HELPID_IDD_PRIMARYKEY_ADD);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Exemple #10
0
/////////////////////////////////////////////////////////////////////////////
// CxDlgObjectComment message handlers
BOOL CxDlgObjectComment::OnInitDialog()
{
	CDialog::OnInitDialog();
	LPUCHAR parent [MAXPLEVEL];
	TCHAR buffer   [MAXOBJECTNAME];
	CString csFormatTitle,csCaption;

	//
	// Make up title:
	GetWindowText(csFormatTitle);
	parent [0] = (LPUCHAR)(LPTSTR)(LPCTSTR)m_csDBName;
	parent [1] = NULL;
	GetExactDisplayString (m_csObjectName, m_csObjectOwner, m_iCurObjType, parent, buffer);

	csCaption.Format(csFormatTitle,(LPTSTR)GetVirtNodeName(m_nNodeHandle),m_csDBName,buffer);
	SetWindowText(csCaption);

	m_ImageList.Create(1, 18, TRUE, 1, 0);
	m_cListCtrl.SetImageList (&m_ImageList, LVSIL_SMALL);
	m_cListCtrl.SetFullRowSelected (TRUE);

	// TODO: Add extra initialization here
	LV_COLUMN lvcolumn;
	TCHAR     szColHeader [2][16];
	lstrcpy(szColHeader [0],VDBA_MfcResourceString(IDS_TC_COLUMN));          // _T("Column")
	lstrcpy(szColHeader [1],VDBA_MfcResourceString(IDS_TC_COLUMN_COMMENT));  // _T("Comment")
	int       i;
	int       hWidth [2] = {130, 180};
	CRect r;
	// calculate the width of column "comment"
	m_cListCtrl.GetClientRect(r);
	hWidth [1] = r.right-hWidth [0];
	//
	// Set the number of columns: 2
	// List of columns of Base Object (table or view):
	memset (&lvcolumn, 0, sizeof (LV_COLUMN));
	lvcolumn.mask = LVCF_FMT|LVCF_SUBITEM|LVCF_TEXT|LVCF_WIDTH;
	for (i=0; i<2; i++)
	{
		lvcolumn.fmt = LVCFMT_LEFT;
		lvcolumn.pszText = szColHeader[i];
		lvcolumn.iSubItem = i;
		lvcolumn.cx = hWidth[i];
		m_cListCtrl.InsertColumn (i, &lvcolumn);
	}

	if (!InitializeObjectColumns() || !m_ListColumn)
	{
		EndDialog(FALSE);
		return TRUE;
	}

	if (!FillListColumnWithComment( ))
	{
		EndDialog(FALSE);
		return TRUE;
	}

	LPOBJECTLIST  ls;
	LPCOMMENTCOLUMN lpCol;
	int nCount = 0;
	CString csComment;
	ls = m_ListColumn;
	while (ls)
	{
		lpCol=(LPCOMMENTCOLUMN)ls->lpObject;
		m_cListCtrl.InsertItem  (nCount, (LPCTSTR)lpCol->szColumnName);
		if (lpCol->lpszComment)
			m_cListCtrl.SetItemText  (nCount, 1,(LPCTSTR)lpCol->lpszComment);
		nCount++;
		ls=(LPOBJECTLIST)ls->lpNext;
	}

	m_cListCtrl.SetLimitEditText();
	
	m_cEditTableComment.LimitText (MAX_LENGTH_COMMENT);
	m_cEditTableComment.SetWindowText(m_csCommentObject);
	m_bEditUnselected = TRUE;

	PushHelpId(IDD_XOBJECT_COMMENT);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}