DDX member variables are not updated in Customized Open File Dialog 
Author Message
 DDX member variables are not updated in Customized Open File Dialog

I Have a customized Open file dialog that I use to select a file to be
sent over the internet. I added 4 edit boxes to the dialog for host
name, path, user name and password. When I call DoModal (), all the
default values are placed into their proper controls as expected,
however, when I click the button (formerly known as Open) to close the
dialog, my DoDataExchange () is never called and my new member variables
are never updated. Everything that is specific to the Open File dialog
still works fine. Only my new members are not updated. For now I solved
the problem by mapping the EN_UPDATE message for each edit box. I don't
like doing it this way. My new dialog is a child window of the Open file
dialog so I know which DoDataExchange () is being called. There has got
to be a way to get my DoDataExchange () to be called from the parent
Open File dialog?

I've created this new dialog per the example in Inside Visual C++ 5.0
from Microsoft Press. Unfortunately, it doesn't deal with any data
exchanges like this. It does something similar to what I need to do with
EN_UPDATE.

The only help I found so far was Knowledge Base article Q117607, but it
isn't the same problem.

Any help would be greatly apreciated.

Thanx in advance.
Dave.

--
David J. Rager


http://www.*-*-*.com/ ~djrst14

Every turkey dies...
   Not every turkey truly lives.



Sun, 05 Nov 2000 03:00:00 GMT  
 DDX member variables are not updated in Customized Open File Dialog

Quote:

>I Have a customized Open file dialog that I use to select a file to be
>sent over the internet. I added 4 edit boxes to the dialog for host
>name, path, user name and password. When I call DoModal (), all the
>default values are placed into their proper controls as expected,
>however, when I click the button (formerly known as Open) to close the
>dialog, my DoDataExchange () is never called and my new member variables
>are never updated.

[...]

I believe overriding OnFilenameOk() and calling UpdateData(TRUE); there is
as close as you can get to "normal" dialog behaviour.

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*NEW*: Retriever 1.1 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sun, 05 Nov 2000 03:00:00 GMT  
 DDX member variables are not updated in Customized Open File Dialog

Did you call CDialog::UpdateData() in your overwritten OnOK()???


Quote:
>I Have a customized Open file dialog that I use to select a file to be
>sent over the internet. I added 4 edit boxes to the dialog for host
>name, path, user name and password. When I call DoModal (), all the
>default values are placed into their proper controls as expected,
>however, when I click the button (formerly known as Open) to close the
>dialog, my DoDataExchange () is never called and my new member variables
>are never updated. Everything that is specific to the Open File dialog
>still works fine. Only my new members are not updated. For now I solved
>the problem by mapping the EN_UPDATE message for each edit box. I don't
>like doing it this way. My new dialog is a child window of the Open file
>dialog so I know which DoDataExchange () is being called. There has got
>to be a way to get my DoDataExchange () to be called from the parent
>Open File dialog?

>I've created this new dialog per the example in Inside Visual C++ 5.0
>from Microsoft Press. Unfortunately, it doesn't deal with any data
>exchanges like this. It does something similar to what I need to do with
>EN_UPDATE.

>The only help I found so far was Knowledge Base article Q117607, but it
>isn't the same problem.

>Any help would be greatly apreciated.

>Thanx in advance.
>Dave.

>--
>David J. Rager


>http://www.pitt.edu/~djrst14

>Every turkey dies...
>   Not every turkey truly lives.



Mon, 06 Nov 2000 03:00:00 GMT  
 DDX member variables are not updated in Customized Open File Dialog

Yes I did. Using TRACE statements I found that my OnOK () never gets
called either.

Quote:

> Did you call CDialog::UpdateData() in your overwritten OnOK()???

[snip]

--
David J. Rager


http://www.pitt.edu/~djrst14

Every turkey dies...
   Not every turkey truly lives.



Mon, 06 Nov 2000 03:00:00 GMT  
 DDX member variables are not updated in Customized Open File Dialog

Sweet! That did the trick. Thanx.

Dave.

Quote:

> [...]

> I believe overriding OnFilenameOk() and calling UpdateData(TRUE); there is
> as close as you can get to "normal" dialog behaviour.

--
David J. Rager


http://www.pitt.edu/~djrst14

Every turkey dies...
   Not every turkey truly lives.



Mon, 06 Nov 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Customizing Open File Dialog -- am I right?

2. Customizing Open File Dialog -- am I right?

3. Customized File Open Dialog

4. Customized File Open/Save Dialog problem

5. Customize standard file open dialog list view control

6. customizing Open File Dialog...

7. Problem with customized File Open Dialog

8. Using class members as DDX variables

9. Trying to update a view with DDX variables?

10. Trying to update a view with DDX variables

11. Common Open Dialog not displaying a dialog when file doesn't exist

12. DDX/DDV not being generated when adding member vars

 

 
Powered by phpBB® Forum Software