Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.7 KiB

  1. /****************************************************************************
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name: cplprecomp.h
  4. Author: toddb - 10/06/98
  5. ****************************************************************************/
  6. #pragma once
  7. #define TAPI_CURRENT_VERSION 0x00030000
  8. #include <windows.h>
  9. #include <shlwapi.h>
  10. #include <shlwapip.h>
  11. #include <cpl.h>
  12. #include <prsht.h>
  13. #include <commctrl.h>
  14. #include <comctrlp.h>
  15. #include "cplResource.h"
  16. #include "HelpArray.h"
  17. // TAPI class definitions
  18. #include "tapi.h"
  19. #include "tspi.h"
  20. #include "utils.h"
  21. #include "card.h"
  22. #include "rules.h"
  23. #include "location.h"
  24. // for TapiIsSafeToDisplaySensitiveData
  25. #include "tregupr2.h"
  26. typedef struct tagPSPINFO
  27. {
  28. int iDlgID;
  29. DLGPROC pfnDlgProc;
  30. } PSPINFO;
  31. // we limit all input strings to 128 characters. This includes phone numbers, area codes, pin numbers,
  32. // access numbers, any type of input field. This was chosen simply for versatility and simplicity.
  33. #define MAX_INPUT 128
  34. #define CPL_SETTEXTLIMIT (MAX_INPUT-1)
  35. #define LIF_ALLOWALPHA 0x00000001 // a-z, A-Z
  36. #define LIF_ALLOWNUMBER 0x00000002 // 0-9
  37. #define LIF_ALLOWDASH 0x00000004 // "-", "(", and ")"
  38. #define LIF_ALLOWPOUND 0x00000008 // "#"
  39. #define LIF_ALLOWSTAR 0x00000010 // "*"
  40. #define LIF_ALLOWSPACE 0x00000020 // " "
  41. #define LIF_ALLOWCOMMA 0x00000040 // ","
  42. #define LIF_ALLOWPLUS 0x00000080 // "+"
  43. #define LIF_ALLOWBANG 0x00000100 // "!"
  44. #define LIF_ALLOWATOD 0x00000200 // a-d, A-D
  45. BOOL LimitInput(HWND hwnd, DWORD dwFalgs); // edit (or whatever) control version
  46. BOOL LimitCBInput(HWND hwnd, DWORD dwFlags); // ComboBox version
  47. void HideToolTip(); // called to ensure that any visable LimitInput tooltip is hidden
  48. void ShowErrorMessage(HWND hwnd, int iErr); // beeps, displays a message box with an error string, and set focus to the given window
  49. HINSTANCE GetUIInstance(); // returns a handle to the UI module
  50. HRESULT CreateCountryObject(DWORD dwCountryID, CCountry **ppCountry);
  51. // return values for IsCityRule
  52. #define CITY_MANDATORY (1)
  53. #define CITY_OPTIONAL (-1)
  54. #define CITY_NONE (0)
  55. int IsCityRule(PWSTR lpRule); // sees if an area code is required
  56. BOOL IsEmptyOrHasOnlySpaces(PTSTR); // sees if a string is empty or has only spaces
  57. BOOL HasOnlyCommasW(PWSTR); // sees if a string has only commas
  58. BOOL IsLongDistanceCarrierCodeRule(LPWSTR lpRule);
  59. BOOL IsInternationalCarrierCodeRule(LPWSTR lpRule);
  60. // PopulateCountryList
  61. //
  62. // Used to fill a combo box with the list of available countries. The item
  63. // data for each item will countain the countries ID (not a CCountry object pointer)
  64. BOOL PopulateCountryList(HWND hwndCombo, DWORD dwSelectedCountry);
  65. // DeleteItemAndSelectPrevious
  66. //
  67. // In all of our list boxes we have to worry about deleting the selected item and then moving the
  68. // selection to the previous item in the list. This usually happens in response to pressing a
  69. // delete button, which often causes that delete button to become disabled, so we also have to
  70. // worry about moving focus away from the delete button and onto a good default location.
  71. //
  72. // Deletes iItem from listbox iList in dialog hwndParent. If the listbox becomes empty it moves
  73. // focus to iAdd if iDel currently has the focus.
  74. int DeleteItemAndSelectPrevious( HWND hwndParent, int iList, int iItem, int iDel, int iAdd );
  75. #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  76. extern TCHAR gszHelpFile[];