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.

50 lines
1.6 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : Helper.cpp //
  3. // //
  4. // DESCRIPTION : Some helper functions. //
  5. // //
  6. // AUTHOR : yossg //
  7. // //
  8. // HISTORY : //
  9. // Oct 27 1999 yossg move to Fax //
  10. // //
  11. // Copyright (C) 1998 Microsoft Corporation All Rights Reserved //
  12. /////////////////////////////////////////////////////////////////////////////
  13. #include "StdAfx.h"
  14. int
  15. DlgMsgBox(CWindow *pWin, int ids, UINT nType/*=MB_OK*/)
  16. {
  17. CComBSTR bstrTitle;
  18. WCHAR szText[256];
  19. int rc;
  20. //
  21. // Load the string
  22. //
  23. rc = ::LoadString(_Module.GetResourceInstance(), ids, szText, 256);
  24. if (rc <= 0)
  25. {
  26. return E_FAIL;
  27. }
  28. //
  29. // Get the window text, to be set as the message box title
  30. //
  31. pWin->GetWindowText(bstrTitle.m_str);
  32. //
  33. // Show the message box
  34. //
  35. if(IsRTLUILanguage())
  36. {
  37. nType |= MB_RTLREADING | MB_RIGHT;
  38. }
  39. rc = pWin->MessageBox(szText, bstrTitle, nType);
  40. return rc;
  41. }