Code:
// 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);
The above code is very suspect. The api is as follows:
CWnd* GetDlgItem( int nID ) const;
void CWnd::GetDlgItem( int nID, HWND* phWnd ) const;
Return Value
A pointer to the given control or child window. If no control with the integer ID given by the nID parameter exists, the value is NULL.
You're adding some value to the nID... Is there a reason for that?
My guess is ther is not. But since you don't check the return but rather assume you've got a valid pointer in temporary storage and attempt to dereference it with GetWindowText... bad ju-ju