OnApply processing in CPropertySheetImpl

Rob Marsden <rob-uNoPq/[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
I have a dialogue application where the dialogue is CPropertySheetImpl 
based. It has two CPropertyPageImpl based pages. I am having a problem 
with the way OnApply is called in the pages, and I fear my understanding 
is at fault, but I've failed to find the information I need.

It seems that only one OnApply() is being called no matter what the 
'dirty' state is for each page. When I click the Apply button, a 
PSN_KILLACTIVE message is sent to the currently open page, but the 
following PSN_APPLY goes to the lowest numbered page that has been 
created (pages only seem to be created when first displayed). Assuming 
the second page is displayed, the first page has never been displayed, 
and page two is dirty, then I click Apply, then all works as expected 
and page two OnApply is called. In exactly the same circumstances, 
except that page one has previously been viewed, and hence created, then 
the PSN_APPLY goes to page one, even though I was looking at a 'dirty' 
page two.

All a bit complicated to explain, but is this expected behaviour? I was 
expecting OnApply to be called either, for all pages, or all pages that 
had recorded themselves as 'dirty' with 'SetModified(m_bDirty)'.

So, my question to the team is "What am I doing wrong---or have 
misunderstood?"

This is in v8.1 and VS2008

-- 
Rob Marsden
Gistix (Northern) Limited


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.