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. activating windows

activating windows

Scheduled Pinned Locked Moved C / C++ / MFC
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
    minkowski
    wrote on last edited by
    #1

    Hi, When a user activates a window (in the program I am writing) I was wondering what message it sends and what function I can use to add some additional functionality when this happens. Thanks for any tips.

    T D 2 Replies Last reply
    0
    • M minkowski

      Hi, When a user activates a window (in the program I am writing) I was wondering what message it sends and what function I can use to add some additional functionality when this happens. Thanks for any tips.

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

      WM_SETFOCUS


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      M 1 Reply Last reply
      0
      • T toxcct

        WM_SETFOCUS


        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        M Offline
        M Offline
        minkowski
        wrote on last edited by
        #3

        Hey, Thanks for that, I combined it with HWND SetFocus(HWND hwnd) I was able to add my own functionality. :-D

        1 Reply Last reply
        0
        • M minkowski

          Hi, When a user activates a window (in the program I am writing) I was wondering what message it sends and what function I can use to add some additional functionality when this happens. Thanks for any tips.

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

          Your question is sort of ambigious since everything is technicaly a window, even the controls on a dialog. For those, handle the WM_SETFOCUS message. For "main" windows, handle WM_ACTIVATEAPP or WM_ACTIVATE. There's also WM_SETACTIVE for property pages.


          "A good athlete is the result of a good and worthy opponent." - David Crow

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

          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