MFC MDI Collecting control states for the "apply" button routine

  apply, c++, mfc, visual-studio-2017

It was mentioned in some of my other threads on my app on that my code was incorrect because the apply button is present. I understand that now. It was said to collect the controls and then when apply is hit to send the data.

I have now idea how to approach that. So for the sake of general education. I have 1 property sheet and 5 property pages. For the sake of just general controls in use. Between all the 5, there are only radio controls and buttons, no edit controls (yet).

Let’s assume there are 2 radios buttons and 1 button on each page.. where page 1 is radio1, radio2, button 1 and page 2 is radio3, radio4, button2….and so on.

I know that when the user selects something like a button or radio that the IsModified(TRUE) needs to be called to enable the apply button from grayed to active.

What would the code look like to scan all the controls and then apply them? I’ve never done it and I can’t seem to find an example that isn’t already super busy to gain the understanding of how to do it.

Anyone have a tutorial or code snippet or build a primer from the controls that I described above that could demonstrate how to execute this?

Source: Windows Questions C++

LEAVE A COMMENT