Handling Button's Events
-
I needed to handle dialog button's events like WM_MOUSEMOVE and WM_RBUTTONDOWN, so i created a new class inherited form CButton and handled the events easily but the problem is that i couldn't find a way to access the parent dialog's functions so that i can change the dialog's properties, like for example changing a static text. Is there any way to hadle button's events and enable data exchange with the parent dialog?
-
I needed to handle dialog button's events like WM_MOUSEMOVE and WM_RBUTTONDOWN, so i created a new class inherited form CButton and handled the events easily but the problem is that i couldn't find a way to access the parent dialog's functions so that i can change the dialog's properties, like for example changing a static text. Is there any way to hadle button's events and enable data exchange with the parent dialog?
GetParent will give you a pointer to the parent dialog CWnd class. You can then cast it to your dialog class.
CParentDialog* pParent = (CParentDialog*) GetParent();