Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multithread c Windows Pin
mosine16-Jun-15 3:01
mosine16-Jun-15 3:01 
GeneralRe: Multithread c Windows Pin
Jochen Arndt16-Jun-15 3:02
professionalJochen Arndt16-Jun-15 3:02 
GeneralRe: Multithread c Windows Pin
mosine16-Jun-15 3:21
mosine16-Jun-15 3:21 
QuestionFailure to remove folders after using CFileDialog DoModal Pin
Still learning how to code15-Jun-15 21:28
Still learning how to code15-Jun-15 21:28 
AnswerRe: Failure to remove folders after using CFileDialog DoModal Pin
Freak3016-Jun-15 0:21
Freak3016-Jun-15 0:21 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Jochen Arndt16-Jun-15 0:24
professionalJochen Arndt16-Jun-15 0:24 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Still learning how to code16-Jun-15 2:08
Still learning how to code16-Jun-15 2:08 
AnswerRe: Failure to remove folders after using CFileDialog DoModal Pin
Jochen Arndt16-Jun-15 0:22
professionalJochen Arndt16-Jun-15 0:22 
When dlgFileBrowse.DoModal() returns, the dialog window has been closed but the object itself still exists and may have open file handles. These should be closed by the destructor of the browse dialog. I have not tested this but it seems a probable reason.

So you should try to call your delete function after the browse dialog object is destroyed:
UINT uiFileBrowseDlgRC;
// This block ensures that dlgFileBrowse goes out of scope
// before calling the delete function.
{
    CFileDialog dlgFileBrowse(true);
    uiFileBrowseDlgRC = dlgFileBrowse.DoModal();
}
// This should work now.
RecursiveDelete("F:");

Alternatively you can create the dialog using new and delete it before calling RecursiveDelete.
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Still learning how to code16-Jun-15 2:12
Still learning how to code16-Jun-15 2:12 
GeneralRe: Failure to remove folders after using CFileDialog DoModal Pin
Jochen Arndt16-Jun-15 2:24
professionalJochen Arndt16-Jun-15 2:24 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Still learning how to code16-Jun-15 2:54
Still learning how to code16-Jun-15 2:54 
GeneralRe: Failure to remove folders after using CFileDialog DoModal - **** FIXED (I think !) **** Pin
Jochen Arndt16-Jun-15 3:19
professionalJochen Arndt16-Jun-15 3:19 
QuestionRe: Failure to remove folders after using CFileDialog DoModal Pin
David Crow16-Jun-15 4:21
David Crow16-Jun-15 4:21 
QuestionExisting VR Frame Renderers Pin
Trevor Johansen15-Jun-15 15:25
Trevor Johansen15-Jun-15 15:25 
QuestionLoad CSV file to a database in Windows 64bit Pin
aks.14-Jun-15 22:36
aks.14-Jun-15 22:36 
AnswerRe: Load CSV file to a database in Windows 64bit Pin
Jochen Arndt14-Jun-15 23:45
professionalJochen Arndt14-Jun-15 23:45 
QuestionNew to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 18:36
Member 1176562614-Jun-15 18:36 
AnswerRe: New to C++ and Programming, Absolutely new Pin
Amarnath S14-Jun-15 19:00
professionalAmarnath S14-Jun-15 19:00 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Member 1176562614-Jun-15 19:26
Member 1176562614-Jun-15 19:26 
GeneralRe: New to C++ and Programming, Absolutely new Pin
Richard MacCutchan14-Jun-15 21:42
mveRichard MacCutchan14-Jun-15 21:42 
QuestionAfxGetApp anomaly Pin
ForNow10-Jun-15 9:18
ForNow10-Jun-15 9:18 
QuestionOdd property sheet behavior Pin
David Crow10-Jun-15 4:41
David Crow10-Jun-15 4:41 
AnswerRe: Odd property sheet behavior Pin
Chris Losinger10-Jun-15 5:26
professionalChris Losinger10-Jun-15 5:26 
QuestionAdd lib by pragma Pin
_Flaviu10-Jun-15 0:32
_Flaviu10-Jun-15 0:32 
AnswerRe: Add lib by pragma Pin
David Crow10-Jun-15 2:46
David Crow10-Jun-15 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.