Click here to Skip to main content
16,016,140 members

Comments by Member 13916604 (Top 8 by date)

Member 13916604 27-Aug-18 12:44pm View    
To keep you in touch, I implemented OnActivateView in my view and sent a message to the mainframe.
I don't know if it is the smartest and cleanest solution, but... it works :)
Member 13916604 27-Aug-18 5:38am View    
Thank you Richard for your answer.
In this case, do you know a different way to be inform about view change of my splitter window?
Member 13916604 25-Aug-18 6:29am View    
Job is done in this way ^^
Thank you for your support and explanations
Member 13916604 9-Aug-18 7:33am View    
Jochen,

Your first proposal is what I've done, but I would like to keep doc functions private.

I am trying your second proposal which is exactly what I am looking for.
If my handler function is in CMainFrame it works, but not in doc.

Here is my doc's message map:
ON_MESSAGE(WM_MSG, OnMyMsg)

But, I have the following cast issue:
error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall CMyDoc::* )(WPARAM,LPARAM)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'

I tried to force cast using reinterpret_cast<LRESULT (CWnd::*)(WPARAM, LPARAM)>(); it compiles, but my function is not called.

Perhaps, I missed something...
Member 13916604 8-Aug-18 4:58am View    
Sorry, I read your answer a little fast and didn't catch your point