Visio 2003 drawing control has excessive flicker when resizing..

S

Scott Metzger

Hi,

I am having excessive flicker with my drawing control when I resize it.

I have the drawing control in a CDialog which is resizable. I have
tried the following code in the OnSize and the OnSizing events both of
which result in a noticeable flicker when I resize the dialog...

CRect clientRect;
GetClientRect(&clientRect);
MyDrawingControl.MoveWindow( clientRect );

Any ideas on how to do smooth resizing of the drawing control?

Thanks,
Scott Metzger
 
M

Mai-lan [MS]

Hi, Scott: Are you using the RTM version of the ActiveX control or the beta?
We had resizing issues with the beta, that acutally should be fixed in the
beta refresh.

Thanks,
Mai-lan
 
S

Scott Metzger

Solved:

void CVisioForm::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
if (bValidMyDrawing)
{
MyDrawing.MoveWindow (0, 0, cx, cy);
MyDrawing.UpdateWindow();
}
}

The UpdateWindow call is the key here.
bValidMyDrawing is set to true after the form has been created.
 
Top