void CNoddyDlg::OnButton1()
{
// TODO: Add your control notification handler code here
FileDialog dialog(TRUE);
dialog.DoModal();
}
Before raising the dialog the state of play with regards to GDI
Objects is:
DC 5
Brush 1
Bitmap 1
Font 1
--------
Total 8
Pushing the button and raising the file dialog:
DC 19
Brush 13
Bitmap 16
Font 16
Palette 2
Region 1
---------
Total 67
Closing the file dialog:
DC 15
Brush 11
Bitmap 11
Font 1
Region 1
----------
Total 39
Coming out of WinMain()
DC 15
Bitmap 11
Brush 11
Region 1
----------
Total 38
The extra bitmaps appear to be image lists and masks of folders and
the like - see <http://weatherley.net/pics/imagelist.jpg> for an
example. The questions are:
o Why doesn't the CFileDialog clean up after itself?
o Is it something I've forgotten to do or is this behaviour 'by
design'?
o Is there any way of dumping the CFileDialog related GDI objects?
Cheers
It may be caching them so that next time it's used it's faster?
>o Is it something I've forgotten to do or is this behaviour 'by
>design'?
I'd assume it's by design.
>o Is there any way of dumping the CFileDialog related GDI objects?
None that I know of.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq