Click here to Skip to main content
15,897,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: retrieving the default personal folders file path Pin
Paresh Chitte17-Apr-07 2:48
Paresh Chitte17-Apr-07 2:48 
GeneralRe: retrieving the default personal folders file path Pin
vijay_aroli17-Apr-07 3:54
vijay_aroli17-Apr-07 3:54 
GeneralRe: retrieving the default personal folders file path Pin
David Crow17-Apr-07 4:44
David Crow17-Apr-07 4:44 
GeneralRe: retrieving the default personal folders file path [modified] Pin
vijay_aroli17-Apr-07 19:57
vijay_aroli17-Apr-07 19:57 
GeneralRe: retrieving the default personal folders file path Pin
David Crow18-Apr-07 2:57
David Crow18-Apr-07 2:57 
QuestionRegarding SetupDiEnumDeviceInfo [modified] Pin
VC_RYK16-Apr-07 21:24
VC_RYK16-Apr-07 21:24 
AnswerRe: Regarding SetupDiEnumDeviceInfo Pin
JudyL_MD17-Apr-07 2:11
JudyL_MD17-Apr-07 2:11 
QuestionCFileDialog problem with Vista Pin
Jap61542316-Apr-07 21:09
Jap61542316-Apr-07 21:09 
I have to make an older c++ project Vista Ready, and I run into some strange problems. When the code below is executed, I get a File search dialog with files which I cannot find in the Log directory with file explorer D'Oh! | :doh: . When notepad is executed, it reports an error that it cannot find the selected file. I can see that the main program is writing to the Log files, because the size and date/time in the Serach dialog, but I cannot find the files with file explorer. The Log directory is in C:\Windows\Progam Files\SoftwareName. It works without problems on a Windows XP / 2000 system.

{
csPath.Format("..\\Log");

csPathAndFile.Format("%s", ShowFileSearchDialog(m_hWnd, m_pParentWnd, "Log files|;VltLog*.log||", csPath));

csExecute.Format("notepad %s", csPathAndFile);

WinExec(csExecute, SW_SHOW);
}

CString ShowFileSearchDialog(HWND hWindow, CWnd* pParent, char szFilters[], CString csInitDirectory)
{
CString csPath;
BOOL bOpen = TRUE;
CFileDialog* dlgFile;
OPENFILENAME ofnLocal;
dlgFile = new CFileDialog(bOpen, NULL, NULL, OFN_HIDEREADONLY, szFilters, pParent);
if (!csInitDirectory.IsEmpty())
dlgFile->m_pOFN->lpstrInitialDir = csInitDirectory.GetBuffer();

dlgFile->m_hWndOwner = hWindow;
if (dlgFile->DoModal() != IDOK)
return "";
ofnLocal = dlgFile->GetOFN();
csPath.Format("%s", ofnLocal.lpstrFile);
return (csPath.GetBuffer());
}




AnswerRe: CFileDialog problem with Vista Pin
Michael Dunn16-Apr-07 21:20
sitebuilderMichael Dunn16-Apr-07 21:20 
GeneralRe: CFileDialog problem with Vista Pin
Stephen Hewitt16-Apr-07 21:54
Stephen Hewitt16-Apr-07 21:54 
GeneralRe: CFileDialog problem with Vista Pin
Jap61542316-Apr-07 22:08
Jap61542316-Apr-07 22:08 
GeneralRe: CFileDialog problem with Vista Pin
Stephen Hewitt16-Apr-07 22:37
Stephen Hewitt16-Apr-07 22:37 
GeneralRe: CFileDialog problem with Vista Pin
Jap61542316-Apr-07 22:49
Jap61542316-Apr-07 22:49 
GeneralRe: CFileDialog problem with Vista Pin
Stephen Hewitt17-Apr-07 2:24
Stephen Hewitt17-Apr-07 2:24 
AnswerRe: CFileDialog problem with Vista Pin
Paresh Chitte16-Apr-07 21:32
Paresh Chitte16-Apr-07 21:32 
GeneralRe: CFileDialog problem with Vista [modified] Pin
Jap61542316-Apr-07 21:53
Jap61542316-Apr-07 21:53 
GeneralRe: CFileDialog problem with Vista Pin
Paresh Chitte16-Apr-07 22:34
Paresh Chitte16-Apr-07 22:34 
GeneralRe: CFileDialog problem with Vista Pin
Jap61542316-Apr-07 22:57
Jap61542316-Apr-07 22:57 
AnswerRe: CFileDialog problem with Vista Pin
Paresh Chitte16-Apr-07 21:38
Paresh Chitte16-Apr-07 21:38 
QuestionHow to gray a Tab in TabCtrl? Pin
narayanagvs16-Apr-07 20:22
narayanagvs16-Apr-07 20:22 
AnswerRe: How to gray a Tab in TabCtrl? Pin
prasad_som16-Apr-07 21:04
prasad_som16-Apr-07 21:04 
QuestionCode-Page? Pin
John R. Shaw16-Apr-07 17:50
John R. Shaw16-Apr-07 17:50 
AnswerRe: Code-Page? Pin
markkuk17-Apr-07 1:58
markkuk17-Apr-07 1:58 
GeneralRe: Code-Page? Pin
John R. Shaw17-Apr-07 4:51
John R. Shaw17-Apr-07 4:51 
QuestionRe: Code-Page? Pin
David Crow17-Apr-07 4:59
David Crow17-Apr-07 4:59 

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.