Posts

Showing posts with the label win32gui

C++ WIN32 - Load RTF Data to Rich Edit Control

Image
Clash Royale CLAN TAG #URR8PPP C++ WIN32 - Load RTF Data to Rich Edit Control I try to load text (formatting in 'RTF') to my rich text control but it doesn't work. I've even tried to use 'WriteFile((HANDLE)dwCookie, myBuff, cb, (DWORD*)pcb, NULL)' instead of ' pcb = rtf->readsome((char )pbBuff, cb);' void CreateRichEdit(HWND hwndOwner, int x, int y, int width, int height, HINSTANCE hinst) { LoadLibrary(TEXT("Msftedit.dll")); edittext = CreateWindowEx(0, TEXT("RICHEDIT50W"), TEXT("Type here"), ES_MULTILINE | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_TABSTOP | ES_AUTOVSCROLL | WS_VSCROLL, x, y, width, height, hwndOwner, NULL, hinst, 0); std::string teext = "{rtf1ansi{fonttbl{ f0fnilfcharset0fprq0fttruetype Helvetica; }{f1fnilfcharset0fprq0fttruetype Bitstream Charter; }}{f1fs24 Ceci est un texte accentu'e9}par{ f0fs24 avec des caract'e8res {b gras},}par{ f1 des{ fs18 petits } et des{ fs32 gros }. }...