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. How to detect if CEdti lost focus by mouse, keyboard or another event

How to detect if CEdti lost focus by mouse, keyboard or another event

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
4 Posts 3 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.
  • M Offline
    M Offline
    manchukuo
    wrote on last edited by
    #1

    Hi guys i would like to know how to do this i want to make my editing CEdit control know if it lost focus by a mouse click a keyboard hit, a popup window, etc Thx

    C E M 3 Replies Last reply
    0
    • M manchukuo

      Hi guys i would like to know how to do this i want to make my editing CEdit control know if it lost focus by a mouse click a keyboard hit, a popup window, etc Thx

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      i don't think that's possible. any window can grab focus any time it wants, just by calling SetFocus, and it doesn't need to tell anyone why.

      image processing toolkits | batch image processing

      1 Reply Last reply
      0
      • M manchukuo

        Hi guys i would like to know how to do this i want to make my editing CEdit control know if it lost focus by a mouse click a keyboard hit, a popup window, etc Thx

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #3

        Your CEdit will receive a WM_KILLFOCUS, and you could implement a reaction for the message... :)

        virtual void BeHappy() = 0;

        1 Reply Last reply
        0
        • M manchukuo

          Hi guys i would like to know how to do this i want to make my editing CEdit control know if it lost focus by a mouse click a keyboard hit, a popup window, etc Thx

          M Offline
          M Offline
          manchukuo
          wrote on last edited by
          #4

          Ok guys thanks i will have to do something else for this requirement.

          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