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. Managed C++/CLI
  4. How to correctly WM_COPYDATA

How to correctly WM_COPYDATA

Scheduled Pinned Locked Moved Managed C++/CLI
helpcsharpc++tutorialquestion
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.
  • G Offline
    G Offline
    gapfulgence
    wrote on last edited by
    #1

    Hi, I'm struggling with a problem. I want to catch a 'WM_COPYDATA' event that occurs in a C# application. I send a data from a C++ application. The bridge is correctly done I think. So, sometimes it works, usually when my C# application is active. But most of the time, it doesn't work, because when trying to catch the appropriate WM_COPYDATA message in WndProc overrided method of my C# application, the program stays catching a couple of other messages like: WM_WINDOWPOSCHANGED, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_ACTIVATE and so on. Doing so, it almost never catch the WM_COPYDATA message that I sent from my C++ application. Can you help me please ? Thanks. P.S.: I catch messages in my C# application like this: protected override void WndProc(ref Message m) { string g = m.ToString(); if (m.Msg == WM_COPYDATA) { // instructions. } }

    p.f. Goudjo-Ako Bringing our energy together !

    M 1 Reply Last reply
    0
    • G gapfulgence

      Hi, I'm struggling with a problem. I want to catch a 'WM_COPYDATA' event that occurs in a C# application. I send a data from a C++ application. The bridge is correctly done I think. So, sometimes it works, usually when my C# application is active. But most of the time, it doesn't work, because when trying to catch the appropriate WM_COPYDATA message in WndProc overrided method of my C# application, the program stays catching a couple of other messages like: WM_WINDOWPOSCHANGED, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_ACTIVATE and so on. Doing so, it almost never catch the WM_COPYDATA message that I sent from my C++ application. Can you help me please ? Thanks. P.S.: I catch messages in my C# application like this: protected override void WndProc(ref Message m) { string g = m.ToString(); if (m.Msg == WM_COPYDATA) { // instructions. } }

      p.f. Goudjo-Ako Bringing our energy together !

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      You should ask this on the C# board[^] Mark

      "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

      G 1 Reply Last reply
      0
      • M Mark Salsbery

        You should ask this on the C# board[^] Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        G Offline
        G Offline
        gapfulgence
        wrote on last edited by
        #3

        Thanks Mark, I dit it.

        p.f. Goudjo-Ako Bringing our energy together !

        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