Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC client view rectangle size? Pin
_Flaviu16-May-12 5:11
_Flaviu16-May-12 5:11 
GeneralRe: MFC client view rectangle size? Pin
Vaclav_16-May-12 5:55
Vaclav_16-May-12 5:55 
GeneralRe: MFC client view rectangle size? Pin
_Flaviu16-May-12 7:40
_Flaviu16-May-12 7:40 
AnswerRe: MFC client view rectangle size? Pin
David Crow16-May-12 7:07
David Crow16-May-12 7:07 
GeneralRe: MFC client view rectangle size? Pin
Vaclav_16-May-12 8:52
Vaclav_16-May-12 8:52 
AnswerRe: MFC client view rectangle size? Pin
_Flaviu16-May-12 7:44
_Flaviu16-May-12 7:44 
GeneralRe: MFC client view rectangle size? Pin
Vaclav_16-May-12 8:53
Vaclav_16-May-12 8:53 
QuestionCFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 2:43
yu-jian16-May-12 2:43 
It needs to write string to the file.
But it Open file return FALSE, GetLastError() = 3.

m_File2Write.Open(webRes.strLocalFile, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyWrite))
{
DWORD error = GetLastError();
return -1L;
}
The file does not exists, but I think it will create a file. I do not know why Open file falied.

-----------------------------
Now I know why. Because there is the chararcter '-' in the file name. Such as 12-444.html
But if use the explorer to create file 12-444.html, it is ok. Why use CFile, it error?

modified 16-May-12 9:03am.

AnswerRe: CFile Open failed GetLastError = 3 Pin
CPallini16-May-12 3:00
mveCPallini16-May-12 3:00 
GeneralRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 3:05
yu-jian16-May-12 3:05 
GeneralRe: CFile Open failed GetLastError = 3 Pin
CPallini16-May-12 3:21
mveCPallini16-May-12 3:21 
QuestionRe: CFile Open failed GetLastError = 3 Pin
David Crow16-May-12 3:25
David Crow16-May-12 3:25 
AnswerRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 3:50
yu-jian16-May-12 3:50 
GeneralRe: CFile Open failed GetLastError = 3 Pin
David Crow16-May-12 4:06
David Crow16-May-12 4:06 
AnswerRe: CFile Open failed GetLastError = 3 Pin
Richard MacCutchan16-May-12 4:03
mveRichard MacCutchan16-May-12 4:03 
GeneralRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 4:09
yu-jian16-May-12 4:09 
GeneralRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 4:13
yu-jian16-May-12 4:13 
QuestionRe: CFile Open failed GetLastError = 3 Pin
enhzflep16-May-12 4:21
enhzflep16-May-12 4:21 
GeneralRe: CFile Open failed GetLastError = 3 Pin
Richard MacCutchan16-May-12 4:29
mveRichard MacCutchan16-May-12 4:29 
GeneralRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 5:20
yu-jian16-May-12 5:20 
GeneralRe: CFile Open failed GetLastError = 3 Pin
Richard Andrew x6416-May-12 5:54
professionalRichard Andrew x6416-May-12 5:54 
GeneralRe: CFile Open failed GetLastError = 3 Pin
Richard MacCutchan16-May-12 7:54
mveRichard MacCutchan16-May-12 7:54 
GeneralRe: CFile Open failed GetLastError = 3 Pin
yu-jian16-May-12 15:07
yu-jian16-May-12 15:07 
GeneralRe: CFile Open failed GetLastError = 3 Pin
CPallini16-May-12 6:55
mveCPallini16-May-12 6:55 
GeneralRe: CFile Open failed GetLastError = 3 Pin
Richard MacCutchan16-May-12 7:55
mveRichard MacCutchan16-May-12 7:55 

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.