CComBSTR::operator +=
Appends a string to the CComBSTR object.
CComBSTR& operator +=(
const CComBSTR& bstrSrc
);
CComBSTR& operator +=(
const LPCOLESTR pszSrc
);
Параметры
bstrSrc
[in] A CComBSTR object to append.pszSrc
[in] A zero-terminated string to append.
Заметки
CComBSTRs are compared textually in the context of the user's default locale. The LPCOLESTR comparison is done using memcmp on the raw data in each string. The LPCSTR comparison is carried out in the same way once a temporary Unicode copy of pszSrc has been created. The final comparison operator just compares the contained string against 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);
Требования
Header: atlcomcli.h