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.

65 lines
2.0 KiB

  1. //////////////////////////////////////////////////////////////////////////
  2. //
  3. // CMPMSG.H
  4. //
  5. // Owner: HenryB
  6. // Created: Dec 9, 1991
  7. // Revision:
  8. //
  9. //////////////////////////////////////////////////////////////////////////
  10. //
  11. // Composer Message Box routines
  12. //
  13. #define CMPNOSTRING (WORD)(-1) // empty/no string
  14. // CmpCenterParent retrieves a window to which a modal dialog should
  15. // be centered (relative center).
  16. //
  17. // NOTE: The return value may be temporary!
  18. //
  19. CWnd* CmpCenterParent();
  20. //
  21. // composer message box, same interface as windows, but you give
  22. // string id's not strings
  23. //
  24. // example: CmpMessageBox( IDS_OUTOFMEMORY, IDS_ERROR, MB_OK );
  25. //
  26. int CmpMessageBox( WORD wTextStringID, // string id of text
  27. WORD wCaptionID, // string id of caption
  28. UINT nType ); // same as message box
  29. //
  30. // composer message box wrapper for parameterized strings
  31. //
  32. // example: CmpMessageBox2( IDS_NOCONVERT, IDS_ERROR, MB_OK, lpszFrom, lpszInto );
  33. //
  34. int CmpMessageBox2( WORD wTextStringID, // string id of text
  35. WORD wCaptionID, // string id of caption
  36. UINT nType, // same as message box
  37. LPCTSTR szParam1, // string for %1 param
  38. LPCTSTR szParam2 ); // string for %2 param
  39. //
  40. // composer message box, combines wsprintf, you continue to
  41. // use string ids
  42. //
  43. // example:
  44. //
  45. // CmpMessageBoxPrintf( IDS_CANTOPEN, IDS_ERROR, MB_OK, lpszFileName );
  46. //
  47. extern "C" int CDECL
  48. CmpMessageBoxPrintf(WORD wTextStrinID, // string id of text (format)
  49. WORD wCaptionID, // string id of caption
  50. UINT nType, // same as message box
  51. ... ); // wsprintf arguments
  52. int CmpMessageBoxString( CString& s,
  53. WORD wCaptionID,
  54. UINT nType );