sending data between dialog classes
i got a dialog class (mfc of course...) and when a button is pressed it creates a child dialog of another class, how can i make it so i can send data from a text input from the child window back to the parent? this->GetParent()->text="blah" for example (assuming text is a member of the parent dialog class). for some reason it dont like that. im assuming its because any dialog (one with or without the variable in question) could actualy create this dialog. im at a loss here tho, i thought about sending a message to the parent and making it so that it handles the message in the appropriet way... but i doubt thats a good idea...
Bungo!
All you really need for sending messages to another dialog (window, hwnd) is the HWND handle (or the CWnd encapsulation class of MFC). Keep a handle to it when creating your dialog and you can go on sending whatever you want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement