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. PreProcessMessage

PreProcessMessage

Scheduled Pinned Locked Moved C#
question
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
    Sabry1905
    wrote on last edited by
    #1

    Hi All i am trying to override the PreProcessMessage for the form and i am using this code public override bool PreProcessMessage(ref Message msg) { switch (msg.Msg) { case WM_RBUTTONDOWN: return true; default: return base.PreProcessMessage(ref msg); } } but this code never been called i am wondering, why ?

    A 1 Reply Last reply
    0
    • S Sabry1905

      Hi All i am trying to override the PreProcessMessage for the form and i am using this code public override bool PreProcessMessage(ref Message msg) { switch (msg.Msg) { case WM_RBUTTONDOWN: return true; default: return base.PreProcessMessage(ref msg); } } but this code never been called i am wondering, why ?

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      Do you call the code yourself? If not then i can't see you being able to get the return value from it. Are you sure you don't mean to override WndProc?

      My current favourite word is: Bauble!

      -SK Genius

      S 1 Reply Last reply
      0
      • A Anthony Mushrow

        Do you call the code yourself? If not then i can't see you being able to get the return value from it. Are you sure you don't mean to override WndProc?

        My current favourite word is: Bauble!

        -SK Genius

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

        This method should be called by the by the framework, and i dont want to override the WndProc

        S 1 Reply Last reply
        0
        • S Sabry1905

          This method should be called by the by the framework, and i dont want to override the WndProc

          S Offline
          S Offline
          Sabry1905
          wrote on last edited by
          #4

          is there any one can help ?

          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