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
2.8 KiB

  1. /* Copyright (c) 1995, Microsoft Corporation, all rights reserved
  2. **
  3. ** popupdlg.h
  4. ** UI helper library
  5. ** Error and message dialog public header
  6. **
  7. ** 08/25/95 Steve Cobb
  8. */
  9. #ifndef _POPUPDLG_H_
  10. #define _POPUPDLG_H_
  11. /*----------------------------------------------------------------------------
  12. ** Datatypes
  13. **----------------------------------------------------------------------------
  14. */
  15. /* Extended arguments for the ErrorDlgUtil routine. Designed so zeroed gives
  16. ** default behaviors.
  17. */
  18. #define ERRORARGS struct tagERRORARGS
  19. ERRORARGS
  20. {
  21. /* Insertion strings for arguments %1 to %9 in the 'dwOperation' string,
  22. ** or NULLs if none.
  23. */
  24. TCHAR* apszOpArgs[ 9 ];
  25. /* Insertion strings for auxillary arguments %4 to %6 in the 'dwFormat'
  26. ** string, or NULLs if none. (The standard arguments are %1=the
  27. ** 'dwOperation' string, %2=the decimal error number, and %3=the
  28. ** 'dwError'string.)
  29. */
  30. TCHAR* apszAuxFmtArgs[ 3 ];
  31. /* If 'fStringOutput' is true, the ErrorDlgUtil returns the formatted text
  32. ** string that would otherwise be displayed in the popup in 'pszOutput'.
  33. ** It is caller's responsibility to LocalFree the returned string.
  34. */
  35. BOOL fStringOutput;
  36. TCHAR* pszOutput;
  37. };
  38. /* Extended arguments for the MsgDlgUtil routine. Designed so zeroed gives
  39. ** default behaviors.
  40. */
  41. #define MSGARGS struct tagMSGARGS
  42. MSGARGS
  43. {
  44. /* Insertion strings for arguments %1 to %9 in the 'dwMsg' string, or
  45. ** NULLs if none.
  46. */
  47. TCHAR* apszArgs[ 9 ];
  48. /* Currently, as for MessageBox, where defaults if 0 are MB_OK and
  49. ** MB_ICONINFORMATION.
  50. */
  51. DWORD dwFlags;
  52. /* If non-NULL, specifies a string overriding the loading of the 'dwMsg'
  53. ** parameter string.
  54. */
  55. TCHAR* pszString;
  56. /* If 'fStringOutput' is true, the MsgDlgUtil returns the formatted text
  57. ** string that would otherwise be displayed in the popup in 'pszOutput'.
  58. ** It is caller's responsibility to LocalFree the returned string.
  59. */
  60. BOOL fStringOutput;
  61. TCHAR* pszOutput;
  62. };
  63. /*----------------------------------------------------------------------------
  64. ** Prototypes
  65. **----------------------------------------------------------------------------
  66. */
  67. LRESULT CALLBACK
  68. CenterDlgOnOwnerCallWndProc(
  69. int code,
  70. WPARAM wparam,
  71. LPARAM lparam );
  72. BOOL
  73. GetErrorText(
  74. DWORD dwError,
  75. TCHAR** ppszError );
  76. int
  77. ErrorDlgUtil(
  78. IN HWND hwndOwner,
  79. IN DWORD dwOperation,
  80. IN DWORD dwError,
  81. IN OUT ERRORARGS* pargs,
  82. IN HINSTANCE hInstance,
  83. IN DWORD dwTitle,
  84. IN DWORD dwFormat );
  85. int
  86. MsgDlgUtil(
  87. IN HWND hwndOwner,
  88. IN DWORD dwMsg,
  89. IN OUT MSGARGS* pargs,
  90. IN HINSTANCE hInstance,
  91. IN DWORD dwTitle );
  92. #endif // _POPUPDLG_H_