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. MDI help

MDI help

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
5 Posts 4 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.
  • B Offline
    B Offline
    Bugra Barin
    wrote on last edited by
    #1

    I have an MDI MFC application and in some sitations I don't want the user to be able to switch between documents. It sounds easy but I have not not been able figure it out. Any help will be appreciated :confused:

    B L S 3 Replies Last reply
    0
    • B Bugra Barin

      I have an MDI MFC application and in some sitations I don't want the user to be able to switch between documents. It sounds easy but I have not not been able figure it out. Any help will be appreciated :confused:

      B Offline
      B Offline
      Bill Wilson
      wrote on last edited by
      #2

      Perhaps you can save the identity of the current document in some kind of global along with a switch indicating whether the user can switch or not. In the OnActivate for the view, check to see if the document being activated is the right one, if not, re-active the correct one. You might be able to do something more sophisitcated with PreTranslateMessage to suppress the activation altogether.

      1 Reply Last reply
      0
      • B Bugra Barin

        I have an MDI MFC application and in some sitations I don't want the user to be able to switch between documents. It sounds easy but I have not not been able figure it out. Any help will be appreciated :confused:

        L Offline
        L Offline
        l a u r e n
        wrote on last edited by
        #3

        you could look for the document you want on top losing focus (there is an event for this) and force it back to the top of the z-order just a guess :suss:


        "... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
        sonork: 100.18128   8028finder.com

        1 Reply Last reply
        0
        • B Bugra Barin

          I have an MDI MFC application and in some sitations I don't want the user to be able to switch between documents. It sounds easy but I have not not been able figure it out. Any help will be appreciated :confused:

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          How about just looping through all of the views & hiding the ones that belong to the non-active documents? Worth a try maybe... --------

          You can change the extention so it reads ASP even though it is PHP which is kind of cool. - Martin Marvinski

          --Shog9 --

          B 1 Reply Last reply
          0
          • S Shog9 0

            How about just looping through all of the views & hiding the ones that belong to the non-active documents? Worth a try maybe... --------

            You can change the extention so it reads ASP even though it is PHP which is kind of cool. - Martin Marvinski

            --Shog9 --

            B Offline
            B Offline
            Bugra Barin
            wrote on last edited by
            #5

            Thanks guys, all nice suggestions Will try

            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