CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2006
    Location
    Argentina
    Posts
    37

    Diference between notifications and messages

    Hi people!.

    This question is about a theoric matter....like the title says: what's is the the diference between both. I know that messages are produced by diferents types of events (origing by humans or the pass of time or ect), and the OS system determines to what window belong, then he (OS) put the message on a message queue of a thread that create the window or he call directly the callback function of the window (in most cases this happen, cuz we call the SendMessage function inside the thread that creates the windows, so the window callback procedure is called immediately as a subroutine). In a practical level the messages have only to be catched inside the window callback procedure and be processed.

    Okey..that is what i get from diferent sources (and i think that is allright, in any case please correct me)....now about notifications..i really don't know what are...

    If the matters is long to explain, well if someones know about a link or something please tell me.

    Thanks very much & Good luck!!
    Vitucho!!

  2. #2
    Join Date
    Apr 2005
    Location
    Norway
    Posts
    3,934

    Re: Diference between notifications and messages

    Ok, English isn't my native language, but from a programmers point of view the two terms are used rather interchangeably. AFAIK the word 'message' refers to the actual information that is passed, whereas 'notification' referes to the act of passing information.

    - petter

  3. #3
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: Diference between notifications and messages

    Practically speaking, notifications are the "messages" you get through the WM_NOTIFY message. In my experience, notifications are usually sent to the parent window when a child window receives a message. For example:
    Code:
    //This is inside a child window's proc
    
    case WM_LBUTTONDOWN:
      //The user clicked on the client area, see what 
    //happened and where and then notify the parent window
      SendMessage(parentWindow, WM_NOTIFY, 0, (LPARAM)someStructure);
    Last edited by kkez; February 15th, 2007 at 02:17 PM.

  4. #4
    Join Date
    May 2006
    Location
    Argentina
    Posts
    37

    Re: Diference between notifications and messages

    okey thanks to both.

    but kkez in theory what's a notification? for example, it has the same behavior of the messages when we send or post messages from one thread to other...

    Thanks again & hope with luck!!
    cya Vitucho!

  5. #5
    Join Date
    Sep 2004
    Location
    Italy
    Posts
    389

    Re: Diference between notifications and messages

    I don't quite understand what you mean with "message behavior". You can send messages across threads or processes, and since notifications are sent through WM_NOTIFY, this applies to notifications too...

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured