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. set focus to main dialog form in MFC (SOLVED)

set focus to main dialog form in MFC (SOLVED)

Scheduled Pinned Locked Moved C / C++ / MFC
c++
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.
  • J Offline
    J Offline
    jawadali477
    wrote on last edited by
    #1

    hi, i have developed program where two separate windows, one containing Map and other the dialog form with some controls, are opened. the program is when i click on Map window, its coordinates are displayed in the static text on the dialog form window. what i want is that when i click on Map window (which is at the front at the time of clicking) the dialog form window should appear at the front showing the results of my click, i.e the coordinates. Regards Jawad

    L 1 Reply Last reply
    0
    • J jawadali477

      hi, i have developed program where two separate windows, one containing Map and other the dialog form with some controls, are opened. the program is when i click on Map window, its coordinates are displayed in the static text on the dialog form window. what i want is that when i click on Map window (which is at the front at the time of clicking) the dialog form window should appear at the front showing the results of my click, i.e the coordinates. Regards Jawad

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      When you click on the map you can set the dialog's property to WS_EX_TOPMOST as described here[^]. You would then need to reset that value on some other action. Alternatively you could use the SetWindowPos()[^] function to alter its place in the Z-order, i.e. bring it to the front.

      One of these days I'm going to think of a really clever signature.

      J 1 Reply Last reply
      0
      • L Lost User

        When you click on the map you can set the dialog's property to WS_EX_TOPMOST as described here[^]. You would then need to reset that value on some other action. Alternatively you could use the SetWindowPos()[^] function to alter its place in the Z-order, i.e. bring it to the front.

        One of these days I'm going to think of a really clever signature.

        J Offline
        J Offline
        jawadali477
        wrote on last edited by
        #3

        thank you Richard MacCutchan.

        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