Common dialog 
Author Message
 Common dialog

I use microsoft common dialog control.
If the code is following

CCommonDialog m_Dialog1;
m_Dialog1.ShowSave();

How I know what button the user have pushed (save or
cancel).



Sun, 11 Sep 2005 09:57:51 GMT  
 Common dialog
That sounds like a VB function.  Perhaps you meant to use a CFileDialog
object.


Quote:
> I use microsoft common dialog control.
> If the code is following

> CCommonDialog m_Dialog1;
> m_Dialog1.ShowSave();

> How I know what button the user have pushed (save or
> cancel).



Sun, 11 Sep 2005 14:52:43 GMT  
 Common dialog
You can do this by overriding clicks of each of the buttons in your dialog
class. Save the state of these buttons when exiting and then you can access
it from the object.

--
Ajay Kalra [MVP - VC++]


Quote:
> I use microsoft common dialog control.
> If the code is following

> CCommonDialog m_Dialog1;
> m_Dialog1.ShowSave();

> How I know what button the user have pushed (save or
> cancel).



Sun, 11 Sep 2005 19:35:01 GMT  
 Common dialog
CCommonDialog is the base class of CFileDialog,
CFontDialog and a couple of more common dialogs.
The ShowSave function is not a member of CCommonDialog or
any dialog class that inherits from CCommonDialog.
The dialog is shown by calling DoModal() and the return
value will tell you if the user clicked <OK> or <Cancel>.

To show a "save" dialog some thing like this will do the
trick:
CFileDialog dlg( FALSE ); // FALSE means Save, TRUE Open
if( dlg.DoModal() == IDOK )
{
    // The user clicked OK, do your stuff

Quote:
}

--
Rog

Quote:
>-----Original Message-----
>You can do this by overriding clicks of each of the

buttons in your dialog
Quote:
>class. Save the state of these buttons when exiting and
then you can access
>it from the object.

>--
>Ajay Kalra [MVP - VC++]



>> I use microsoft common dialog control.
>> If the code is following

>> CCommonDialog m_Dialog1;
>> m_Dialog1.ShowSave();

>> How I know what button the user have pushed (save or
>> cancel).

>.



Mon, 12 Sep 2005 14:36:57 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. using common dialog HookProc

2. Common Dialog Problem

3. common dialog control directory select

4. ActiveX control like MS Common dialog

5. ATL and Common Dialogs

6. Common Dialogs ...

7. ifstream object and the Common Dialog box

8. Common Dialogs

9. Common Dialog sample problem

10. Common Dialog Box : Directory Select

11. Common Dialogs

12. Modifying common dialogs

 

 
Powered by phpBB® Forum Software