dynamic insert activex controls into richedit.

Written by


dear friends:

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:

  1. how to get the rect assigned by container of an active control? Dear friends: I need to dynamic embed my own...
  2. Include all ActiveX controls and DLL’s into a single EXE Hello, everybody! Is it possible to include all ActiveX controls,...
  3. richedit with EM_SETCHARFORMAT SCF_SELECTION Sorry Double Post - can i delete this one...
  4. Bacwards compatibility for MFC ActiveX controls My question is related to that in http://www.codeguru.com/cpp/cpp/cpp_...cle.php/c4019/ but...
  5. 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.

Dec
08

Leave a Reply