Solved

Want to know the control id of the CFileDialog

Posted on 2001-09-05
4
422 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 100 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to include alternate header placement and naming 5 75
ORA-01403: no data found 43 105
countEvens challenge 2 111
Window placement 17 85
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

789 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