Run time validation in .RC file in VC++ Mfc application
-
Hello All, Please help out me. I have enable Arrow Key functionality in MFC application,Now some where i required that if i clicked the checkbox then after Arrow key should not be enable. Now i required the condition need to be in .rc file not in .cpp file . I tried " #if(false) #endif " but how i need to provide condition inside into IF() and how it will work at runtime when i will change the condition.
-
Hello All, Please help out me. I have enable Arrow Key functionality in MFC application,Now some where i required that if i clicked the checkbox then after Arrow key should not be enable. Now i required the condition need to be in .rc file not in .cpp file . I tried " #if(false) #endif " but how i need to provide condition inside into IF() and how it will work at runtime when i will change the condition.
The arrow keys allow moving from one check box to another. If you don't want this behaviour use the resource editor to set the group property of the corresponding check boxes and the following control in the tab order. If you want to use conditions within the RC file you have to pass them using build options because the definitions used when compiling are not passed when processing RC files. Similar has just been asked a few threads below: #ifdef...#endif is not working in Resource(.rc) file - C / C++ / MFC Discussion Boards[^] See this answer: Re: #ifdef...#endif is not working in Resource(.rc) file - C / C++ / MFC Discussion Boards[^]