Solved

CFileDialog problem???

Posted on 2002-06-03
4
304 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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
how to monitor remote shell execution on linux 9 92
viewing source code from eclipse 13 74
either24  challenge 19 83
zeroMAx challenge 20 76
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now