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.
Currently, I am using this code:
With UpdateToControls defined in the relative .h files as:
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.
Andrew
Currently, I am using this code:
Code:
int originalPage = GetActiveIndex();
SetActivePage(PAGENO_SYSCONF);
m_System.UpdateToControls();
SetActivePage(PAGENO_ANTENNA);
m_Antennas.UpdateToControls();
... (more of the same for each page) ...
SetActivePage(originalPage);
With UpdateToControls defined in the relative .h files as:
Code:
// 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.
Andrew