Message for a window in which the destination is another window

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Message for a window in which the destination is another window

      I would need an explanation about the destination of the messages.
      The WM_MESSAGE structure has the hWin field described as "Destination window":

      C Source Code

      1. struct WM_MESSAGE {
      2. int MsgId; /* type of message */
      3. WM_HWIN hWin; /* Destination window */
      4. WM_HWIN hWinSrc; /* Source window */
      5. union {
      6. const void * p; /* Some messages need more info ... Pointer is declared "const" because some systems (M16C) have 4 byte const, byte 2 byte default ptrs */
      7. int v;
      8. GUI_COLOR Color;
      9. } Data;
      10. };

      Also, the functions for sending messages (e. g. WM_SendMessage) have the hWin parameter used to indicate the target window (or at least that's what I understood).

      Could you give me an example in which the hWin field of the structure and the hWin parameter of the functions are populated differently? When can such a case be useful or indispensable?

      best regards
      Max