PRB: Graph.vbx Does Not Refresh or Update

Last reviewed: July 10, 1997
Article ID: 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) included with: Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52, 1.52b

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 reference words: 1.00 1.50 2.00 2.50 2.51 2.52 2.52b
KBCategory: kbprg kbprb
KBSubcategory: MfcVBX
Technology : kbMfc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.