rx: Remove RX_CALL_BUSY
[openafs.git] / src / WINNT / afssvrcfg / toolbox.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
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
8  */
9
10 #ifndef _TOOLBOX_H_
11 #define _TOOLBOX_H_
12
13 enum ENABLE_STATE { ES_DISABLE, ES_ENABLE, ES_TOGGLE };
14
15 void SetEnable(HWND hDlg, UINT nControl, ENABLE_STATE eState = ES_ENABLE);
16
17 void SetElapsedTime(HWND hwnd, DWORD nCtrlID, ULONG ulMin, ULONG ulMax, ULONG ulTime);
18 void GetElapsedTime(HWND hwnd, DWORD nCtrlID, DWORD& dwTime);
19 LPCTSTR SecondsToElapsedTime(UINT uiNumSeconds);
20
21 void ShowWnd(HWND hDlg, UINT uiCtrlID, BOOL bShow = TRUE);
22 void EnableWnd(HWND hDlg, UINT uiCtrlID, BOOL bEnable = TRUE);
23 void HideAndDisable(HWND hDlg, UINT uiCtrlID);
24 void ShowAndEnable(HWND hDlg, UINT uiCtrlID, BOOL bShowAndEnable = TRUE);
25 void MoveWnd(HWND hDlg, UINT nCtrlID, int xOffset, int yOffset);
26
27 void SetWndText(HWND hDlg, UINT uiCtrlID, LPCTSTR pszMsg);
28 void SetWndText(HWND hDlg, UINT uiCtrlID, UINT uiMsgID);
29 TCHAR *GetWndText(HWND hDlg, UINT uiCtrlID, TCHAR *pszTextBuffer, int nTextLen = cchRESOURCE);
30 inline int GetWndTextLength(HWND hDlg, UINT uiCtrlID)   { return GetWindowTextLength(GetDlgItem(hDlg, uiCtrlID)); }
31
32 void ForceUpdateWindow(HWND hWnd);
33 void ForceUpdateWindow(HWND hDlg, UINT uiCtrlID);
34
35 void SetCheck(HWND hDlg, UINT uiCtrlID, BOOL bChecked = TRUE);
36 BOOL IsButtonChecked(HWND hDlg, UINT uiCtrlID);
37 int GetButtonState(HWND hDlg, UINT uiCtrlID);
38
39 int AddLBString(HWND hDlg, UINT uiCtrlID, LPCTSTR pszString);
40 int ClearListBox(HWND hDlg, UINT uiCtrlID);
41
42 TCHAR *GetResString(UINT nMsgID, TCHAR *pszMsg, UINT nLen = cchRESOURCE);
43
44 void ShowWnd(HWND hDlg, UINT uiCtrlID, BOOL bShow);
45
46 void SetUpDownRange(HWND hDlg, UINT uiCtrlID, int nMinVal, int nMaxVal);
47
48 void MakeBold(HWND hWnd);
49 inline void MakeBold(HWND hDlg, UINT uiCtrlID)          { MakeBold(GetDlgItem(hDlg, uiCtrlID)); }
50
51 int MsgBox(HWND hParent, UINT uiTextID, UINT uiCaptionID, UINT uiType);
52
53
54 #endif  // _TOOLBOX_H_
55