Click here to Skip to main content
14,934,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to call printer under fullscreen Pin
Anonymous30-Jan-05 0:04
MemberAnonymous30-Jan-05 0:04 
GeneralAudio Encoder/Decoder Pin
aRtsZ28-Jan-05 4:23
MemberaRtsZ28-Jan-05 4:23 
GeneralConst static template member in class Pin
Anonymous28-Jan-05 3:34
MemberAnonymous28-Jan-05 3:34 
GeneralRe: Const static template member in class Pin
Chris Losinger28-Jan-05 4:54
professionalChris Losinger28-Jan-05 4:54 
GeneralRe: Const static template member in class Pin
Anonymous29-Jan-05 1:48
MemberAnonymous29-Jan-05 1:48 
GeneralRe: Const static template member in class Pin
Chris Losinger29-Jan-05 4:09
professionalChris Losinger29-Jan-05 4:09 
GeneralRe: Const static template member in class Pin
Anonymous29-Jan-05 7:46
MemberAnonymous29-Jan-05 7:46 
GeneralCFileDialog problem Pin
Aamir Butt28-Jan-05 3:29
MemberAamir Butt28-Jan-05 3:29 
I am having a problem with CFileDialog. Have a look at this code:
CString strFirst = "C:\\1.txt";
CString strSecond = "C:\\aa\\1.txt";
CopyFile(strFirst, strSecond, FALSE);

This code is simply copying a file 1.txt to a folder named aa present at C root. After I do this and I try to delete folder aa(while my application is still running), it lets me delete it and that's OK. Now have a look at the problem code:
CFileDialog dlg(false);
CString strPathName;
if(dlg.DoModal() == IDOK)
{
	strPathName = dlg.GetPathName();
	CopyFile(strFirst, strPathName, FALSE);
}

Now, if I select the same folder in CFileDialog and create a file there, it copies it quite well thru CopyFile function. The problem is that If I try to delete folder aa now (with my application still open), it wont let me delete it although I can delete the newly created file inside this folder but deletion of folder is not possible. It gives an error message saying that this folder is in use by some other program.

Am I doing something wrong or is it a bug in CFileDialog. I think it is a bug. Looks like CFileDialog is not releasing the handle of the folder. What is your opinion.


I hated going to weddings. All the grandmas would poke me saying "You're next". They stopped that when I started doing it to them at funerals.

My Articles
GeneralRe: CFileDialog problem Pin
Blake Miller28-Jan-05 3:58
MemberBlake Miller28-Jan-05 3:58 
GeneralRe: CFileDialog problem Pin
David Crow28-Jan-05 4:10
MemberDavid Crow28-Jan-05 4:10 
GeneralRe: CFileDialog problem Pin
Aamir Butt28-Jan-05 4:33
MemberAamir Butt28-Jan-05 4:33 
GeneralRe: CFileDialog problem Pin
David Crow28-Jan-05 5:21
MemberDavid Crow28-Jan-05 5:21 
GeneralRe: CFileDialog problem Pin
Aamir Butt30-Jan-05 18:24
MemberAamir Butt30-Jan-05 18:24 
Generalcall for help Pin
yanyu8128-Jan-05 3:25
Memberyanyu8128-Jan-05 3:25 
GeneralCall For Help Pin
yanyu8128-Jan-05 3:21
Memberyanyu8128-Jan-05 3:21 
GeneralRe: Call For Help Pin
David Crow28-Jan-05 4:04
MemberDavid Crow28-Jan-05 4:04 
GeneralRe: Call For Help Pin
yanyu8128-Jan-05 14:06
Memberyanyu8128-Jan-05 14:06 
GeneralRe: Call For Help Pin
David Crow28-Jan-05 15:04
MemberDavid Crow28-Jan-05 15:04 
GeneralRe: Call For Help Pin
yanyu8130-Jan-05 4:27
Memberyanyu8130-Jan-05 4:27 
GeneralRe: Call For Help Pin
David Crow31-Jan-05 2:24
MemberDavid Crow31-Jan-05 2:24 
GeneralDecryption Pin
gecool28-Jan-05 2:55
Membergecool28-Jan-05 2:55 
GeneralUnicode CString init from &#XXXX;&#YYYY; representation Pin
lob28-Jan-05 1:17
Memberlob28-Jan-05 1:17 
GeneralRe: Unicode CString init from &#XXXX;&#YYYY; representation Pin
includeh1028-Jan-05 7:49
Memberincludeh1028-Jan-05 7:49 
GeneralRe: Unicode CString init from &#XXXX;&#YYYY; representation Pin
lob28-Jan-05 9:30
Memberlob28-Jan-05 9:30 
GeneralConsole Output Pin
IronMike27-Jan-05 23:51
MemberIronMike27-Jan-05 23:51 

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.