Solved

Want to know the control id of the CFileDialog

Posted on 2001-09-05
4
429 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 119
WinWaitActive parameters 12 31
sumHeights  challenge 17 83
Problem to App 4 145
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

759 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