[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

pDoc->UpdateAllViews(NULL) problem

Posted on 2004-04-27
6
Medium Priority
?
796 Views
Last Modified: 2013-11-20
Hello,

I have a program where I load a bitmap and draw some lines. When I put the 'pDoc->UpdateAllViews(NULL) ' in de Draw function or somewhere else(because some lines need to be redrawn), My program crashes. Does somebody know what the cause can be when a program crashes when putting this statement in your code?

Herman
0
Comment
Question by:Hermy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Accepted Solution

by:
wayside earned 50 total points
ID: 10930061
There's lots of reason why it could crash.

You need to tell us exactly where it crashes, and post some code of your code where the crash happens.

Otherwise it's impossible to say.
0
 
LVL 1

Assisted Solution

by:Lara_tin2
Lara_tin2 earned 100 total points
ID: 10945096
Please DONT put updateAllViews in onDraw function or any sub routinue call by it.
updateAllViews cause Window redraw==>call onDraw==>updateAllViews is called more...
your Windows'll be Draw everytime and get all system  resource
and so on.may be it is reason
0
 

Author Comment

by:Hermy
ID: 10946981
I know where the problem is, still not knowing what to do with it. It's a little undoable to post a lot of code. I used rational purify to see what is wrong. I get red errors on some CList list fucntions after loading my bitmap.
0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 100 total points
ID: 11072201
This is conclusive that you can not put UpdateAllViews inside your OnDraw function.
Also inside all view functions, don't use UpdateAllView, simply call RepaintWindow() or Invalidate(TRUE).
UpdateAllView is designed to be called from document functions, and from app functions.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11857831
still awaiting for author feedback
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question