| Phiru (105) | |
|
I have a dialog and I add a static controller on the dig. The dig class has a OnLButtonDown event and with it i can move the dialog window. However, when I click the static controller I added, OnLButtondown Event doesn't work(Of course). So I can't move my dig window. So, in static controller class, I tried doing like this.(it has an error) void MyStatic::OnLButtonDown(UINT nFlags, CPoint point) { CWnd *pParent = GetParent(); pParent->OnLButtonDown(nFlags, point); } OnLButtonDown is proctected Method. I can't access from myStatic class. Anyways, I want to notify event to parent class. How can I do that?? Thanks. | |
|
|
|
| freddie1 (847) | |
| I wish I knew what a 'static controller' was! | |
|
|
|
| modoran (1245) | |
| Maybe it is refering to a "static control". | |
|
|
|
| nedo (31) | |
|
I don't have experience with mfc but couldn't just use pParent->SendMessage ? You send the message to the parent so the parent is the one that handles the click instead of the control itself. http://msdn.microsoft.com/en-US/library/t64sseb3(v=vs.80).aspx | |
|
|
|