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. Click on Edit Control??

Click on Edit Control??

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 4 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.
  • H Offline
    H Offline
    Hachaso
    wrote on last edited by
    #1

    What event is sent when I click on an Edit Control that is in a Dialog box? I want a messagebox to appear when I click on the edit control. Thanks!

    T T 2 Replies Last reply
    0
    • H Hachaso

      What event is sent when I click on an Edit Control that is in a Dialog box? I want a messagebox to appear when I click on the edit control. Thanks!

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      i think this is not the right answer, but you could try with EN_SETFOCUS


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      1 Reply Last reply
      0
      • H Hachaso

        What event is sent when I click on an Edit Control that is in a Dialog box? I want a messagebox to appear when I click on the edit control. Thanks!

        T Offline
        T Offline
        Tim Smith
        wrote on last edited by
        #3

        You can detect focus change via EN_SET/KILLFOCUS. However, to capture LBUTTONDWN, you will need to subclass the edit box. Tim Smith I'm going to patent thought. I have yet to see any prior art.

        H 1 Reply Last reply
        0
        • T Tim Smith

          You can detect focus change via EN_SET/KILLFOCUS. However, to capture LBUTTONDWN, you will need to subclass the edit box. Tim Smith I'm going to patent thought. I have yet to see any prior art.

          H Offline
          H Offline
          Hachaso
          wrote on last edited by
          #4

          Do you mean that I capture EN_SETFOCUS... display the messagebox and then with SendMessage deliver EN_KILLFOCUS. Cause I tryed to capture EN_SETFOCUS and I manage to display the messagebox but it appears 2 times in a row.. strange.

          A 1 Reply Last reply
          0
          • H Hachaso

            Do you mean that I capture EN_SETFOCUS... display the messagebox and then with SendMessage deliver EN_KILLFOCUS. Cause I tryed to capture EN_SETFOCUS and I manage to display the messagebox but it appears 2 times in a row.. strange.

            A Offline
            A Offline
            Alexander M
            wrote on last edited by
            #5

            EN_SETFOCUS has the problem that it is also sent when you select the edit box via the tab button! Don't try it, just do it! ;-)

            H 1 Reply Last reply
            0
            • A Alexander M

              EN_SETFOCUS has the problem that it is also sent when you select the edit box via the tab button! Don't try it, just do it! ;-)

              H Offline
              H Offline
              Hachaso
              wrote on last edited by
              #6

              Well I used EN_SETFOCUS but ans I wrote before I get the messagebox 2 times. I only want it to appear when I click on the Edit Control.

              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