How can i use send message from one view to the other ?
Hi,
I have created two child frames with two document templates.
when i click on new, two child views are created.one with CView and other with CFormView. I want to access the methods of one view from the other.Can i send/post a message form one view to the the other. But while using Post/Send Message it is not resopnding. I have created an object of the class and tried to call the member functions of the other but it gives error message that : Illigal call to non-static member functions. ?
How can i send Message or call the member function of the other ?
Re: How can i use send message from one view to the other ?
You can send messages between windows knowing window’s handle. The same effect in MFC is achieved by calling member functions of the class using pointer or reference of the class.
I (and nobody in the whole world) do not know how did you call member function since you have not posted any code.
Originally posted by muna_utkal
I have created an object of the class and tried to call the member functions of the other but it gives error message that : Illigal call to non-static member functions.
This is very confusing. What do you mean by “created an object of the class”?
From your post I can assume that you are trying to do something like CSomeView::SomeFunction() and SomeFunction is not static, but this is the only conclusion I can come up with reading your post.
There are only 10 types of people in the world: Those who understand binary and those who do not.
Re: How can i use send message from one view to the other ?
same prblem i want to call pretaranslate or class member function from calback
class::updatestatus()
{
}
class:retranslate()
{
}
LRESULT CALLBACK LLKeyboardProc( int nCode,WPARAM wParam,LPARAM lParam )
{
// call Pretranslate so i think use sendmessge but we dnt get hwnd
// and i also want to call updatestatus()
}
if we create object f class and call it then it crash in constructor so please try to help guide by using pointer or any other method so constructor od this class wnt call
Bookmarks