15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How to activate/deactivate MDI views ?

Andrew Kondrashow -- recoder@world.std.com
Thursday, December 12, 1996

Environment: MSVC++ 4.1, Windows 95

I'm trying to extend Stingray's OT library. I wanted to activate a view, 
embedded into control bar. (My application is an MDI app) But I can not 
activate this view, it only gains focus. The active MDI child window 
remains active (it has highlighted frame caption and it gets commands 
from the menu). I tried SetFocus(), MDIActivate(), SetActiveView(), 
even SetActiveWindow(), nothing helped.
Any help would be greatly appreciated.


Thanking you in advance.
Andrew Kondrashov
recoder@world.std.com




Mike Marshall -- marshall@milner.com
Monday, December 16, 1996

I'm not using stingray's library, but I've implemented something
similar myself.  And it's been non-trivial for me to say the
least.

The problem is that control bars are not included
in the list of MDI children in your application,
and control bars have no concept of being
"activated".  So even though your view has focus,
the current MDI child will still be "activated",
these are two separate concepts.

What a co-worker of mine had to do on a project was
create a hidden MDI child window that the user
couldn't see and route windows messages through
that hidden MDI child to the view in the control
bar, giving the control bar the illusion of
being the active MDI child.

This is hokey at best, and I've found that more
headaches arise as you go on, but this is the
only way I know of to create the illusion you
are looking for.

--
Mike

----------
From: 	Andrew Kondrashow[SMTP:recoder@world.std.com]
Sent: 	Thursday, December 12, 1996 9:40 AM
To: 	'MFC List'
Subject: 	How to activate/deactivate MDI views ?

Environment: MSVC++ 4.1, Windows 95

I'm trying to extend Stingray's OT library. I wanted to activate a view, 
embedded into control bar. (My application is an MDI app) But I can not 
activate this view, it only gains focus. The active MDI child window 
remains active (it has highlighted frame caption and it gets commands 
from the menu). I tried SetFocus(), MDIActivate(), SetActiveView(), 
even SetActiveWindow(), nothing helped.
Any help would be greatly appreciated.


Thanking you in advance.
Andrew Kondrashov
recoder@world.std.com




| Вернуться в корень Архива |