How to get text with RTF format from Rich Edit Win API?
问题 (Sorry for my crazy English) I want to get all the text in Rich Edit with RTF format, not plain text to a variable. I tried SendMessage() with EM_STREAMOUT to write directly Rich Edit to file, but I can't save the content to specific variables, for example LPWSTR. Please remember, only Win API, not MFC. Thanks for you help! 回答1: You can pass your variable to the EM_STREAMOUT callback so it can be updated as needed, eg: DWORD CALLBACK EditStreamOutCallback(DWORD_PTR dwCookie, LPBYTE pbBuff,