CATEGORII DOCUMENTE |
Asp | Autocad | C | Dot net | Excel | Fox pro | Html | Java |
Linux | Mathcad | Photoshop | Php | Sql | Visual studio | Windows | Xml |
The following event handler was added such that when we clicked on the hello button, a message box with the specified address pops up and beep sound is made.
void CHelloDlg::OnHello( )
The OnSize() event handler ensures that the button control is resized every time the application window is resized.
void CHelloDlg::OnSize(UINT nType, int cx, int cy)
if (n = = 2)
}
The following two lines were added to the OnInitDialog() event handler to initialize the text in the edit control.
....
// TODO: Add extra initialization here
m_edit1 = 'enter your text here';
UpdateData(FALSE);
OnClear( ) event handler clears the edit box i.e. any contents in it are cleared.
void CLaunchAppDlg::OnClear()
The OnExit( ) event handler written for the Exit button control provides an alternative way to exit the application.
void CLaunchAppDlg::OnExit()
This is the main event handler of this application. When the launch button is pressed, the test in the edit box is checked such that if the user had typed paint the paint application is launched; if the user typed notepad, the notepad application is launched; if the user types anything else, the message " Not a valid program name" is put in the edit box.
void CLaunchAppDlg::OnLaunch()
if (UpperValue=='NOTEPAD')
if (UpperValue != 'PAINT' && UpperValue != 'NOTEPAD')
}
The following lines of code were added to the OnInitDialog() event handler to initialize the text in the 'veggie' list box.
// TODO: Add extra initialization here
m_veggies.AddString('Carrots');
m_veggies.AddString('Spinach');
m_veggies.AddString('Broccoli');
m_veggies.AddString('Beans');
m_veggies.AddString('Potato');
m_veggies.AddString('Peppers');
m_veggies.AddString('Peas');
Double clicking on a list item in the veggie list leads to shifting it into the veggie I like list box by this event handler.
void CListBoxExDlg::OnDblclkVeggies()
}
Double clicking on a list item in the 'veggie I like' list leads to shifting it into the 'veggie'list box by this event handler.
void CListBoxExDlg::OnDblclkVeggiesilike()
}
This event handler enables making shifting single/multiple selections from 'veggie' list to 'veggie I like' list box.
void CListBoxExDlg::OnRight()
int c = 0;
for (int j = 0; j<count_selected; j++)
delete [] selected_array;
}
}
This event handler enables making shifting single/multiple selections from 'veggie I like' list to 'veggie' list box.
void CListBoxExDlg::OnLeft()
int c = 0;
for (int j = 0; j<count_selected; j++)
delete [] selected_array;
}
}
This event handler enables shifting all contents of 'veggie' list to 'veggie I like' list box.
void CListBoxExDlg::OnAllright()
m_veggies.ResetContent();
}
}
This event handler enables shifting all contents of 'veggie I like' list to 'veggie' list box.
void CListBoxExDlg::OnAllleft()
m_veggiesilike.ResetContent();
}
}
Politica de confidentialitate | Termeni si conditii de utilizare |
Vizualizari: 818
Importanta:
Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved