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. Be notified of the input focus

Be notified of the input focus

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • D Offline
    D Offline
    De Nardis Andrea
    wrote on last edited by
    #1

    Hi all, I have a dialog that have to do something when it gains the focus. The dialog is derived by CDialog and contains some controls. I tried w/ CWnd::OnKillFocus and CWnd::OnSetFocus but my overloaded funcs are never called. The func CWnd::OnLButtonDown works well but I also need to know when the dialog loses the input. Could you please help me? Thanx a lot. Best regards, Andrea :)

    D 1 Reply Last reply
    0
    • D De Nardis Andrea

      Hi all, I have a dialog that have to do something when it gains the focus. The dialog is derived by CDialog and contains some controls. I tried w/ CWnd::OnKillFocus and CWnd::OnSetFocus but my overloaded funcs are never called. The func CWnd::OnLButtonDown works well but I also need to know when the dialog loses the input. Could you please help me? Thanx a lot. Best regards, Andrea :)

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      De Nardis Andrea wrote: I have a dialog that have to do something when it gains the focus. Check out the WM_ACTIVATE and/or WM_ACTIVATEAPP messages.


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      D 1 Reply Last reply
      0
      • D David Crow

        De Nardis Andrea wrote: I have a dialog that have to do something when it gains the focus. Check out the WM_ACTIVATE and/or WM_ACTIVATEAPP messages.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        D Offline
        D Offline
        De Nardis Andrea
        wrote on last edited by
        #3

        Hi David, unfortunately it does not work. My dialog is a window inside a frame in a SDI application. I checked w/ Spy++ and it does not receive any WM_ACTIVATE msg. Have u got any idea? Sorry if I am annoying u w/ silly question. Thanx a lot. Bye, Andrea:)

        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