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. WM_KILLFOCUS problem

WM_KILLFOCUS problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
22 Posts 4 Posters 1 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 danginkgo

    In the main window callback function I get the WM_KILLFOCUS message when I click on the window, and only then I get the WM_SETFOCUS message. Is that OK? I thought that WM_KILLFOCUS message is sent to a window immediatly before it looses focus. I want to register some values when the window has keyboard focus and unregister the values when the window looses focus. How can I do that?

    danginkgo

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

    danginkgo wrote:

    I want to register some values when the window has keyboard focus and unregister the values when the window looses focus.

    It sounds like you need to use WM_ACTIVATEAPP instead.

    "Love people and use things, not love things and use people." - Unknown

    "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

    D 1 Reply Last reply
    0
    • D David Crow

      danginkgo wrote:

      I want to register some values when the window has keyboard focus and unregister the values when the window looses focus.

      It sounds like you need to use WM_ACTIVATEAPP instead.

      "Love people and use things, not love things and use people." - Unknown

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      D Offline
      D Offline
      danginkgo
      wrote on last edited by
      #22

      I tried using WM_ACTIVATEAPP message, but I don't get it in the main WindowProc function. Do you have any suggestions?

      danginkgo

      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