MDI help
-
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:
-
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:
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.
-
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:
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 -
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:
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 --
-
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 --
Thanks guys, all nice suggestions Will try