Click here to Skip to main content
14,492,338 members

C / C++ / MFC

 
GeneralRe: Change Dir inside CFileDialog Pin
Victor Nijegorodov14-Feb-20 9:24
MemberVictor Nijegorodov14-Feb-20 9:24 
GeneralRe: Change Dir inside CFileDialog Pin
Member 40147616-Feb-20 22:36
MemberMember 40147616-Feb-20 22:36 
GeneralRe: Change Dir inside CFileDialog Pin
Victor Nijegorodov16-Feb-20 23:40
MemberVictor Nijegorodov16-Feb-20 23:40 
GeneralRe: Change Dir inside CFileDialog Pin
Member 40147617-Feb-20 0:14
MemberMember 40147617-Feb-20 0:14 
GeneralRe: Change Dir inside CFileDialog Pin
Victor Nijegorodov17-Feb-20 2:03
MemberVictor Nijegorodov17-Feb-20 2:03 
GeneralRe: Change Dir inside CFileDialog Pin
Member 40147617-Feb-20 3:21
MemberMember 40147617-Feb-20 3:21 
GeneralRe: Change Dir inside CFileDialog Pin
Victor Nijegorodov17-Feb-20 4:41
MemberVictor Nijegorodov17-Feb-20 4:41 
GeneralRe: Change Dir inside CFileDialog Pin
Member 40147617-Feb-20 5:01
MemberMember 40147617-Feb-20 5:01 
I try 2 solution:

void MyClass::OnTypeChange()
{
if(m_ofn.nFilterIndex==2){ // .doc
char szPath [MAX_PATH] = {"c:\\DocFiles"};
SetCurrentDirectory(szPath);
m_ofn.lpstrFile=szPath;
} else { // .txt
char szPath2 [MAX_PATH] = {"c:\\TxtFiles"};
SetCurrentDirectory(szPath2);
m_ofn.lpstrFile=szPath2;
}
Invalidate();
UpdateData(false);
}

and

void MyClass::OnTypeChange()
{
if(m_ofn.nFilterIndex==2){ // .doc
char szPath [MAX_PATH] = {"c:\\DocFiles\\file.doc"};
//SetCurrentDirectory(szPath);
m_ofn.lpstrFile=szPath;
} else { // .txt
char szPath2 [MAX_PATH] = {"c:\\TxtFiles\\file.txt"};
//SetCurrentDirectory(szPath2);
m_ofn.lpstrFile=szPath2;
}
Invalidate();
UpdateData(false);
}

But don't work.
N.B.: c:\DocFiles\file.doc and c:\TxtFiles\file.txt are existing files on the disk.
I Try, but I'm not sure Smile | :) )

AnswerRe: Change Dir inside CFileDialog Pin
Victor Nijegorodov11-Feb-20 11:18
MemberVictor Nijegorodov11-Feb-20 11:18 
GeneralRe: Change Dir inside CFileDialog Pin
Member 40147611-Feb-20 23:32
MemberMember 40147611-Feb-20 23:32 
QuestionKeeping UDS_ALIGNRIGHT positioning for an updown control after moving the buddy window Pin
Alexander Kindel10-Feb-20 0:47
MemberAlexander Kindel10-Feb-20 0:47 
AnswerRe: Keeping UDS_ALIGNRIGHT positioning for an updown control after moving the buddy window Pin
Richard MacCutchan10-Feb-20 0:58
mveRichard MacCutchan10-Feb-20 0:58 
GeneralRe: Keeping UDS_ALIGNRIGHT positioning for an updown control after moving the buddy window Pin
Alexander Kindel10-Feb-20 13:50
MemberAlexander Kindel10-Feb-20 13:50 
GeneralRe: Keeping UDS_ALIGNRIGHT positioning for an updown control after moving the buddy window Pin
Richard MacCutchan10-Feb-20 21:59
mveRichard MacCutchan10-Feb-20 21:59 
RantHow do people even do LL(k) parsing? Pin
honey the codewitch9-Feb-20 7:24
mvahoney the codewitch9-Feb-20 7:24 
GeneralRe: How do people even do LL(k) parsing? Pin
Gerry Schmitz9-Feb-20 9:02
mveGerry Schmitz9-Feb-20 9:02 
GeneralRe: How do people even do LL(k) parsing? Pin
honey the codewitch9-Feb-20 9:50
mvahoney the codewitch9-Feb-20 9:50 
GeneralRe: How do people even do LL(k) parsing? Pin
Gerry Schmitz9-Feb-20 10:23
mveGerry Schmitz9-Feb-20 10:23 
GeneralRe: How do people even do LL(k) parsing? Pin
CPallini9-Feb-20 21:22
mveCPallini9-Feb-20 21:22 
QuestionNon-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 3:34
Membersdancer754-Feb-20 3:34 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 6:07
mveRichard MacCutchan4-Feb-20 6:07 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 6:24
Membersdancer754-Feb-20 6:24 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Richard MacCutchan4-Feb-20 6:52
mveRichard MacCutchan4-Feb-20 6:52 
GeneralRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
sdancer754-Feb-20 20:48
Membersdancer754-Feb-20 20:48 
AnswerRe: Non-latin characters are shown correctly in Debug mode but not in Release Pin
Stefan_Lang5-Feb-20 21:41
mveStefan_Lang5-Feb-20 21:41 

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.