How to use the Richedit control in ATL

xiaoxiao2021-03-06  148

http://community.9cbs.net/expert/topic/3266/3266330.xml?temp=5.662173e-02

#include

1. definition:

Cricheditctrl m_richedit; hmodule m_hrichedit;

2. Finalconstruct () M_Hrichedit = :: loadLibrary (cricheditctrl :: getLibraryName ());

3. FinalRelease () {:: freeElibrary (m_hrichedit);}

4. In oncreate

M_RichEdit.create (m_hwnd, rcdefault, null, ws_visible | ws_child | ws_vscroll | ES_MULTILINE | WS_EX_CLIENTEDGE | ES_READONLY, 0, IDC_RICHEDIT);

5. Set text M_RichEdit.SetWindowText ("sssssssssssssss");

转载请注明原文地址:https://www.9cbs.com/read-128067.html

New Post(0)