Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

827 lines
22 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // GrpWiz.cpp
  7. //
  8. // Abstract:
  9. // Implementation of the CCreateGroupWizard class and all pages
  10. // specific to a group wizard.
  11. //
  12. // Author:
  13. // David Potter (davidp) July 22, 1996
  14. //
  15. // Revision History:
  16. //
  17. // Notes:
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. #include "stdafx.h"
  21. #include "CluAdmin.h"
  22. #include "GrpWiz.h"
  23. #include "ClusDoc.h"
  24. #include "DDxDDv.h"
  25. #include "HelpData.h" // for g_rghelpmapGroupWizName
  26. #ifdef _DEBUG
  27. #define new DEBUG_NEW
  28. #undef THIS_FILE
  29. static char THIS_FILE[] = __FILE__;
  30. #endif
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CCreateGroupWizard
  33. /////////////////////////////////////////////////////////////////////////////
  34. IMPLEMENT_DYNAMIC(CCreateGroupWizard, CBaseWizard)
  35. /////////////////////////////////////////////////////////////////////////////
  36. // Message Maps
  37. BEGIN_MESSAGE_MAP(CCreateGroupWizard, CBaseWizard)
  38. //{{AFX_MSG_MAP(CCreateGroupWizard)
  39. //}}AFX_MSG_MAP
  40. END_MESSAGE_MAP()
  41. /////////////////////////////////////////////////////////////////////////////
  42. //++
  43. //
  44. // CCreateGroupWizard::CCreateGroupWizard
  45. //
  46. // Routine Description:
  47. // Constructor.
  48. //
  49. // Arguments:
  50. // pdoc [IN OUT] Document in which group is to be created.
  51. // pParentWnd [IN OUT] Parent window for this property sheet.
  52. //
  53. // Return Value:
  54. // None.
  55. //
  56. //--
  57. /////////////////////////////////////////////////////////////////////////////
  58. CCreateGroupWizard::CCreateGroupWizard(
  59. IN OUT CClusterDoc * pdoc,
  60. IN OUT CWnd * pParentWnd
  61. )
  62. : CBaseWizard(IDS_NEW_GROUP_TITLE, pParentWnd)
  63. {
  64. ASSERT_VALID(pdoc);
  65. m_pdoc = pdoc;
  66. m_pciGroup = NULL;
  67. m_bCreated = FALSE;
  68. m_rgpages[0].m_pwpage = &m_pageName;
  69. m_rgpages[0].m_dwWizButtons = PSWIZB_NEXT;
  70. m_rgpages[1].m_pwpage = &m_pageOwners;
  71. m_rgpages[1].m_dwWizButtons = PSWIZB_BACK | PSWIZB_FINISH;
  72. } //*** CCreateGroupWizard::CCreateGroupWizard()
  73. /////////////////////////////////////////////////////////////////////////////
  74. //++
  75. //
  76. // CCreateGroupWizard::~CCreateGroupWizard
  77. //
  78. // Routine Description:
  79. // Destructor.
  80. //
  81. // Arguments:
  82. // None.
  83. //
  84. // Return Value:
  85. // None.
  86. //
  87. //--
  88. /////////////////////////////////////////////////////////////////////////////
  89. CCreateGroupWizard::~CCreateGroupWizard(void)
  90. {
  91. if (m_pciGroup != NULL)
  92. m_pciGroup->Release();
  93. } //*** CCreateGroupWizard::~CCreateGroupWizard()
  94. /////////////////////////////////////////////////////////////////////////////
  95. //++
  96. //
  97. // CCreateGroupWizard::BInit
  98. //
  99. // Routine Description:
  100. // Initialize the wizard.
  101. //
  102. // Arguments:
  103. // None.
  104. //
  105. // Return Value:
  106. // TRUE Wizard initialized successfully.
  107. // FALSE Wizard not initialized successfully.
  108. //
  109. //--
  110. /////////////////////////////////////////////////////////////////////////////
  111. BOOL CCreateGroupWizard::BInit(void)
  112. {
  113. // Call the base class method.
  114. CClusterAdminApp * papp = GetClusterAdminApp();
  115. if (!CBaseWizard::BInit(papp->Iimg(IMGLI_GROUP)))
  116. return FALSE;
  117. return TRUE;
  118. } //*** CCreateGroupWizard::BInit()
  119. /////////////////////////////////////////////////////////////////////////////
  120. //++
  121. //
  122. // CCreateGroupWizard::OnCancel
  123. //
  124. // Routine Description:
  125. // Called after the wizard has been dismissed when the Cancel button
  126. // has been pressed.
  127. //
  128. // Arguments:
  129. // None.
  130. //
  131. // Return Value:
  132. // None.
  133. //
  134. //--
  135. /////////////////////////////////////////////////////////////////////////////
  136. void CCreateGroupWizard::OnCancel(void)
  137. {
  138. if (BCreated())
  139. {
  140. ASSERT_VALID(PciGroup());
  141. try
  142. {
  143. PciGroup()->DeleteGroup();
  144. } // try
  145. catch (CException * pe)
  146. {
  147. pe->ReportError();
  148. pe->Delete();
  149. } // catch: CException
  150. catch (...)
  151. {
  152. } // catch: anything
  153. m_bCreated = FALSE;
  154. } // if: we created the object
  155. } //*** CCreateGroupWizard::OnCancel()
  156. /////////////////////////////////////////////////////////////////////////////
  157. //++
  158. //
  159. // CCreateGroupWizard::Ppages
  160. //
  161. // Routine Description:
  162. // Returns the array of pages to add to the property sheet.
  163. //
  164. // Arguments:
  165. // None.
  166. //
  167. // Return Value:
  168. // Page array.
  169. //
  170. //--
  171. /////////////////////////////////////////////////////////////////////////////
  172. CWizPage * CCreateGroupWizard::Ppages(void)
  173. {
  174. return m_rgpages;
  175. } //*** CCreateGroupWizard::Ppages()
  176. /////////////////////////////////////////////////////////////////////////////
  177. //++
  178. //
  179. // CCreateGroupWizard::Cpages
  180. //
  181. // Routine Description:
  182. // Returns the count of pages in the array.
  183. //
  184. // Arguments:
  185. // None.
  186. //
  187. // Return Value:
  188. // Count of pages in the array.
  189. //
  190. //--
  191. /////////////////////////////////////////////////////////////////////////////
  192. int CCreateGroupWizard::Cpages(void)
  193. {
  194. return sizeof(m_rgpages) / sizeof(CWizPage);
  195. } //*** CCreateGroupWizard::Cpages()
  196. /////////////////////////////////////////////////////////////////////////////
  197. //++
  198. //
  199. // CCreateGroupWizard::BSetName
  200. //
  201. // Routine Description:
  202. // Set the name of the group, creating it if necessary.
  203. //
  204. // Arguments:
  205. // rstrName [IN] Name of the group.
  206. //
  207. // Return Value:
  208. // TRUE Name set successfully.
  209. // FALSE Error setting the name.
  210. //
  211. //--
  212. /////////////////////////////////////////////////////////////////////////////
  213. BOOL CCreateGroupWizard::BSetName( IN const CString & rstrName )
  214. {
  215. BOOL bSuccess = TRUE;
  216. CWaitCursor wc;
  217. try
  218. {
  219. if ( ! BCreated() )
  220. {
  221. // Allocate an item and create the group.
  222. if ( PciGroup() == NULL )
  223. {
  224. m_pciGroup = new CGroup( FALSE );
  225. if ( m_pciGroup == NULL )
  226. {
  227. AfxThrowMemoryException();
  228. } // if: error allocating memory
  229. m_pciGroup->AddRef();
  230. } // if: no group yet
  231. PciGroup()->Create( Pdoc(), rstrName );
  232. PciGroup()->ReadItem();
  233. m_strName = rstrName;
  234. m_bCreated = TRUE;
  235. } // if: object not created yet
  236. else
  237. {
  238. ASSERT_VALID( PciGroup() );
  239. PciGroup()->SetName( rstrName );
  240. m_strName = rstrName;
  241. } // else: object already exists
  242. } // try
  243. catch ( CException * pe )
  244. {
  245. pe->ReportError();
  246. pe->Delete();
  247. try
  248. {
  249. PciGroup()->DeleteGroup();
  250. } // try
  251. catch (...)
  252. {
  253. } // catch: Anything
  254. bSuccess = FALSE;
  255. } // catch: CException
  256. return bSuccess;
  257. } //*** CCreateGroupWizard::BSetName()
  258. /////////////////////////////////////////////////////////////////////////////
  259. //++
  260. //
  261. // CCreateGroupWizard::BSetDescription
  262. //
  263. // Routine Description:
  264. // Set the description of the group.
  265. //
  266. // Arguments:
  267. // rstrDesc [IN] Description of the group.
  268. //
  269. // Return Value:
  270. // None.
  271. //
  272. //--
  273. /////////////////////////////////////////////////////////////////////////////
  274. int CCreateGroupWizard::BSetDescription(IN const CString & rstrDesc)
  275. {
  276. BOOL bSuccess = TRUE;
  277. CWaitCursor wc;
  278. try
  279. {
  280. ASSERT(BCreated());
  281. ASSERT_VALID(PciGroup());
  282. PciGroup()->SetCommonProperties(
  283. rstrDesc,
  284. PciGroup()->NFailoverThreshold(),
  285. PciGroup()->NFailoverPeriod(),
  286. PciGroup()->CgaftAutoFailbackType(),
  287. PciGroup()->NFailbackWindowStart(),
  288. PciGroup()->NFailbackWindowEnd()
  289. );
  290. m_strDescription = rstrDesc;
  291. } // try
  292. catch (CException * pe)
  293. {
  294. pe->ReportError();
  295. pe->Delete();
  296. bSuccess = FALSE;
  297. } // catch: CException
  298. return bSuccess;
  299. } //*** CCreateGroupWizard::BSetDescription()
  300. //*************************************************************************//
  301. /////////////////////////////////////////////////////////////////////////////
  302. // CNewGroupNamePage property page
  303. /////////////////////////////////////////////////////////////////////////////
  304. IMPLEMENT_DYNCREATE(CNewGroupNamePage, CBaseWizardPage)
  305. /////////////////////////////////////////////////////////////////////////////
  306. // Message Maps
  307. BEGIN_MESSAGE_MAP(CNewGroupNamePage, CBaseWizardPage)
  308. //{{AFX_MSG_MAP(CNewGroupNamePage)
  309. ON_EN_CHANGE(IDC_WIZ_GROUP_NAME, OnChangeGroupName)
  310. ON_EN_KILLFOCUS(IDC_WIZ_GROUP_NAME, OnKillFocusGroupName)
  311. //}}AFX_MSG_MAP
  312. END_MESSAGE_MAP()
  313. /////////////////////////////////////////////////////////////////////////////
  314. //++
  315. //
  316. // CNewGroupNamePage::CNewGroupNamePage
  317. //
  318. // Routine Description:
  319. // Default constructor.
  320. //
  321. // Arguments:
  322. // None.
  323. //
  324. // Return Value:
  325. // None.
  326. //
  327. //--
  328. /////////////////////////////////////////////////////////////////////////////
  329. CNewGroupNamePage::CNewGroupNamePage(void)
  330. : CBaseWizardPage(IDD, g_aHelpIDs_IDD_WIZ_GROUP_NAME)
  331. {
  332. //{{AFX_DATA_INIT(CNewGroupNamePage)
  333. m_strName = _T("");
  334. m_strDesc = _T("");
  335. //}}AFX_DATA_INIT
  336. } //*** CNewGroupNamePage::CNewGroupNamePage()
  337. /////////////////////////////////////////////////////////////////////////////
  338. //++
  339. //
  340. // CNewGroupNamePage::DoDataExchange
  341. //
  342. // Routine Description:
  343. // Do data exchange between the dialog and the class.
  344. //
  345. // Arguments:
  346. // pDX [IN OUT] Data exchange object
  347. //
  348. // Return Value:
  349. // None.
  350. //
  351. //--
  352. /////////////////////////////////////////////////////////////////////////////
  353. void CNewGroupNamePage::DoDataExchange(CDataExchange * pDX)
  354. {
  355. CBaseWizardPage::DoDataExchange(pDX);
  356. //{{AFX_DATA_MAP(CNewGroupNamePage)
  357. DDX_Control(pDX, IDC_WIZ_GROUP_DESC, m_editDesc);
  358. DDX_Control(pDX, IDC_WIZ_GROUP_NAME, m_editName);
  359. DDX_Text(pDX, IDC_WIZ_GROUP_NAME, m_strName);
  360. DDX_Text(pDX, IDC_WIZ_GROUP_DESC, m_strDesc);
  361. //}}AFX_DATA_MAP
  362. DDV_RequiredText(pDX, IDC_WIZ_GROUP_NAME, IDC_WIZ_GROUP_NAME_LABEL, m_strName);
  363. } //*** CNewGroupNamePage::DoDataExchange()
  364. /////////////////////////////////////////////////////////////////////////////
  365. //++
  366. //
  367. // CNewGroupNamePage::BApplyChanges
  368. //
  369. // Routine Description:
  370. // Apply changes from this page.
  371. //
  372. // Arguments:
  373. // None.
  374. //
  375. // Return Value:
  376. // TRUE Changes applied successfully.
  377. // FALSE Error applying changes.
  378. //
  379. //--
  380. /////////////////////////////////////////////////////////////////////////////
  381. BOOL CNewGroupNamePage::BApplyChanges(void)
  382. {
  383. CWaitCursor wc;
  384. ASSERT(Pwiz() != NULL);
  385. // Get the data from the dialog.
  386. if (!UpdateData(TRUE /*bSaveAndValidate*/))
  387. return FALSE;
  388. // Save the data in the sheet.
  389. if (!PwizGroup()->BSetName(m_strName)
  390. || !PwizGroup()->BSetDescription(m_strDesc))
  391. return FALSE;
  392. return TRUE;
  393. } //*** CNewGroupNamePage::BApplyChanges()
  394. /////////////////////////////////////////////////////////////////////////////
  395. //++
  396. //
  397. // CNewGroupNamePage::OnSetActive
  398. //
  399. // Routine Description:
  400. // Handler for the PSN_SETACTIVE message.
  401. //
  402. // Arguments:
  403. // None.
  404. //
  405. // Return Value:
  406. // TRUE Page successfully initialized.
  407. // FALSE Page not initialized.
  408. //
  409. //--
  410. /////////////////////////////////////////////////////////////////////////////
  411. BOOL CNewGroupNamePage::OnSetActive(void)
  412. {
  413. BOOL bSuccess;
  414. bSuccess = CBaseWizardPage::OnSetActive();
  415. if (bSuccess)
  416. {
  417. if (m_strName.IsEmpty())
  418. EnableNext(FALSE);
  419. } // if: successful thus far
  420. return bSuccess;
  421. } //*** CNewGroupNamePage::OnSetActive()
  422. /////////////////////////////////////////////////////////////////////////////
  423. //++
  424. //
  425. // CNewGroupNamePage::OnChangeGroupName
  426. //
  427. // Routine Description:
  428. // Handler for the EN_CHANGE message on the Group Name edit control.
  429. //
  430. // Arguments:
  431. // None.
  432. //
  433. // Return Value:
  434. // None.
  435. //
  436. //--
  437. /////////////////////////////////////////////////////////////////////////////
  438. void CNewGroupNamePage::OnChangeGroupName(void)
  439. {
  440. if (m_editName.GetWindowTextLength() == 0)
  441. EnableNext(FALSE);
  442. else
  443. EnableNext(TRUE);
  444. } //*** CNewGroupNamePage::OnChangeGroupName()
  445. /////////////////////////////////////////////////////////////////////////////
  446. //++
  447. //
  448. // CNewGroupNamePage::OnKillFocusGroupName
  449. //
  450. // Routine Description:
  451. // Handler for the WM_KILLFOCUS message on the Group Name edit control.
  452. //
  453. // Arguments:
  454. // None.
  455. //
  456. // Return Value:
  457. // None.
  458. //
  459. //--
  460. /////////////////////////////////////////////////////////////////////////////
  461. void CNewGroupNamePage::OnKillFocusGroupName(void)
  462. {
  463. CString strName;
  464. m_editName.GetWindowText(strName);
  465. SetObjectTitle(strName);
  466. } //*** CNewGroupNamePage::OnKillFocusGroupName()
  467. //*************************************************************************//
  468. /////////////////////////////////////////////////////////////////////////////
  469. // CNewGroupOwnersPage property page
  470. /////////////////////////////////////////////////////////////////////////////
  471. IMPLEMENT_DYNCREATE(CNewGroupOwnersPage, CListCtrlPairWizPage)
  472. /////////////////////////////////////////////////////////////////////////////
  473. // Message Maps
  474. /////////////////////////////////////////////////////////////////////////////
  475. BEGIN_MESSAGE_MAP(CNewGroupOwnersPage, CListCtrlPairWizPage)
  476. //{{AFX_MSG_MAP(CNewGroupOwnersPage)
  477. //}}AFX_MSG_MAP
  478. END_MESSAGE_MAP()
  479. /////////////////////////////////////////////////////////////////////////////
  480. //++
  481. //
  482. // CNewGroupOwnersPage::CNewGroupOwnersPage
  483. //
  484. // Routine Description:
  485. // Constructor.
  486. //
  487. // Arguments:
  488. // None.
  489. //
  490. // Return Value:
  491. // None.
  492. //
  493. //--
  494. /////////////////////////////////////////////////////////////////////////////
  495. CNewGroupOwnersPage::CNewGroupOwnersPage(void)
  496. : CListCtrlPairWizPage(
  497. IDD,
  498. g_aHelpIDs_IDD_WIZ_PREFERRED_OWNERS,
  499. LCPS_SHOW_IMAGES | LCPS_ALLOW_EMPTY | LCPS_CAN_BE_ORDERED | LCPS_ORDERED,
  500. GetColumn,
  501. BDisplayProperties
  502. )
  503. {
  504. //{{AFX_DATA_INIT(CNewGroupOwnersPage)
  505. //}}AFX_DATA_INIT
  506. } //*** CNewGroupOwnersPage::CNewGroupOwnersPage()
  507. /////////////////////////////////////////////////////////////////////////////
  508. //++
  509. //
  510. // CNewGroupOwnersPage::DoDataExchange
  511. //
  512. // Routine Description:
  513. // Do data exchange between the dialog and the class.
  514. //
  515. // Arguments:
  516. // pDX [IN OUT] Data exchange object
  517. //
  518. // Return Value:
  519. // None.
  520. //
  521. //--
  522. /////////////////////////////////////////////////////////////////////////////
  523. void CNewGroupOwnersPage::DoDataExchange(CDataExchange * pDX)
  524. {
  525. // Initialize the lists before the list pair control is updated.
  526. if (!pDX->m_bSaveAndValidate)
  527. {
  528. if (!BInitLists())
  529. pDX->Fail();
  530. } // if: setting data to the dialog
  531. CListCtrlPairWizPage::DoDataExchange(pDX);
  532. //{{AFX_DATA_MAP(CNewGroupOwnersPage)
  533. DDX_Control(pDX, IDC_LCP_NOTE, m_staticNote);
  534. //}}AFX_DATA_MAP
  535. } //*** CNewGroupOwnersPage::DoDataExchange()
  536. /////////////////////////////////////////////////////////////////////////////
  537. //++
  538. //
  539. // CNewGroupOwnersPage::BInitLists
  540. //
  541. // Routine Description:
  542. // Initialize the lists.
  543. //
  544. // Arguments:
  545. // None.
  546. //
  547. // Return Value:
  548. // TRUE Page initialized successfully.
  549. // FALSE Page failed to initialize.
  550. //
  551. //--
  552. /////////////////////////////////////////////////////////////////////////////
  553. BOOL CNewGroupOwnersPage::BInitLists(void)
  554. {
  555. BOOL bSuccess = TRUE;
  556. ASSERT_VALID(PciGroup());
  557. try
  558. {
  559. SetLists(&PciGroup()->LpcinodePreferredOwners(), &PciGroup()->Pdoc()->LpciNodes());
  560. } // try
  561. catch (CException * pe)
  562. {
  563. pe->ReportError();
  564. pe->Delete();
  565. bSuccess = FALSE;
  566. } // catch: CException
  567. return bSuccess;
  568. } //*** CNewGroupOwnersPage::BInitLists()
  569. /////////////////////////////////////////////////////////////////////////////
  570. //++
  571. //
  572. // CNewGroupOwnersPage::OnInitDialog
  573. //
  574. // Routine Description:
  575. // Handler for the WM_INITDIALOG message.
  576. //
  577. // Arguments:
  578. // None.
  579. //
  580. // Return Value:
  581. // TRUE Focus needs to be set.
  582. // FALSE Focus already set.
  583. //
  584. //--
  585. /////////////////////////////////////////////////////////////////////////////
  586. BOOL CNewGroupOwnersPage::OnInitDialog(void)
  587. {
  588. // Add columns.
  589. try
  590. {
  591. NAddColumn(IDS_COLTEXT_NAME, COLI_WIDTH_NAME);
  592. } // try
  593. catch (CException * pe)
  594. {
  595. pe->ReportError();
  596. pe->Delete();
  597. } // catch: CException
  598. // Call the base class method.
  599. CListCtrlPairWizPage::OnInitDialog();
  600. return TRUE; // return TRUE unless you set the focus to a control
  601. // EXCEPTION: OCX Property Pages should return FALSE
  602. } //*** CNewGroupOwnersPage::OnInitDialog()
  603. /////////////////////////////////////////////////////////////////////////////
  604. //++
  605. //
  606. // CNewGroupOwnersPage::BApplyChanges
  607. //
  608. // Routine Description:
  609. // Apply changes made on the page.
  610. //
  611. // Arguments:
  612. // None.
  613. //
  614. // Return Value:
  615. // TRUE Page successfully applied.
  616. // FALSE Error applying page.
  617. //
  618. //--
  619. /////////////////////////////////////////////////////////////////////////////
  620. BOOL CNewGroupOwnersPage::BApplyChanges(void)
  621. {
  622. BOOL bSuccess;
  623. CWaitCursor wc;
  624. // Set the data from the page in the cluster item.
  625. try
  626. {
  627. PciGroup()->SetPreferredOwners((CNodeList &) Plcp()->LpobjRight());
  628. } // try
  629. catch (CException * pe)
  630. {
  631. pe->ReportError();
  632. pe->Delete();
  633. return FALSE;
  634. } // catch: CException
  635. bSuccess = CListCtrlPairWizPage::BApplyChanges();
  636. if (bSuccess)
  637. {
  638. POSITION pos;
  639. CClusterNode * pciNode;;
  640. // If the group is not owned by the first node in the preferred
  641. // owners list, move the group to the first node.
  642. pos = Plcp()->LpobjRight().GetHeadPosition();
  643. if (pos != NULL)
  644. {
  645. pciNode = (CClusterNode *) Plcp()->LpobjRight().GetNext(pos);
  646. if (pciNode->StrName() != PciGroup()->StrOwner())
  647. {
  648. try
  649. {
  650. PciGroup()->Move(pciNode);
  651. } // try
  652. catch (CException * pe)
  653. {
  654. pe->ReportError();
  655. pe->Delete();
  656. } // catch: CException
  657. } // if: not on first preferred owner node
  658. } // if: there is a preferred owner
  659. } // if: changes applied successfully
  660. return bSuccess;
  661. } //*** CNewGroupOwnersPage::BApplyChanges()
  662. /////////////////////////////////////////////////////////////////////////////
  663. //++
  664. //
  665. // CNewGroupOwnersPage::GetColumn [static]
  666. //
  667. // Routine Description:
  668. // Returns a column for an item.
  669. //
  670. // Arguments:
  671. // pobj [IN OUT] Object for which the column is to be displayed.
  672. // iItem [IN] Index of the item in the list.
  673. // icol [IN] Column number whose text is to be retrieved.
  674. // pdlg [IN OUT] Dialog to which object belongs.
  675. // rstr [OUT] String in which to return column text.
  676. // piimg [OUT] Image index for the object.
  677. //
  678. // Return Value:
  679. // None.
  680. //
  681. //--
  682. /////////////////////////////////////////////////////////////////////////////
  683. void CALLBACK CNewGroupOwnersPage::GetColumn(
  684. IN OUT CObject * pobj,
  685. IN int iItem,
  686. IN int icol,
  687. IN OUT CDialog * pdlg,
  688. OUT CString & rstr,
  689. OUT int * piimg
  690. )
  691. {
  692. CClusterNode * pciNode = (CClusterNode *) pobj;
  693. int colid;
  694. ASSERT_VALID(pciNode);
  695. ASSERT((0 <= icol) && (icol <= 1));
  696. switch (icol)
  697. {
  698. // Sorting by resource name.
  699. case 0:
  700. colid = IDS_COLTEXT_NAME;
  701. break;
  702. default:
  703. ASSERT(0);
  704. colid = IDS_COLTEXT_NAME;
  705. break;
  706. } // switch: pdlg->NSortColumn()
  707. pciNode->BGetColumnData(colid, rstr);
  708. if (piimg != NULL)
  709. *piimg = pciNode->IimgObjectType();
  710. } //*** CNewGroupOwnersPage::GetColumn()
  711. /////////////////////////////////////////////////////////////////////////////
  712. //++
  713. //
  714. // CNewGroupOwnersPage::BDisplayProperties [static]
  715. //
  716. // Routine Description:
  717. // Display the properties of the specified object.
  718. //
  719. // Arguments:
  720. // pobj [IN OUT] Cluster item whose properties are to be displayed.
  721. //
  722. // Return Value:
  723. // TRUE Properties where accepted.
  724. // FALSE Properties where cancelled.
  725. //
  726. //--
  727. /////////////////////////////////////////////////////////////////////////////
  728. BOOL CALLBACK CNewGroupOwnersPage::BDisplayProperties(IN OUT CObject * pobj)
  729. {
  730. CClusterItem * pci = (CClusterItem *) pobj;
  731. ASSERT_KINDOF(CClusterItem, pobj);
  732. return pci->BDisplayProperties();
  733. } //*** CNewGroupOwnersPage::BDisplayProperties();