Leaked source code of windows server 2003
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.

84 lines
4.0 KiB

  1. /****************************************************************************
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name: cpllocationps.h
  4. Author: toddb - 10/06/98
  5. ****************************************************************************/
  6. #pragma once
  7. #include "cplAreaCodeDlg.h"
  8. #include "cplCallingCardPS.h"
  9. void UpdateSampleString(HWND hwnd, CLocation * pLoc, PCWSTR pwszAddress, CCallingCard * pCard);
  10. class CLocationPropSheet
  11. {
  12. public:
  13. CLocationPropSheet(BOOL bNew, CLocation * pLoc, CLocations * pLocList, LPCWSTR pwszAdd);
  14. ~CLocationPropSheet();
  15. #ifdef TRACELOG
  16. DECLARE_TRACELOG_CLASS(CLocationPropSheet)
  17. #endif
  18. LONG DoPropSheet(HWND hwndParent);
  19. protected:
  20. BOOL OnNotify(HWND hwndDlg, LPNMHDR pnmhdr);
  21. static INT_PTR CALLBACK General_DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  22. BOOL General_OnInitDialog(HWND hwndDlg);
  23. BOOL General_OnCommand(HWND hwndParent, int wID, int wNotifyCode, HWND hwndCtl);
  24. BOOL General_OnNotify(HWND hwndDlg, LPNMHDR pnmhdr);
  25. BOOL General_OnApply(HWND hwndDlg);
  26. BOOL PopulateDisableCallWaitingCodes(HWND hwndCombo, LPTSTR szSelected);
  27. static INT_PTR CALLBACK AreaCode_DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  28. BOOL AreaCode_OnInitDialog(HWND hwndDlg);
  29. BOOL AreaCode_OnCommand(HWND hwndParent, int wID, int wNotifyCode, HWND hwndCrl);
  30. BOOL AreaCode_OnNotify(HWND hwndDlg, LPNMHDR pnmhdr);
  31. void PopulateAreaCodeRuleList(HWND hwndList);
  32. void LaunchNewRuleDialog(BOOL bNew, HWND hwndParent);
  33. void DeleteSelectedRule(HWND hwndList);
  34. void AddRuleToList(HWND hwndList, CAreaCodeRule * pRule, BOOL bSelect);
  35. void RemoveRuleFromList(HWND hwndList, BOOL bSelect);
  36. void SetDataForSelectedRule(HWND hDlg);
  37. static INT_PTR CALLBACK CallingCard_DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  38. BOOL CallingCard_OnInitDialog(HWND hwndDlg);
  39. BOOL CallingCard_OnCommand(HWND hwndParent, int wID, int wNotifyCode, HWND hwndCrl);
  40. BOOL CallingCard_OnNotify(HWND hwndDlg, LPNMHDR pnmhdr);
  41. BOOL CallingCard_OnApply(HWND hwndDlg);
  42. void PopulateCardList(HWND hwndList);
  43. void LaunchCallingCardPropSheet(BOOL bNew, HWND hwndParent);
  44. void DeleteSelectedCard(HWND hwndList);
  45. void AddCardToList(HWND hwndList, CCallingCard * pCard, BOOL bSelect);
  46. void UpdateCardInList(HWND hwndList, CCallingCard * pCard);
  47. void SetDataForSelectedCard(HWND hDlg);
  48. void SetCheck(HWND hwndList, CCallingCard * pCard, int iImage);
  49. void EnsureVisible(HWND hwndList, CCallingCard * pCard);
  50. BOOL m_bWasApplied; // Set to true if we are applied, false if we are canceled
  51. BOOL m_bNew; // True if this is a new location, false if we're editing an existing one
  52. BOOL m_bShowPIN; // True if it's safe to show the PIN
  53. CLocation * m_pLoc; // pointer to the location object to use.
  54. CLocations* m_pLocList; // pointer to the list of all locations, need to ensure a unique name
  55. PCWSTR m_pwszAddress;
  56. // These tapi objects need to live for the life of the property sheet or we will AV.
  57. CCallingCards m_Cards; // Needed for the "Calling Card" page.
  58. // These pointers point into the above TAPI objects
  59. CAreaCodeRule * m_pRule;
  60. CCallingCard * m_pCard;
  61. DWORD m_dwDefaultCard;
  62. DWORD m_dwCountryID; // the selected countries ID
  63. int m_iCityRule; // We cache the result of calling IsCityRule on the currently selected country
  64. int m_iLongDistanceCarrierCodeRule; //We cache the result of calling isLongDistanceCarrierCodeRule
  65. int m_iInternationalCarrierCodeRule; //We cache the result of calling isInternationalCarrierCodeRule
  66. };