SMBADMIN.H

// ----------------------------------------------------------------------------- 
// SMBADMIN.h : header file
//
// Copyright (C) Microsoft Corp. 1986-1996. All Rights Reserved.
// -----------------------------------------------------------------------------

#ifndef _SMBADMIN_H_
#define _SMBADMIN_H_

#pragma message("Including " __FILE__)

// -----------------------------------------------------------------------------

#include "ExAdmin.h"
#include "Resource.h"
#include "EditExt.h"
#include "smbdata.h"

#define MAX_TOPIC_STRING 160

// -----------------------------------------------------------------------------

BOOL PASCAL bShowPage( UINT iddAdminPage);

// -----------------------------------------------------------------------------

class CSMBAdminDlg : public CAdminDialog
{
public:
// A default constructor is the only one we will need.
CSMBAdminDlg() : CAdminDialog( IDD_SMBADMIN, IDS_SMBADMIN, SMBBLOBNAME),
m_bRefresh( FALSE) {}

protected:
// Validate that a string is not empty and modify the extension data property
// in memory.
BOOL bIsValidString(
IN ULONG iProp, // Index of property
IN CEditExt& editCtrl); // Edit control containing data to validate.

// Validate that a ulong is within a specified range and modify the extension
// data property in memory.
BOOL bIsValidULong(
IN ULONG iProp, // Index of property
IN CEditExt& editCtrl, // Edit control containing data to validate.
IN ULONG ulLow,
IN ULONG ulHigh,
IN int idErrMsg);

// Called when a different property sheet has been selected or when either the
// OK or APPLY NOW button is pressed. Returns TRUE if data has been validated
// and saved.
//
// When we call the CAdminDialog::bSaveData() function it gets saved in an
// admin memory space. This makes it available to other property sheets that
// might be viewing the same data.
virtual BOOL bSaveData();

// Called when either the OK or APPLY NOW button is pressed and after bSaveData().
// Return TRUE if data has been committed.
virtual BOOL bCommitData();

// Called to determine if you supply help. Return TRUE if you do, defaults to FALSE.
virtual BOOL bHasHelp();

// Called to start help. Default does nothing.
virtual VOID DoHelp();

// Called when our property sheet is brought into focus to refresh data that
// may have been altered by other property sheets.
virtual void Refresh();

// This boolean is used to keep the apply button from being enabled when
// we are just repainting the data on the form.
BOOL m_bRefresh;

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// All of the controls in the dialog.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CEditExt m_editTopicRootFolderName;
CEditExt m_editTopicRootFolderComment;
CEditExt m_editPollInboxMSec;
CButton m_chkboxPublicTopicFolder;
CButton m_chkboxRead;
CButton m_chkboxWrite;
CButton m_chkboxCreate;
CButton m_chkboxDelete;
CButton m_chkboxOwner;
CButton m_chkboxContact;

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Class wizard stuff.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
public:
//{{AFX_DATA(CSMBAdminDlg)
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA

protected:
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSMBAdminDlg)
//}}AFX_VIRTUAL

// Generated message map functions
//{{AFX_MSG(CSMBAdminDlg)
afx_msg void OnEnChange();
afx_msg void OnBnClicked();
afx_msg void OnFolderBnClicked();
virtual BOOL OnInitDialog();
//}}AFX_MSG

DECLARE_MESSAGE_MAP()
};

// -----------------------------------------------------------------------------
#ifdef _GLOBAL_OBJECTS_
#pragma message("Declaration of global objects for: " __FILE__)

// Declare an instances of a CAdminDialog derived class.
CSMBAdminDlg SMBAdminDlg;

#endif //_GLOBAL_OBJECTS_
// -----------------------------------------------------------------------------

#endif // _SMBADMIN_H_