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.

111 lines
3.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // File: main.h
  4. //
  5. // Description: Declares all the functions within the individual
  6. // files.
  7. //
  8. // Copyright (c) 2000 Microsoft Corp.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. #ifndef _MAIN_H_
  12. #define _MAIN_H_
  13. #define DEFAULT_INSTALL_PATH _T("MSProjector")
  14. #define REG_KEY_PROJECTOR _T("Software\\Microsoft\\MSProjector")
  15. #define REG_VAL_IMAGE_DIR _T("ImagesDirectory")
  16. #define REG_VAL_DEVICE_DIR _T("DeviceDirectory")
  17. #define REG_VAL_ALLOW_KEY_CONTROL _T("AllowKeyboardControl")
  18. #define REG_VAL_SHOW_IMAGEURL _T("ShowImageUrl")
  19. #define MSPRJCTR_TASKBAR_ID 100
  20. #define MIN_IMAGE_FREQ_IN_SEC 6
  21. #define MAX_IMAGE_FREQ_IN_SEC 3 * 60
  22. #define MIN_IMAGE_SCALE_FACTOR 25
  23. #define MAX_IMAGE_SCALE_FACTOR 100
  24. // CfgDlg Functions
  25. namespace CfgDlg
  26. {
  27. HRESULT Init(HINSTANCE hInstance);
  28. HRESULT Term();
  29. HWND Create(int nCmdShow);
  30. }
  31. // Tray Functions
  32. namespace Tray
  33. {
  34. HRESULT Init(HINSTANCE hInstance,
  35. HWND hwndDlg,
  36. UINT uiWindowsUserMsgId);
  37. HRESULT Term(HWND hwndDlg);
  38. HRESULT PopupMenu(HWND hwndOwner);
  39. }
  40. // Util Functions
  41. namespace Util
  42. {
  43. HRESULT Init(HINSTANCE hInstance);
  44. HRESULT Term(void);
  45. HRESULT GetAppDirs(TCHAR *pszDeviceDir,
  46. DWORD cchDeviceDir,
  47. TCHAR *pszImageDir,
  48. DWORD cchImageDir);
  49. HRESULT GetRegString(const TCHAR *pszValueName,
  50. TCHAR *pszDir,
  51. DWORD cchDir,
  52. BOOL bSetIfNotExist);
  53. HRESULT SetRegString(const TCHAR *pszValueName,
  54. TCHAR *pszDir,
  55. DWORD cchDir);
  56. HRESULT GetRegDWORD(const TCHAR *pszValueName,
  57. DWORD *pdwValue,
  58. BOOL bSetIfNotExist);
  59. HRESULT SetRegDWORD(const TCHAR *pszValueName,
  60. DWORD dwValue);
  61. bool BrowseForDirectory(HWND hWnd,
  62. const TCHAR *pszPrompt,
  63. TCHAR *pszDirectory,
  64. DWORD cchDirectory);
  65. HRESULT FormatTime(HINSTANCE hInstance,
  66. UINT nTotalSeconds,
  67. TCHAR *pszTime,
  68. DWORD cchTime);
  69. HRESULT FormatScale(HINSTANCE hInstance,
  70. DWORD dwImageScaleFactor,
  71. TCHAR *pszScale,
  72. DWORD cchScale);
  73. BOOL DoesDirExist(LPCTSTR pszPath);
  74. BOOL GetString(HINSTANCE hInstance,
  75. INT iStrResID,
  76. TCHAR *pszString,
  77. DWORD cchString,
  78. ...);
  79. HRESULT GetMyPicturesFolder(TCHAR *pszFolder,
  80. DWORD cchFolder);
  81. HRESULT GetProgramFilesFolder(TCHAR *pszFolder,
  82. DWORD cchFolder);
  83. }
  84. #endif //_MAIN_H_