how to set a bitmap as the background of ricdedit control?
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
A part of my program use rich edit control,now I want to set a bitmap as the background of richedit control,how to implemente it? hiall
implement in rich edit control's perant message - WM_CTRLCOLOR... CWnd::OnCtrlColor this func returns HBRUSH parameturs ... One from parameters of OnCtrlColor is nCtrlColor when it is equal to COLOR_EDIT and COLOR_MSG you must creat your own brush (which must not be local varible) and in this new brush draw the image (CDC::bitblt(...)) ... in the end return this burash as a result from CWnd::OnCtrlColor. For value diffirent from COLOR_EDIT and COLOR_MSG return the result from OnCtrlColor from base class.