Solved

Want to know the control id of the CFileDialog

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 94
Need Help INsttalling wget on Mavericks OS X 3 90
Add content to output file 4 62
Pressing cancel button with C# UI Automation 3 51
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: 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. …
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.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now