void Aggregates_ShowProperties (LPIDENT lpiAggregate, size_t nAlerts, BOOL fJumpToThreshold, HWND hParentModal) { HWND hCurrent; if ((hCurrent = PropCache_Search (pcAGG_PROP, lpiAggregate)) != NULL) { SetFocus (hCurrent); if (fJumpToThreshold) { HWND hTab; if ((hTab = GetDlgItem (hCurrent, IDC_PROPSHEET_TABCTRL)) != NULL) { int nTabs = TabCtrl_GetItemCount (hTab); TabCtrl_SetCurSel (hTab, nTabs-1); NMHDR nm; nm.hwndFrom = hTab; nm.idFrom = IDC_PROPSHEET_TABCTRL; nm.code = TCN_SELCHANGE; SendMessage (hCurrent, WM_NOTIFY, 0, (LPARAM)&nm); } } } else { TCHAR szSvrName[ cchNAME ]; TCHAR szAggName[ cchNAME ]; lpiAggregate->GetServerName (szSvrName); lpiAggregate->GetAggregateName (szAggName); LPTSTR pszTitle = FormatString (IDS_AGG_PROP_TITLE, TEXT("%s%s"), szSvrName, szAggName); LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE); psh->fMadeCaption = TRUE; psh->sh.hwndParent = hParentModal; if (PropSheet_AddProblemsTab (psh, IDD_AGG_PROBLEMS, lpiAggregate, nAlerts) && PropSheet_AddTab (psh, IDS_AGG_GENERAL_TAB, IDD_AGG_GENERAL, (DLGPROC)Aggregates_General_DlgProc, (LPARAM)lpiAggregate, TRUE, FALSE)) { if (fJumpToThreshold) psh->sh.nStartPage = psh->sh.nPages-1; if (hParentModal) PropSheet_ShowModal (psh, PumpMessage); else PropSheet_ShowModeless (psh); } } }
void ShowColumnsDialog (HWND hParent, LPVIEWINFO lpvi) { for (size_t iCol = 0; iCol < nCOLUMNS; ++iCol) { COLUMNS[ iCol ].fChanged = FALSE; } if (gr.fPreview && !gr.fVert) memcpy (&COLUMNS[ ceSERVERS ].vi, &gr.diHorz.viewSvr, sizeof(VIEWINFO)); else memcpy (&COLUMNS[ ceSERVERS ].vi, &gr.diVert.viewSvr, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceFILESETS ].vi, &gr.viewSet, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceAGGREGATES ].vi, &gr.viewAgg, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceSERVICES ].vi, &gr.viewSvc, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceREPLICAS ].vi, &gr.viewRep, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceAGGS_MOVE ].vi, &gr.viewAggMove, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceAGGS_CREATE ].vi, &gr.viewAggCreate, sizeof(VIEWINFO)); memcpy (&COLUMNS[ ceAGGS_RESTORE ].vi, &gr.viewAggRestore, sizeof(VIEWINFO)); if (lpvi == &gr.viewSet) lpvi = &COLUMNS[ ceFILESETS ].vi; else if (lpvi == &gr.viewAgg) lpvi = &COLUMNS[ ceAGGREGATES ].vi; else if (lpvi == &gr.viewSvc) lpvi = &COLUMNS[ ceSERVICES ].vi; else if (lpvi == &gr.viewRep) lpvi = &COLUMNS[ ceREPLICAS ].vi; else if (lpvi == &gr.viewAggMove) lpvi = &COLUMNS[ ceAGGS_MOVE ].vi; else if (lpvi == &gr.viewAggCreate) lpvi = &COLUMNS[ ceAGGS_CREATE ].vi; else if (lpvi == &gr.viewAggRestore) lpvi = &COLUMNS[ ceAGGS_RESTORE ].vi; else lpvi = &COLUMNS[ ceSERVERS ].vi; LPPROPSHEET psh = PropSheet_Create (IDS_COLUMNS_TITLE, FALSE); psh->sh.hwndParent = hParent; ShowColumnsParams *pscp = New (ShowColumnsParams); pscp->hParent = hParent; pscp->lpviDefault = lpvi; PropSheet_AddTab (psh, 0, IDD_COLUMNS, (DLGPROC)Columns_DlgProc, (LPARAM)pscp, TRUE); PropSheet_ShowModal (psh, PumpMessage); }
void Filesets_ShowProperties (LPIDENT lpiFileset, size_t nAlerts, BOOL fJumpToThreshold) { HWND hCurrent; if ((hCurrent = PropCache_Search (pcSET_PROP, lpiFileset)) != NULL) { SetFocus (hCurrent); if (fJumpToThreshold) { HWND hTab; if ((hTab = GetDlgItem (hCurrent, IDC_PROPSHEET_TABCTRL)) != NULL) { int nTabs = TabCtrl_GetItemCount (hTab); TabCtrl_SetCurSel (hTab, nTabs-1); NMHDR nm; nm.hwndFrom = hTab; nm.idFrom = IDC_PROPSHEET_TABCTRL; nm.code = TCN_SELCHANGE; SendMessage (hCurrent, WM_NOTIFY, 0, (LPARAM)&nm); } } } else { TCHAR szCell[ cchNAME ]; lpiFileset->GetCellName (szCell); TCHAR szFileset[ cchNAME ]; lpiFileset->GetFilesetName (szFileset); LPTSTR pszTitle = FormatString (IDS_SET_PROP_TITLE, TEXT("%s"), szFileset); LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE); psh->fMadeCaption = TRUE; if (PropSheet_AddProblemsTab (psh, IDD_SET_PROBLEMS, lpiFileset, nAlerts) && PropSheet_AddTab (psh, IDS_SET_GENERAL_TAB, IDD_SET_GENERAL, (DLGPROC)Filesets_General_DlgProc, (LPARAM)lpiFileset, TRUE)) { if (fJumpToThreshold) psh->sh.nStartPage = psh->sh.nPages-1; PropSheet_ShowModeless (psh); } } }
void Server_Hosts (LPIDENT lpiServer) { HWND hCurrent; if ((hCurrent = PropCache_Search (pcSVR_HOSTS, lpiServer)) != NULL) { SetFocus (hCurrent); } else { LPSVR_HOSTS_PARAMS lpp = New (SVR_HOSTS_PARAMS); memset (lpp, 0x00, sizeof(SVR_HOSTS_PARAMS)); lpp->lpiServer = lpiServer; TCHAR szServer[ cchNAME ]; lpiServer->GetServerName (szServer); LPTSTR pszTitle = FormatString (IDS_SVR_HOSTS_TITLE, TEXT("%s"), szServer); LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE); PropSheet_AddTab (psh, IDS_SVR_HOST_TAB, IDD_SVR_HOSTS, (DLGPROC)Server_Hosts_DlgProc, (LONG_PTR)lpp, TRUE); PropSheet_ShowModeless (psh); FreeString (pszTitle); } }
void HostsTab_OnEdit (HWND hDlg) { HWND hList = GetDlgItem (hDlg, IDC_LIST); HLISTITEM hItem = FastList_FindFirstSelected (hList); if (hItem) { PCELLDBLINE pLine = (PCELLDBLINE)FastList_GetItemParam (hList, hItem); CELLDBLINEINFO Info; CSDB_CrackLine (&Info, pLine->szLine); LPTSTR pszTitle = FormatString (IDS_CELLEDIT_TITLE, TEXT("%s"), ((Info.szComment[0]) ? Info.szComment : Info.szCell)); LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE, GetParent(hDlg), (LPARAM)pLine); psh->sh.dwFlags |= PSH_NOAPPLYNOW; // Remove the Apply button psh->sh.dwFlags |= PSH_HASHELP; // Add a Help button instead PropSheet_AddTab (psh, ((Info.szComment[0]) ? Info.szComment : Info.szCell), IDD_CELL_EDIT, (DLGPROC)CellEdit_DlgProc, (LPARAM)pLine, TRUE); PropSheet_ShowModal (psh); FreeString (pszTitle); } HostsTab_FillList (hDlg); HostsTab_OnSelect (hDlg); }