Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Want to know the control id of the CFileDialog

Posted on 2001-09-05
4
Medium Priority
?
464 Views
Last Modified: 2013-11-20
Hi, experts,

I want to know the control id of the save button in the CFileDialog, so that I can disable the "save" button in some occasions.

Any expert knows the id or how to get the id?

Also does any expert know how to get a message or notification when the user "edit" the filename, not that when he clicks a file name. in the latter circumstance, the cfiledialog has a virtual handler. but in the former one, no such handler. i am currently use timer to check if the user has "edited" the filename. but it is obviously a not good method.

thank you.

shen1967
0
Comment
Question by:shen1967
  • 2
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
BogdyPtr earned 400 total points
ID: 6459843
The ID of save button is 1. The id of edit is 480. To find out when the user edits the filename subclass the window and override on change. To find others Id's use Spy++.
0
 

Author Comment

by:shen1967
ID: 6459886
Thank you Dear Mr. BogdyPtr
The first question has been solved. Very Good.
Regarding to the second one, to be honest, I
don't have any knowledge of subclass.
If your time permitted, I wish I could have your further help.
But anyway, you have helped me solved the first one. Therefore, I would like to accept your answer.
Thank you.
shen 1967
0
 

Author Comment

by:shen1967
ID: 6459888
Thank you Dear Mr. BogdyPtr
The first question has been solved. Very Good.
Regarding to the second one, to be honest, I
don't have any knowledge of subclass.
If your time permitted, I wish I could have your further help.
But anyway, you have helped me solved the first one. Therefore, I would like to accept your answer.
Thank you.
shen 1967
0
 
LVL 2

Expert Comment

by:BogdyPtr
ID: 6459972
Look at CWnd::SubclassWindow function. Create a CEdit derived class object and call the CEdit derived class SubclassWindow function with the HWND of the edit control. This way all the messages that the edit control recives will route throught the CEdit class.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

916 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