Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is handle to the CFileDialog Dropdown control created when we type in the FileName control?

0
Posted

What is handle to the CFileDialog Dropdown control created when we type in the FileName control?

0

Adding a custom message proc via m_ofn.lpfnHook will not work. It gets called when an item in the list control is clicked, or when the “file types” combo gets dropped down, but not for messages going to the filename combo. OK. The following code achieves what you are after. Every time the text in the edit control part of the combo box changes, I TRACE a message. You can of course do what you want here; eg disable OK button etc. This covers what you originally stated that you wanted. I achieve this by uisng a technique similar to what MFC does when creating, say, a frame window. I set a hook immediately before creating my file dialog. When the hook function gets called, I swap the window procedure of the created window with my own one, which specifically handles the event of the text in a combo changing (I just TRACE a message). This is OK to do since there is only one combo of style drop down, (not drop list), which is the filename one, but if this becomes a problem, we could always ch

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123