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. Any problems with ON_MESSAGE in Visual C++ 8?

Any problems with ON_MESSAGE in Visual C++ 8?

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiobusinessquestion
4 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.
  • S Offline
    S Offline
    SanjaySMK
    wrote on last edited by
    #1

    Hello, Previously my code was in Visual C++ 6.0, where ON_MESSAGE was running fine, with me religiously fulfilling all its requirements, i.e. return type was LRESULT, parameters to my function were WPARAM and LPARAM. But the same code, when I converted to VS 2005, the program only compiles and the DLL gets created, but ON_MESSAGE macro seem to be failing? My user defined message does not get called at all. Is a change needed in how I write ON_MESSAGE macro? Please suggest the remedy. thanks in advance.

    Software Developer Sanjay Khapre

    J 1 Reply Last reply
    0
    • S SanjaySMK

      Hello, Previously my code was in Visual C++ 6.0, where ON_MESSAGE was running fine, with me religiously fulfilling all its requirements, i.e. return type was LRESULT, parameters to my function were WPARAM and LPARAM. But the same code, when I converted to VS 2005, the program only compiles and the DLL gets created, but ON_MESSAGE macro seem to be failing? My user defined message does not get called at all. Is a change needed in how I write ON_MESSAGE macro? Please suggest the remedy. thanks in advance.

      Software Developer Sanjay Khapre

      J Offline
      J Offline
      Jijo Raj
      wrote on last edited by
      #2

      SanjaySMK wrote:

      My user defined message

      How do you create your user defined message? Regards, Jijo.

      _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

      S 1 Reply Last reply
      0
      • J Jijo Raj

        SanjaySMK wrote:

        My user defined message

        How do you create your user defined message? Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        S Offline
        S Offline
        SanjaySMK
        wrote on last edited by
        #3

        Hi, either by using enum or by # define e.g. enum { WM_DOCLISTDCLICKED = WM_APP+1, WM_DOCLISTCLICKED = WM_APP+2 }; OR # define WM_DOCLISTDCLICKED WM_APP+1 # define WM_DOCLISTCLICKED WM_APP+2

        Software Developer Sanjay Khapre

        modified on Friday, January 2, 2009 7:42 AM

        J 1 Reply Last reply
        0
        • S SanjaySMK

          Hi, either by using enum or by # define e.g. enum { WM_DOCLISTDCLICKED = WM_APP+1, WM_DOCLISTCLICKED = WM_APP+2 }; OR # define WM_DOCLISTDCLICKED WM_APP+1 # define WM_DOCLISTCLICKED WM_APP+2

          Software Developer Sanjay Khapre

          modified on Friday, January 2, 2009 7:42 AM

          J Offline
          J Offline
          Jijo Raj
          wrote on last edited by
          #4

          Well, i was just curious that whether you was using the obsolete WM_USER for defining you messages. The ON_MESSAGE is changed in VS 2005[^]. Well, could you please post your message map and relevant code snippet? Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          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