Posted on December 10, 2009, 10:58 am, by , under
Object.
Dear friends: I need to dynamic embed my own control into richedit control. I encounter a problem when I create the control by CreateControl. BOOL CreateControl( REFCLSID clsid, LPCTSTR pszWindowName, DWORD dwStyle, const RECT& rect, /////////the ‘rect’ may be difference from the rect in the controls’ on draw function
Tags:
control,
dynamic-embed,
element-or-find,
fastest,
from-richedit,
from-the-rect,
rect,
rewrited,
the-control,
the-controls,
the-rewrited,
time No Comments |
Read the rest of this entry »
Posted on December 8, 2009, 6:34 am, by , under
Object.
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.