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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. KillFocus

KillFocus

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 3 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.
  • A Offline
    A Offline
    ArielR
    wrote on last edited by
    #1

    When I close a Dialog Window by the close windows cross, Its perfom a KillFocus, How can I avoid the code in the KillFocus or detect if the user did a click on close windows and do not perform the Killfocus code... Thanks

    K 1 Reply Last reply
    0
    • A ArielR

      When I close a Dialog Window by the close windows cross, Its perfom a KillFocus, How can I avoid the code in the KillFocus or detect if the user did a click on close windows and do not perform the Killfocus code... Thanks

      K Offline
      K Offline
      khan
      wrote on last edited by
      #2

      I think you can handle the WM_CLOSE message, which comes before any WM_KILLFOCUS message. this is this.

      A 1 Reply Last reply
      0
      • K khan

        I think you can handle the WM_CLOSE message, which comes before any WM_KILLFOCUS message. this is this.

        A Offline
        A Offline
        ArielR
        wrote on last edited by
        #3

        Ok, I undersand. But the dialog that has the controls is a child and I close by the parent. Any Suggestion?

        O 1 Reply Last reply
        0
        • A ArielR

          Ok, I undersand. But the dialog that has the controls is a child and I close by the parent. Any Suggestion?

          O Offline
          O Offline
          Owner drawn
          wrote on last edited by
          #4

          WM_DESTROY

          Jesus Loves You and Me :)

          --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

          A 1 Reply Last reply
          0
          • O Owner drawn

            WM_DESTROY

            Jesus Loves You and Me :)

            --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

            A Offline
            A Offline
            ArielR
            wrote on last edited by
            #5

            Ok, Thanks, but WM_DESTROY perfom after KILLFocus, I need to detect that the user is going out before the control run killfocus, thank you, and I think like you about Jesus....

            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