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#
  4. Can C# register my own windows message Like VC++ do?

Can C# register my own windows message Like VC++ do?

Scheduled Pinned Locked Moved C#
tutorialcsharpc++question
3 Posts 2 Posters 0 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.
  • F Offline
    F Offline
    fu0
    wrote on last edited by
    #1

    in VC++, i can register my own windows message and map it.Can it be done in C# ? for example, processing WndProc() function: protected ovrerride WndProc(ref Message Msg) { switch (Msg.MsgID) { case MY_OWN_MSG: dosomething(); break; } base.WndProc(ref Msg); } How to register "MY_OWN_MSG" so that my other C++ application could use it ?

    D 1 Reply Last reply
    0
    • F fu0

      in VC++, i can register my own windows message and map it.Can it be done in C# ? for example, processing WndProc() function: protected ovrerride WndProc(ref Message Msg) { switch (Msg.MsgID) { case MY_OWN_MSG: dosomething(); break; } base.WndProc(ref Msg); } How to register "MY_OWN_MSG" so that my other C++ application could use it ?

      D Offline
      D Offline
      DRVoodoo
      wrote on last edited by
      #2

      I never coded C++ so correct me if i didn't understand exactly what u meant. From the looks of that code you may want to create a class library and compile it into a DLL which then you can use later in other applications by calling the DLL with the 'using' Keyword and then reffering to the MY_OWN_MSG in that DLL.

      F 1 Reply Last reply
      0
      • D DRVoodoo

        I never coded C++ so correct me if i didn't understand exactly what u meant. From the looks of that code you may want to create a class library and compile it into a DLL which then you can use later in other applications by calling the DLL with the 'using' Keyword and then reffering to the MY_OWN_MSG in that DLL.

        F Offline
        F Offline
        fu0
        wrote on last edited by
        #3

        i am writting a C++ DLL in which i want to send my own windows msg to other app. Like this: // C++ Code #define MY_OWN_MSG value PostMessage(hWnd,MY_OWN_MSG,0,0); //////////////////////////////// the MY_OWN_MSG must be registered to a windows message. How to Register a windows message in C# ?

        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