Microsoft KB Archive/138784

{|
 * width="100%"|

PRB: Graph.vbx Does Not Refresh or Update

 * }

Q138784

1.00 1.50 1.51 1.52 1.52b WINDOWS kbprg kbprb

-

The information in this article applies to:


 * The Microsoft Foundation Classes (MFC), used with:
 * Microsoft Visual C++

-

SYMPTOMS
After you make a change to the data values in a Graph.vbx control, the changes are not reflected in the graph. This occurs even after calling Refresh or Invalidate.

CAUSE
To force the Graph.vbx control to update, you must use the control's DrawMode property. The Visual Control Pack documentation on the Graph.vbx control states the following about the 'DrawMode' property:

"... At run time, the graph is only redrawn when you set DrawMode to 2 (Draw) or 3 (Blit). This allows you to change as many property values as you want before displaying the graph. However, when the form containing a graph is first displayed, the graph is automatically displayed according to the current DrawMode value ..."

RESOLUTION
After updating the data in the .vbx control, you can force it to visibly update with the following code:

 // Assuming you have a CVBControl * variable named: m_pGraphControl m_pGraphControl->SetNumProperty("DrawMode",2);

STATUS
This behavior is by design.

Additional query words: 1.00 1.50 2.00 2.50 2.51 2.52 2.52b

Keywords : kb16bitonly kbMFC kbVC kbDSupport

Issue type : kbprb

Technology : kbAudDeveloper kbMFC