2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * INCLUDES _________________________________________________________________
18 #include <afs/param.h>
27 * DEFINITIONS _________________________________________________________________
34 * PROTOTYPES _________________________________________________________________
37 static void OnInitDialog(HWND hwndDlg);
38 static void ConfigMsg(UINT nMsgID);
42 * EXPORTED FUNCTIONS _________________________________________________________________
47 * Dialog Proc _________________________________________________________________
50 BOOL CALLBACK FileServerPageDlgProc(HWND hwndDlg, UINT msg, WPARAM wp, LPARAM lp)
52 if (WizStep_Common_DlgProc (hwndDlg, msg, wp, lp))
57 OnInitDialog(hwndDlg);
63 g_pWiz->SetState(sidSTEP_SIX);
67 g_pWiz->SetState(sidSTEP_FOUR);
70 case IDC_DONT_CONFIG_FILE_SERVER:
71 g_CfgData.configFS = CS_DONT_CONFIGURE;
74 case IDC_SHOULD_CONFIG_FILE_SERVER:
75 g_CfgData.configFS = CS_CONFIGURE;
87 * STATIC FUNCTIONS _________________________________________________________________
92 * Event Handler Functions _________________________________________________________________
95 static void OnInitDialog(HWND hwndDlg)
99 g_pWiz->EnableButtons(BACK_BUTTON | NEXT_BUTTON);
100 g_pWiz->SetButtonText(IDNEXT, IDS_NEXT);
101 g_pWiz->SetDefaultControl(IDNEXT);
103 if (g_CfgData.bFirstServer) {
104 ConfigMsg(IDS_MUST_CONFIG_FS);
105 g_CfgData.configFS = CS_CONFIGURE;
109 switch (g_CfgData.configFS) {
110 case CS_ALREADY_CONFIGURED:
111 ConfigMsg(IDS_ALREADY_A_FS_SERVER);
114 case CS_DONT_CONFIGURE:
115 SetCheck(hDlg, IDC_DONT_CONFIG_FILE_SERVER);
120 SetCheck(hDlg, IDC_SHOULD_CONFIG_FILE_SERVER);
127 * Utility Functions _________________________________________________________________
130 static void ConfigMsg(UINT nMsgID)
132 TCHAR szMsg[cchRESOURCE];
134 GetString(szMsg, nMsgID);
136 // Hide the controls that are at the same position as the message
137 ShowWnd(hDlg, IDC_CREATE_FS_QUESTION, FALSE);
138 ShowWnd(hDlg, IDC_SHOULD_CONFIG_FILE_SERVER, FALSE);
139 ShowWnd(hDlg, IDC_DONT_CONFIG_FILE_SERVER, FALSE);
141 SetWndText(hDlg, IDC_MSG, szMsg);
142 ShowWnd(hDlg, IDC_MSG);