Solved

Want to know the control id of the CFileDialog

Posted on 2001-09-05
4
409 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

9 Experts available now in Live!

Get 1:1 Help Now