Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How Much of WM_USER+X is used by MFC

How Much of WM_USER+X is used by MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++loungeworkspace
9 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bram van Kampen
    wrote on last edited by
    #1

    Well, Using MFC, in a multithreaded environment, communication via SendMessage(...) is an essential. Trying to sculpt WDK Messages for my own purpose. Use WM_USER+x, Major Crash,turned out, WM_USER+x was already used by MFC42 in a control I used in my Dialog! has Anyone any idea what the range of messages are used or reserved by MFC in general, and what the Real Message range is, available to MFC developers.

    ++"#define WM_MFC_USERS 0xABXD1234

    Or, something of that kind in some header somewhere. If this is the case, please let me know the Name and the value of the macro is. Regards :)

    Bram van Kampen

    J L 2 Replies Last reply
    0
    • B Bram van Kampen

      Well, Using MFC, in a multithreaded environment, communication via SendMessage(...) is an essential. Trying to sculpt WDK Messages for my own purpose. Use WM_USER+x, Major Crash,turned out, WM_USER+x was already used by MFC42 in a control I used in my Dialog! has Anyone any idea what the range of messages are used or reserved by MFC in general, and what the Real Message range is, available to MFC developers.

      ++"#define WM_MFC_USERS 0xABXD1234

      Or, something of that kind in some header somewhere. If this is the case, please let me know the Name and the value of the macro is. Regards :)

      Bram van Kampen

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      WM_USER is obsolete. Use WM_APP instead. Or better use registered messages. A good description about this topic can be found in the CodeProject article Message Management[^].

      1 Reply Last reply
      0
      • B Bram van Kampen

        Well, Using MFC, in a multithreaded environment, communication via SendMessage(...) is an essential. Trying to sculpt WDK Messages for my own purpose. Use WM_USER+x, Major Crash,turned out, WM_USER+x was already used by MFC42 in a control I used in my Dialog! has Anyone any idea what the range of messages are used or reserved by MFC in general, and what the Real Message range is, available to MFC developers.

        ++"#define WM_MFC_USERS 0xABXD1234

        Or, something of that kind in some header somewhere. If this is the case, please let me know the Name and the value of the macro is. Regards :)

        Bram van Kampen

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        WM_USER+x should only ever be used inside a single application, as it is free to use by everyone. Using it in a driver is almost bound to cause tears before bedtime. [edit] WM_USER (Windows)[^] and WM_APP (Windows)[^] list the rules. [/edit]

        B 2 Replies Last reply
        0
        • L Lost User

          WM_USER+x should only ever be used inside a single application, as it is free to use by everyone. Using it in a driver is almost bound to cause tears before bedtime. [edit] WM_USER (Windows)[^] and WM_APP (Windows)[^] list the rules. [/edit]

          B Offline
          B Offline
          Bram van Kampen
          wrote on last edited by
          #4

          Thanks, I am aware of RegisterMessage(...) etc, but have always considered it as a canon to shoot a fly. It may be the better Idea for future, particularly after the nightmare I encounter now. Your idea of attaching a GUID is particularly fetching. WM_USER +X, It worked for me many a time in the past. I can now see the flaws Thanks, Bram. :)

          Bram van Kampen

          L 1 Reply Last reply
          0
          • L Lost User

            WM_USER+x should only ever be used inside a single application, as it is free to use by everyone. Using it in a driver is almost bound to cause tears before bedtime. [edit] WM_USER (Windows)[^] and WM_APP (Windows)[^] list the rules. [/edit]

            B Offline
            B Offline
            Bram van Kampen
            wrote on last edited by
            #5

            Hi, Good to talk again. My header files do not provide a macro for WM_APP. Maybe you could let me know for future reference, if it is a single value. Also AOP has advised me to Register a Windows Message. Probably the way forward for the Future. Thanks for your contribution. Bram. :)

            Bram van Kampen

            V 1 Reply Last reply
            0
            • B Bram van Kampen

              Thanks, I am aware of RegisterMessage(...) etc, but have always considered it as a canon to shoot a fly. It may be the better Idea for future, particularly after the nightmare I encounter now. Your idea of attaching a GUID is particularly fetching. WM_USER +X, It worked for me many a time in the past. I can now see the flaws Thanks, Bram. :)

              Bram van Kampen

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              :confused:

              J 1 Reply Last reply
              0
              • L Lost User

                :confused:

                J Offline
                J Offline
                Jochen Arndt
                wrote on last edited by
                #7

                It looks like a reply to my answer posted to yours inadvertently.

                L 1 Reply Last reply
                0
                • J Jochen Arndt

                  It looks like a reply to my answer posted to yours inadvertently.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  I don't know what Bram is smoking these days, but I think he should cut down. ;)

                  1 Reply Last reply
                  0
                  • B Bram van Kampen

                    Hi, Good to talk again. My header files do not provide a macro for WM_APP. Maybe you could let me know for future reference, if it is a single value. Also AOP has advised me to Register a Windows Message. Probably the way forward for the Future. Thanks for your contribution. Bram. :)

                    Bram van Kampen

                    V Offline
                    V Offline
                    Victor Nijegorodov
                    wrote on last edited by
                    #9

                    WM_APP (Windows)[^]

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups