15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


CFileDialog Subclass problems...

Reza -- Reza_r@need.Biles.com
Wednesday, January 29, 1997

Environment:  NT 4.0 , VC++ 4.1 

I have subclassed from CFileDialog.  I want to provide the following feature.

I have three different type that I support. So for each I filter the
content of my filename list. In addition to this, I want to FORCE a file
extension at the end of the filename, which appears in the filename
CEdit enty control.

To do this I have overriden OnTypeChange method. In this function I want
to do the file extension modification. Whatever I have tried has failed.
I get m_szFilename and modify it and UpdateData(FALSE), the filename on
the dialog does not change. I redraw the dialog, no luck.

Can somebody tell me how I can do this?

Reza Razavipour
Biles & Associates
reza_r@need.biles.com



Paul Martinsen -- pmartinsen@hort.cri.nz
Monday, February 03, 1997

> Environment:  NT 4.0 , VC++ 4.1 
> 
> I have subclassed from CFileDialog.  I want to provide the following feature.
:
: 
> To do this I have overriden OnTypeChange method. In this function I want
> to do the file extension modification. Whatever I have tried has failed.
> I get m_szFilename and modify it and UpdateData(FALSE), the filename on

I think you have to over-ride the PARENT of the window that you get
in hook function. Have a look at the window stucture of the open
filename dialog using Spy++, and I think you'll be able to see whats
going on.
Paul.




| Вернуться в корень Архива |