MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / OnOK

Method OnOK

Ext2Mgr/PartitionType.cpp:47–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45// CPartitionType message handlers
46
47void 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
71BOOL CPartitionType::OnInitDialog()
72{

Callers

nothing calls this directly

Calls 2

Ext2SetPartitionTypeFunction · 0.85
PartitionStringFunction · 0.85

Tested by

no test coverage detected