I have a PropertySheet based application and am trying to update the data members & controls on the respective PropertyPages, from within the PropertySheet, in response to a button push.

I need to be able to properly update a child's (page's) controls and member variables from within the parent's (sheet's) scope.

Currently, I am using this code. There MUST be a better way than this:

int originalPage = GetActiveIndex();



... (more of the same for each page in the sheet) ...

With UpdateToControls defined in the relative .h files as:

// Update functions
void UpdateToControls() { UpdateData(FALSE); };
void UpdateFromControls() { UpdateData(TRUE); };
Obviously there must be a better way, as visual flicker is apparent when each PropertyPage is made active. Also, the controls fail to update on the page which is initially active. If I repeat the process starting on a different page the problem always shifts to the active page. In other words, providing the page was not initially active when the button was pushed, the code will update the page's controls.

Is there a way I can set a page active without updating the screen, and does anyone know why this code would not work for the page with active focus?

Is there another way to transfer data between sheet and page for which I am unaware?

Thanks in advance.