Solved

OnInitialUpdate() calling...

Posted on 2000-02-28
2
763 Views
Last Modified: 2013-11-20
I have a tree control view in my application that when a new file is loaded needs to be updated.

I have also overriden OnFileOpen() in my only document class to handle opening of a text format file I have.

Problem is this: If I open a file by double-clicking on that file in explorer *or* selecting that file from the Recently used files list on the File menu, everything gets updated correctly, becuase by doing these two methods, the views OnUpdate() function gets called twice and then the OnInitialUpdate() function gets called (which is where my code it to build the tree control).

However, when I use the File->Open which uses my OnFileOpen(), only OnUpdate() gets called in the view class, and thus the tree control doesn't get displayed properly. How can I get my one views OnInitialUpdate() to call after using OnFileOpen() in my document class?

I had to move the code from OnUpdate to OnInitialUpdate for other reasons..and I'd like to not have to put it back...

Thanks,

Tom
0
Comment
Question by:gunn
2 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 100 total points
Comment Utility
You need to call CDocument::SendInitialUpdate() to force OnInitialUpdate() to be called
0
 

Author Comment

by:gunn
Comment Utility
Is this an "undocumented" function/feature? I couldn't find it in the help anywhere, but it compiled, linked and worked...thanks!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 34
fizzArray2 challenge 1 55
fix34  challenge 9 95
Thin secure Windows 10 5 46
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now