/**********************************************************************/ /** Microsoft LAN Manager **/ /** Copyright(c) Microsoft Corp., 1991 **/ /**********************************************************************/ /* account.cdd Account information subproperty dialog CDD for single, new and multiple users. This file explains how account information subproperty dialog (AI) handles user information in user tool. How it is displayed to the user is explained in NT Windows User Manager 8.4 (single and new) and 8.5 (multiple users). FILE HISTORY: o-SimoP 26-Aug-91 Created */ When creating ACCOUNT_DLG object you provide at least three parameters this, _apuser2 (pointer to array of pointers to USER_2 obj) and _apumemb (pointer to array of pointers to USER_MEMB obj). ACCOUNT_DLG accdlg( this, _apuser2, _apumemb ); APIERR err = accdlg.GetInfo(); if( err == NERR_Success ) { err = accdlg.Process() ... } else ... GetInfo is a second stage constructor. It calls n times (n is the number of selected users) virtual method GetOne() and if we return allways NERR_Success it will call virtual method InitControls(). These methods are inherited from BASEPROP_DLG. In GetOne we keep track of user account information that is to be displayed in the AI dialog, for example privilege level information. And when InitControls() is called we know how to set AI dialog box controls. Account Expires magic group's member 'End of' is DATE_SPIN_GROUP and its default value is current date + one month. We get month/day/year information from TIME object. When the user pushes OK we call PerformSeries(), it calls n times virtual method PerformOne(). These methods are inherited from PERFORMER. In PerformOne() we clone a new USER_2 object from existing one (_apuser2[n]) and if there is a change in privilege information we also clone USER_MEMB (_apumemb) and do the changes to those objects. Then we perform USER_2:: WriteInfo() and if it is successfull we replace old objects with the new (cloned) ones. In the case of new user we don't call WriteInfo() and we use existing objects. The inheritance diagram is as follows: ... | DIALOG_WINDOW PERFORMER \ / BASEPROP_DLG / SUBPROP_DLG | USER_SUBPROP_DLG | ACCOUNT_DLG