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 _________________________________________________________________
15 #include <afs/param.h>
24 * DEFINITIONS _________________________________________________________________
31 * PROTOTYPES _________________________________________________________________
34 static void OnInitDialog(HWND hwndDlg);
35 static void ConfigMsg(UINT nMsgID);
39 * EXPORTED FUNCTIONS _________________________________________________________________
44 * Dialog Proc _________________________________________________________________
47 BOOL CALLBACK FileServerPageDlgProc(HWND hwndDlg, UINT msg, WPARAM wp, LPARAM lp)
49 if (WizStep_Common_DlgProc (hwndDlg, msg, wp, lp))
54 OnInitDialog(hwndDlg);
60 g_pWiz->SetState(sidSTEP_SIX);
64 g_pWiz->SetState(sidSTEP_FOUR);
67 case IDC_DONT_CONFIG_FILE_SERVER:
68 g_CfgData.configFS = CS_DONT_CONFIGURE;
71 case IDC_SHOULD_CONFIG_FILE_SERVER:
72 g_CfgData.configFS = CS_CONFIGURE;
84 * STATIC FUNCTIONS _________________________________________________________________
89 * Event Handler Functions _________________________________________________________________
92 static void OnInitDialog(HWND hwndDlg)
96 g_pWiz->EnableButtons(BACK_BUTTON | NEXT_BUTTON);
97 g_pWiz->SetButtonText(IDNEXT, IDS_NEXT);
98 g_pWiz->SetDefaultControl(IDNEXT);
100 if (g_CfgData.bFirstServer) {
101 ConfigMsg(IDS_MUST_CONFIG_FS);
102 g_CfgData.configFS = CS_CONFIGURE;
106 switch (g_CfgData.configFS) {
107 case CS_ALREADY_CONFIGURED:
108 ConfigMsg(IDS_ALREADY_A_FS_SERVER);
111 case CS_DONT_CONFIGURE:
112 SetCheck(hDlg, IDC_DONT_CONFIG_FILE_SERVER);
117 SetCheck(hDlg, IDC_SHOULD_CONFIG_FILE_SERVER);
124 * Utility Functions _________________________________________________________________
127 static void ConfigMsg(UINT nMsgID)
129 TCHAR szMsg[cchRESOURCE];
131 GetString(szMsg, nMsgID);
133 // Hide the controls that are at the same position as the message
134 ShowWnd(hDlg, IDC_CREATE_FS_QUESTION, FALSE);
135 ShowWnd(hDlg, IDC_SHOULD_CONFIG_FILE_SERVER, FALSE);
136 ShowWnd(hDlg, IDC_DONT_CONFIG_FILE_SERVER, FALSE);
138 SetWndText(hDlg, IDC_MSG, szMsg);
139 ShowWnd(hDlg, IDC_MSG);