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.

29 lines
507 B

  1. #include "precomp.h"
  2. #pragma hdrstop
  3. #include "stdstring.h"
  4. using namespace std;
  5. extern HINSTANCE g_hInstance;
  6. int CStdString::LoadString(UINT uID)
  7. {
  8. ATLASSERT(uID);
  9. CHAR szBuff[1024];
  10. int iLen;
  11. iLen = ::LoadStringA(g_hInstance, uID, szBuff, 1024);
  12. if(iLen)
  13. {
  14. *this = szBuff;
  15. }
  16. else
  17. {
  18. ATLASSERT(FALSE); //Test should catch this if there is an international string longer than 1024 chars. (not likely)
  19. *this = "";
  20. }
  21. return iLen;
  22. }