Solved

CFileDialog problem???

Posted on 2002-06-03
4
325 Views
Last Modified: 2013-11-20
Friends

I get a strange problem on the following code...

CString cstrInitialFileName = "Something.dat";
CString szExt("dat");
CString sFilter(_T("Curve Files (*.dat)|*.dat|All Files (*.*)|*.*||"));
         
CFileDialog dlg(TRUE, szExt, cstrInitialFileName, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, (LPCTSTR) sFilter, NULL);

if (dlg.DoModal() == IDOK)
   CString cstrFileName = dlg.GetPathName();



If I run this code on Windows NT 4.0 and see the Task manager, there is an addtional thread is creating for this opendialog box and which is not releasing. but same code if run on windows 2000, the number of additonal thread count iam getting more than 4, and sometime its grows.

Friends do i have take any additional steps inorder to call CFileDialog on windows 2000????

Expecting some suggetions!!!
Thanks
Hari

0
Comment
Question by:pphari
4 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 7053230
Hi!
it is behavior by design - File Common dialog uses extra threads to access file system info (dirs tree and so on)..
You can`t restrict this (except you write your own dialog from scratch)
Good luck.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7055849
Also, it is nothing to worry about.  It is not a massive resource leak.  Just a couple of tallies that make no difference to anything.

-- Dan
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 35
iSeries FTP Exit Program 8 136
Add content to output file 4 63
Thin secure Windows 10 5 98
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question