다음을 통해 공유


CComBSTR::operator +=

문자열을 추가 하는 CComBSTR 개체입니다.

CComBSTR& operator +=( 
   const CComBSTR& bstrSrc  
); 
CComBSTR& operator +=( 
   const LPCOLESTR pszSrc  
);

매개 변수

  • bstrSrc
    [in] A CComBSTR 개체를 추가 합니다.

  • pszSrc
    [in] 추가 0으로 끝나는 문자열입니다.

설명

CComBSTRs 기본 로캘의 사용자의 컨텍스트에서 순서상 비교 됩니다. LPCOLESTR 비교 작업 사용 하 여 memcmp 의 원시 데이터를 각 문자열. LPCSTR 비교 이루어지므로에 임시를 유니코드의 복사 후 pszSrc 만들었습니다. 최종 비교 연산자는 포함 된 문자열을 바로 비교 NULL.

예제

CComBSTR bstrPre(OLESTR("Hello "));
CComBSTR bstrSuf(OLESTR("World!"));

// Appends "World!" to "Hello "
bstrPre += bstrSuf;

// Displays a message box with text "Hello World!"
::MessageBox(NULL, CW2CT(bstrPre), NULL, MB_OK);   

요구 사항

헤더: atlbase.h

참고 항목

참조

CComBSTR 클래스

CComBSTR::Append

CComBSTR::AppendBSTR

개념

ATL and MFC String Conversion Macros