dynamic insert activex controls into richedit.
I have succeed in inserting my control into richedit.
CDrawCtrl is my activex control and it can adjust it’s size by SetInitialControlSize.
————————————————
<CODE>
CDrawCtrl *pCDrawCtrl = new CDrawCtrl ;
for(int i = m_iMaxControlID; i < 6666; i++)
{
if(NULL == GetDlgItem(i))
break;
}
m_iMaxControlID = i;
pCDrawCtrl->Create("", WS_CHILD, CRect(0, 0, 0, 0),this, m_iMaxControlID);
</CODE>
————————————————
then I insert the pCDrawCtrl with REOBJECT.
The problem is that everything I draw in CDrawCtrl::OnDraw will draw not only in the rect provided by richedit with richedit but also in the rect which is defined in
<CODE>
pCDrawCtrl->Create("", WS_CHILD, CRect(0, 0, 0, 0),this, m_iMaxControlID);
</CODE>
when I double click in the site of the object the focus may be with this rect. Then I can not select the object by click the rect provided by richedit.
Anyone help me?
Thanks.
See more here:
dynamic insert activex controls into richedit.
Related posts:
- how to get the rect assigned by container of an active control? Dear friends: I need to dynamic embed my own...
- Include all ActiveX controls and DLL’s into a single EXE Hello, everybody! Is it possible to include all ActiveX controls,...
- richedit with EM_SETCHARFORMAT SCF_SELECTION Sorry Double Post - can i delete this one...
- Bacwards compatibility for MFC ActiveX controls My question is related to that in http://www.codeguru.com/cpp/cpp/cpp_...cle.php/c4019/ but...
- Make control ActiveX have it’s own thread Hi all!! I am loading a swf file inside...
Related posts brought to you by Yet Another Related Posts Plugin.
08