Re: EnumChildWindows

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



See below...
On Sun, 28 Oct 2007 08:08:00 -0700, Al <Al@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Good Moring

It is really not a error, the program compiles and runs with no obvious
error except for when I hit a selection from the main menu to change the
right view, it stays the same. As I said earlier, I followed the code and the
<code>
context.m_pNewViewClass=pViewClass;
<code>
is being passed the correct RUNTIMECLASS but it doesn't change the right
view. Is there something I am missing?
****
Changing a pointer doesn't change the fundamental structures used in the operating system,
so you have to change those structures also, such as showing one view and hiding the
other. Pointers are just pointers, and the real representations are buried deep in the
OS. Changing pointers without telling Windows you've done something like this merely
results in ASSERT failures of various sorts when the wrong pointer seems to be set. Since
I've never tried to switch views in a splitter, I haven't examined all the issues, but I
can tell you that switching pointers is not going to do anything particularly interesting.
****

Next - I read a previous thread from you Joseph and let me see if this is
correct. In an explorer style application, you would use the left view to
change the view on the right, selections being done from the main menu and
the left view itself, with a tree control by sending messages to the main
frame correct?
****
I will do it one of two ways, depending on the nature of the problem. When I have
multiple views on a single document, I'm more likely to keep the state in the document and
use UpdateAllViews with nonzero lHint and non-NULL pHint to pass information across the
view boundaries. When I have multiple independent windows working on global device state,
I'm more likely to PostMessage or SendMessage to the main frame, then use
SendToDescendants to forward the message to all child windows. My taste in this has
varied over time, but in the case of multiple views on a single document, I now favor more
strongly the CDocument::UpdateAllViews approach.
joe
****
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Starting to doubt fortran
    ... Temporary variables leave the question of where else they ... for the original problem you could use Fortran pointers ... that you'd need multiple pointers, or multiple uses of the same ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Generic C
    ... Pointers are prefixed with ... > If you support overloading on multiple arguments, ... In any case is a utterly simple schema, ...
    (comp.lang.c)
  • Re: Big Strings
    ... >> is done with PChars or Pointers. ... I want to read and write multiple ... The array holding the contents is indexed by a subrange ...
    (alt.comp.lang.borland-delphi)
  • Re: Single copy, multiple pointers??
    ... It is possible to have one file with pointers to it that look like the same ... the same HDD, I will still only have one copy of the file on the HDD, ... You'll have multiple copies of the file. ... Ken Blake - Microsoft MVP Windows: ...
    (microsoft.public.windowsxp.basics)
  • Re: Mouse Pointers
    ... "Andy" wrote in message ... Change, apply and OK your pointers as you have been doing, then go to... ... ...the Theme Settings panel will then open. ... Have you tried changing to a different pointer theme from the default selection available? ...
    (microsoft.public.windows.vista.general)