Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MFC problem: linking dialog event handlers with document data :-)

Status
Not open for further replies.

sntpaul

Programmer
Jan 31, 2003
4
GB
hi all

i am having some trouble with linking dialog events to my document data.

my view class creates a modeless dialog when a menu option is selected. from this dialog, a button may be pressed. i want to be able to have that event handler access data in the document class, but i can't get at document data if the event handler is in the dialog class. i tried putting the event handler in the view class but the message maps didnt work - ie the function was not getting called.

i would be very grateful if anyone could advise me on how to go about this. i would like to do it the best and most practiced way.

thanks,

Paul
 
Hit the FAQs tab above and read my FAQ on Windows Messaging - it's under 'programming'.
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
If you create MFC projects just press ctrl+w and add a class associated with the dialog and associate each control with variables using the wizards. Ion Filipski
1c.bmp


filipski@excite.com
 
You can pass a pointer to your document class to the dialog and get at the data via that pointer.
Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top