| 45 | // CPartitionType message handlers |
| 46 | |
| 47 | void CPartitionType::OnOK() |
| 48 | { |
| 49 | CString str; |
| 50 | CComboBox *cbList = (CComboBox *)GetDlgItem(IDC_PARTTION_TYPE_LIST); |
| 51 | m_cPartType = (UCHAR) cbList->GetCurSel(); |
| 52 | if (m_cPartType != m_Part->Entry->Mbr.PartitionType) { |
| 53 | if (Ext2SetPartitionType(m_Part, m_cPartType)) { |
| 54 | str.Format("Succeed to set partition type to %2.2X: %s", |
| 55 | m_cPartType, PartitionString(m_cPartType)); |
| 56 | AfxMessageBox(str, MB_OK | MB_ICONINFORMATION); |
| 57 | } else { |
| 58 | AfxMessageBox("Failed to set the partition type!", |
| 59 | MB_OK | MB_ICONWARNING); |
| 60 | m_cPartType = 0; |
| 61 | return; |
| 62 | } |
| 63 | } else { |
| 64 | AfxMessageBox("Same partition type to the previous. Nothing is changed !", |
| 65 | MB_OK | MB_ICONWARNING); |
| 66 | } |
| 67 | |
| 68 | CDialog::OnOK(); |
| 69 | } |
| 70 | |
| 71 | BOOL CPartitionType::OnInitDialog() |
| 72 | { |
nothing calls this directly
no test coverage detected