• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Why does the View react one step slower after the Doc is modified?

To summarize, i've modified the CView class to hold the OpenGL viewing codes, the CAD model data to be viewed is stored in a member of the Document class. The application works fine when I open the CAD files, the model is shown on the screen, it can be rotated, translated, zoom in, zoom out etc. (The update works fine as long as the modifications are made only in the View class parameters.) But when i tried changing the model data by an icon click, the View is updated one step behind. (i.e. i clicked some operations in the sequence A-B-C-D-E, the program react one step slower, becoming NOTHING_HAPPEN-A-B-C-D. i tracked by debugger that the data in Document are modified correctly. So why does it react slower? How to solve this?

(I'm just newly registered, so don't have many points....)
0
killerdoll
Asked:
killerdoll
1 Solution
 
northernchillCommented:
Perhaps if you posted some code related to your question.  It could be that although you are updating the data, the OpenGL window may not be redrawing itself when you think it should.  This could be caused by not forcing the window to explicitly rebuild the rendered information.
0
 
killerdollAuthor Commented:
Oh, you're right...!!!
(By adding some codes to send WM_PAINT across the queue, it works...!!!)

Many Thks... :)
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now