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

Method DoModal

cppcryptfs/ui/FolderDialog.cpp:84–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84int CFolderDialog::DoModal()
85{
86 int nReturn = IDOK;
87
88 // initialize the result to the starting folder value
89 m_strFinalFolderName = m_strInitialFolderName;
90
91 ITEMIDLIST* __unaligned piid = NULL;
92
93 // call the shell function
94 piid = (ITEMIDLIST* __unaligned)::SHBrowseForFolder(&m_bi);
95
96 // process the result
97 if (piid && ::SHGetPathFromIDList(piid, m_szPath))
98 {
99 m_strFinalFolderName = m_szPath;
100 nReturn = IDOK;
101 }
102 else
103 {
104 nReturn = IDCANCEL;
105 }
106
107 // Release the ITEMIDLIST if we got one
108 if (piid)
109 {
110 LPMALLOC lpMalloc;
111 VERIFY(::SHGetMalloc(&lpMalloc) == NOERROR);
112 lpMalloc->Free(piid);
113 lpMalloc->Release();
114 }
115
116 return nReturn;
117}
118
119CString CFolderDialog::GetPathName() const
120{

Callers 7

InitInstanceMethod · 0.45
OnClickedSelectMethod · 0.45
OnClickedSelectMethod · 0.45
OnContextMenuMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected