Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to use the control named windowlessrechedit.

i will call the function "CTxtWinHost::SetClientRect" When the window size changes,than the Caret always flickers.


the code
C++
//it will be called,When the window size changes.
//OnSize will call it.
void CxRichEdit::CxSetRect(RECT rc,bool bInvalidate)
{
	CxAncestor::CxSetRect(rc,bInvalidate);
	IFISNULLSTOP(m_pTwhost);
	if(xScrollVert.IsVisible())
	{
		CxRect rcScroll(rc.right-dwScrollWidth,rc.top,rc.right,rc.bottom);
		xScrollVert.CxSetRect(rcScroll,false);
		rc.right-=dwScrollWidth;
	}
	int ixMargins = GET_X_LPARAM(lpMargins);
	rc.left+=ixMargins;
//here,i want to chang the rect of ITextHost. 
//ITextHost m_pTwhost 
	m_pTwhost->SetClientRect(&rc,true);
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900