Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62184

Use RegisterWindowMessage instead of defining the user level Window Messages to avoid overlapping with other applications

    XMLWordPrintable

Details

    • 7c2850cd8f1029b74d960fad5754320b61176f46 (5.9, 30.7.2017, 5.9.2)

    Description

      qeventdispatcher_win.cpp defines this kind of user Window Messages:

      enum {
          WM_QT_SOCKETNOTIFIER = WM_USER,
          WM_QT_SENDPOSTEDEVENTS = WM_USER + 1,
          WM_QT_ACTIVATENOTIFIERS = WM_USER + 2,
          SendPostedEventsWindowsTimerId = ~1u
      };
      

      Other applications may expect the same user level Window Messages which can lead to unexpected behaviour. This behaviour could be avoided by using RegisterWindowMessage method (https://msdn.microsoft.com/en-us/library/windows/desktop/ms644947(v=vs.85).aspx) which makes the message unique.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              jussi_witick Jussi Witick
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes