Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there any way to manipulate the controls other than retrieving the control objects using their object IDs?

0
Posted

Is there any way to manipulate the controls other than retrieving the control objects using their object IDs?

0

Using the Add Member Variable Wizard, you can declare variables for your controls by specifying Control for the variable category. This basically gives you an variable that is the control’s MFC class, providing you with a direct way of altering and interacting with the control. You can then call all CWnd class functions on the control, as you did to enable or disable and show or hide the controls in your application. Or, you can call the control class methods, enabling you to do things in the code that are specific to that type of control. For example, if you add another variable to the combo box control and specify that it’s a Control category variable, you can use it to add items to the drop-down list on the control.

Related Questions

Thanksgiving questions

*Sadly, we had to bring back ads too. Hopefully more targeted.