Visual C++ and MFC Fundamentals Chapter 20: List-Based Controls
{
// TODO: Add your control notification handler code here
// The first radio button was selected
Selected = 0;// Get the rectangle that holds the picture
CRect PictArea;
m_Picture.GetWindowRect(&PictArea);
// Repaint the picture
InvalidateRect(&PictArea);
}void CIceScreamOrderDlg::OnBnClickedRdoCone()
{
// TODO: Add your control notification handler code here
// The second radio button was selected
Selected = 1;// Get the rectangle that holds the picture
CRect PictArea;
m_Picture.GetWindowRect(&PictArea);
// Repaint the picture
InvalidateRect(&PictArea);
}void CIceScreamOrderDlg::OnBnClickedRdoBowl()
{
// TODO: Add your control notification handler code here
// The third radio button was selected
Selected = 2;// Get the rectangle that holds the picture
CRect PictArea;
m_Picture.GetWindowRect(&PictArea);
// Repaint the picture
InvalidateRect(&PictArea);
}- Execute the application and test the Container radio buttons
- To process an order, add a new Member Function to the CIceScreamOrderDlg
class. Set its type as void and its name as ProcessOrder - Implement the method as follows:
// This is the central function that the other controls will refer to