I'm trying to populate a list box on the main dialog box with data selected from a different dialog box which contains radio buttons. My code compiles, but the program bombs when I run it. What am I doing wrong?
CProject1Dlg is the main dialog box.
void CProject1Dlg::OnButtonDrink()
{
DRINK dlg_Drink(this);
// Initialize dialog data
int nRetCode = dlg_Drink.DoModal();
if(nRetCode = IDOK)
{
CString strMessage, strDType, strDSize;
UpdateData();
// Determine which button is selected and confirm addition.
GetDlgItem(IDC_RADIO_LG + dlg_Drink.m_DSize) -> GetWindowText(strDSize);
GetDlgItem(IDC_RADIO_D_POP + dlg_Drink.m_DType) -> GetWindowText(strDType);
strMessage = strDSize +" "+ strDType + " is selected";
}



LinkBack URL
About LinkBacks



