diff options
Diffstat (limited to 'libs/mTextControl')
-rw-r--r-- | libs/mTextControl/src/FormattedTextDraw.cpp | 10 | ||||
-rw-r--r-- | libs/mTextControl/src/FormattedTextDraw.h | 10 | ||||
-rw-r--r-- | libs/mTextControl/src/services.cpp | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/libs/mTextControl/src/FormattedTextDraw.cpp b/libs/mTextControl/src/FormattedTextDraw.cpp index eca1044a5c..04fa7f6042 100644 --- a/libs/mTextControl/src/FormattedTextDraw.cpp +++ b/libs/mTextControl/src/FormattedTextDraw.cpp @@ -35,12 +35,12 @@ DWORD CALLBACK EditStreamInCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, { COOKIE *pCookie = (COOKIE*)dwCookie; if (pCookie->isUnicode) { - if ((pCookie->cbSize - pCookie->cbCount)*sizeof(WCHAR) < (size_t)cb) - *pcb = LONG(pCookie->cbSize - pCookie->cbCount)*sizeof(WCHAR); + if ((pCookie->cbSize - pCookie->cbCount)*sizeof(wchar_t) < (size_t)cb) + *pcb = LONG(pCookie->cbSize - pCookie->cbCount)*sizeof(wchar_t); else *pcb = cb & ~1UL; memcpy(pbBuff, pCookie->unicode + pCookie->cbCount, *pcb); - pCookie->cbCount += *pcb / sizeof(WCHAR); + pCookie->cbCount += *pcb / sizeof(wchar_t); } else { if (pCookie->cbSize - pCookie->cbCount < (DWORD)cb) @@ -77,7 +77,7 @@ HRESULT CFormattedTextDraw::putRTFTextA(char *newVal) return S_OK; } -HRESULT CFormattedTextDraw::putRTFTextW(WCHAR *newVal) +HRESULT CFormattedTextDraw::putRTFTextW(wchar_t *newVal) { if (!m_spTextServices) return S_FALSE; @@ -126,7 +126,7 @@ HRESULT CFormattedTextDraw::putTextA(char *newVal) return S_OK; } -HRESULT CFormattedTextDraw::putTextW(WCHAR *newVal) +HRESULT CFormattedTextDraw::putTextW(wchar_t *newVal) { if (!m_spTextServices) return S_FALSE; diff --git a/libs/mTextControl/src/FormattedTextDraw.h b/libs/mTextControl/src/FormattedTextDraw.h index a5128f48a2..27ac6c8810 100644 --- a/libs/mTextControl/src/FormattedTextDraw.h +++ b/libs/mTextControl/src/FormattedTextDraw.h @@ -17,7 +17,7 @@ struct COOKIE union { char *ansi; - WCHAR *unicode; + wchar_t *unicode; }; size_t cbSize, cbCount; }; @@ -32,9 +32,9 @@ public: virtual HRESULT Create() = 0; virtual HRESULT Draw(void *hdcDraw, RECT *prc) = 0; virtual HRESULT putRTFTextA(char *newVal) = 0; - virtual HRESULT putRTFTextW(WCHAR *newVal) = 0; + virtual HRESULT putRTFTextW(wchar_t *newVal) = 0; virtual HRESULT putTextA(char *newVal) = 0; - virtual HRESULT putTextW(WCHAR *newVal) = 0; + virtual HRESULT putTextW(wchar_t *newVal) = 0; virtual ITextServices *getTextService() = 0; virtual ITextDocument *getTextDocument() = 0; @@ -111,9 +111,9 @@ public: HRESULT Create(); HRESULT Draw(void *hdcDraw, RECT *prc); HRESULT putRTFTextA(char *newVal); - HRESULT putRTFTextW(WCHAR *newVal); + HRESULT putRTFTextW(wchar_t *newVal); HRESULT putTextA(char *newVal); - HRESULT putTextW(WCHAR *newVal); + HRESULT putTextW(wchar_t *newVal); ITextServices *getTextService() { return m_spTextServices; }; ITextDocument *getTextDocument() { return m_spTextDocument; }; diff --git a/libs/mTextControl/src/services.cpp b/libs/mTextControl/src/services.cpp index 048194f067..b27b667180 100644 --- a/libs/mTextControl/src/services.cpp +++ b/libs/mTextControl/src/services.cpp @@ -72,7 +72,7 @@ MTEXTCONTROL_DLL(HANDLE) MTextCreateW(HANDLE userHandle, const char *szProto, co InitRichEdit(result->ftd->getTextService()); MText_InitFormatting0(result->ftd, result->options); - result->ftd->putTextW((WCHAR*)text); + result->ftd->putTextW((wchar_t*)text); MText_InitFormatting1(result); return (HANDLE)result; @@ -91,7 +91,7 @@ MTEXTCONTROL_DLL(HANDLE) MTextCreateEx(HANDLE userHandle, void *text, DWORD flag MText_InitFormatting0(result->ftd, result->options); if (flags & MTEXT_FLG_WCHAR) - result->ftd->putTextW((WCHAR *)text); + result->ftd->putTextW((wchar_t *)text); else result->ftd->putTextA((char *)text); MText_InitFormatting1(result); |