How can i use send message from one view to the other ?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: How can i use send message from one view to the other ?

  1. #1
    Join Date
    Jan 2003
    Location
    NEW DELHI
    Posts
    37

    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 ?

    Plz Help me ?

  2. #2
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,915

    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.

  3. #3
    Join Date
    Feb 2002
    Posts
    5,758
    Post a simple design of the program, i.e. how many views?

    Kuphryn

  4. #4
    Join Date
    Jun 2006
    Posts
    2

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center