MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / OnSelchangeScryptn

Method OnSelchangeScryptn

cppcryptfs/ui/CreatePropertyPage.cpp:584–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584void CCreatePropertyPage::OnSelchangeScryptn()
585{
586 // TODO: Add your control notification handler code here
587
588 auto pScryptN = (CComboBox*)GetDlgItem(IDC_SCRYPTN);
589 if (!pScryptN)
590 return;
591
592 int nSel = pScryptN->GetCurSel();
593 CString sel;
594 pScryptN->GetLBText(nSel, sel);
595
596 int scryptN = stoi((LPCTSTR)sel);
597
598 int mem = (1<<scryptN)/1024;
599
600 CString suffix;
601 suffix.Format(LocUtils::GetStringFromResources(IDS_MB_REQUIRED).c_str(), mem);
602
603 if (mem >= 1024) {
604 mem /= 1024;
605 suffix.Format(LocUtils::GetStringFromResources(IDS_GB_REQUIRED).c_str(), mem);
606 }
607
608 auto pScryptMemReq = (CStatic*)GetDlgItem(IDC_SCRYPTMEMREQ);
609 if (pScryptMemReq) {
610 pScryptMemReq->SetWindowText(suffix);
611 }
612}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected