Saturday, 20 January 2018

DEMONSTRATION OF CHECK BOXES

6.      DEMONSTRATION OF CHECK BOXES

 DEMONSTRATION OF CHECK BOXES
Step 1:-Select a NEW file.
Step 2:-Select a project tab from new window and from that select MFC application wizard [exe] option and give a project name as Checks and click ok.
Step 3:-
Þ    MFC Application Wizard window is appeared.
Þ    Select dialog based settings in step 1, click next.
Þ    Select default settings from step 2 to step 6 and click finish.
Þ    New projects information on window will appear and click ok.
Step 4:-Drag and drop three check boxes and one edit box from tool box and align the controls, to align horizontally, select the align menu item in the layout menu. This opens a submenu, select left in the submenu to align the check box controls to the left edge. To give vertical spacing select space evenly item and click the item in the menu.
Step 5:-Now goto view -> class wizard -> IDC_CHECK1-> IDC_CHECK2-> IDC_CHECK3 and click BN_CLICKED for each check box and add event Handlers OnCheck1(), OnCheck2(), OnCheck3().
Step 6:-Add a member variable to the edit box, for that goto-> class wizard->member variables->IDC_EDIT1-> and give name as m_text and click ok.
Step 7:-Goto class view tab and open CCheckboxDlg and double click OnCheck1(), OnCheck2(), OnCheck3(), and add code,
                        void CChecksDlg::OnCheck1();
                        {
                                    m_text = “Check1 Clicked”;
                                    UpdateData(false);
                        }
                        void CChecksDlg::OnCheck2();
                        {
                                    m_text = “Check2 Clicked”;
                                    UpdateData(false);
                        }
                        void CChecksDlg::OnCheck3();
                        {
                                    m_text = “Check3 Clicked”;
                                    UpdateData(false);
                        }

Step 9:-Build…………Compile………….Execute.

Related Posts:

  • Introduction to VC++ Introduction Visual c++ is an extremely powerful tool for window programming. It includes the built-in resources like MFC.MFC, Microsoft Foundation Class, is a package of prewritten ready-to-use code. User has to sim… Read More
  • READING KEYSTROKES FROM KEYBOARD 3.      READING KEYSTROKES FROM KEYBOARD Step 1:-Select a NEW file. Step 2:-Select a project tab from new window and from that select MFC application wizard [exe] option and give a project n… Read More
  • USING WIN32 CONSOLE APPLICATION 1.      USING WIN32 CONSOLE APPLICATION Step 1:-Select a NEW file Step 2:-Select project tab from new window and from that select WIN-32 Application       &nb… Read More
  • USING MFC APPLICATION WIZARD 2.      USING MFC APPLICATION WIZARD s     Step 1:- Select a NEW file. Step 2:-Select a project tab from new window and from that select MFC Application Wizard [exe] option an… Read More
  • Important Tips Visual C plus Important Tips:- AddString ( ): Adds string to a list box and for combo box this adds string to the end of the list in the list box of a combo box. App wizard: this will write default code in our program for us. Appli… Read More

0 comments:

Post a Comment