Event or funtion after click "open" button in dialog "Open,Save,Save as"
-
Iam using MFC .I have a problem about it .I want to question about event or funtion after clik "open" button in dialog "Open,Save,Save as".Please. Thanks
nvphap wrote:
I want to question about event or funtion after clik "open" button...
You need to assign a handler to the
BN_CLICKED
message. If you have VS6, use ClassWizard (Ctrl+W)."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
nvphap wrote:
I want to question about event or funtion after clik "open" button...
You need to assign a handler to the
BN_CLICKED
message. If you have VS6, use ClassWizard (Ctrl+W)."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Is that possible? I mean he is talking about
CFileDialog
...If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Is that possible? I mean he is talking about
CFileDialog
...If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeI assumed he was talking about the button that would construct a
CFileDialog
object. In any case, a hook can be provided to handle the clicking of the OK or Open button before the Open dialog is dismissed."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Iam using MFC .I have a problem about it .I want to question about event or funtion after clik "open" button in dialog "Open,Save,Save as".Please. Thanks
nvphap wrote:
I want to question about event or funtion after clik "open" button in dialog "Open,Save,Save as".
When you click the Open button on such a dialog,
DoModal()
will return. You then have access to whatever file was selected by the user."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
nvphap wrote:
I want to question about event or funtion after clik "open" button...
You need to assign a handler to the
BN_CLICKED
message. If you have VS6, use ClassWizard (Ctrl+W)."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
please,give me a way to post images .I think that it will easier for we understand together
There are tons of Web sites that allow this. Have you searched for one?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I assumed he was talking about the button that would construct a
CFileDialog
object. In any case, a hook can be provided to handle the clicking of the OK or Open button before the Open dialog is dismissed."Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
In any case, a hook can be provided to handle the clicking of the OK or Open button before the Open dialog is dismissed.
Actually I thought about that solution. Probably he can also roll his own class derived by
CFileDialog
and then override whatever he needs. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Iam using MFC .I have a problem about it .I want to question about event or funtion after clik "open" button in dialog "Open,Save,Save as".Please. Thanks
If you need to get access to this "event" BEFORE the file dialog is dismissed, you may need to hook the dialog. Look up the
OFN_ENABLEHOOK
flag for more information. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
Iam using MFC .I have a problem about it .I want to question about event or funtion after clik "open" button in dialog "Open,Save,Save as".Please. Thanks
An easier solution was already presented to you in your previous post (not by me). Why make it more difficult by having to hook the dialog? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: