|
|
1.1 ! root 1: // This is a part of the Microsoft Foundation Classes C++ library. ! 2: // Copyright (C) 1992 Microsoft Corporation ! 3: // All rights reserved. ! 4: // ! 5: // This source code is only intended as a supplement to the ! 6: // Microsoft Foundation Classes Reference and Microsoft ! 7: // QuickHelp documentation provided with the library. ! 8: // See these sources for detailed information regarding the ! 9: // Microsoft Foundation Classes product. ! 10: ! 11: #include "afxwin.h" ! 12: #pragma hdrstop ! 13: ! 14: #ifdef AFX_CORE_SEG ! 15: #pragma code_seg(AFX_CORE_SEG) ! 16: #endif ! 17: ! 18: #ifdef _DEBUG ! 19: #undef THIS_FILE ! 20: static char BASED_CODE THIS_FILE[] = __FILE__; ! 21: #endif ! 22: ! 23: ///////////////////////////////////////////////////////////////////////////// ! 24: // Windows extensions to strings ! 25: ! 26: BOOL CString::LoadString(UINT nID) ! 27: { ! 28: // NOTE: will not work for strings > 255 characters ! 29: char szBuffer[256]; ! 30: UINT nSize; ! 31: if ((nSize = ::LoadString(AfxGetResourceHandle(), ! 32: nID, szBuffer, sizeof(szBuffer)-1)) == 0) ! 33: return FALSE; ! 34: AssignCopy(nSize, szBuffer); ! 35: return TRUE; ! 36: } ! 37: ! 38: void CString::AnsiToOem() ! 39: { ! 40: ::AnsiToOem(m_pchData, m_pchData); ! 41: } ! 42: ! 43: void CString::OemToAnsi() ! 44: { ! 45: ::OemToAnsi(m_pchData, m_pchData); ! 46: } ! 47: ! 48: /////////////////////////////////////////////////////////////////////////////
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.