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

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


Double Click on CTreeCtrl item

kukulies@axpn01.fev.de
Wednesday, February 05, 1997


Environment: VC++ 4.2-flat, Win 95

i want to create a ( CMiniFrameWnd derived ) window 
in response to a doubleclick on a CTreeCtrl. The new window
should become active, BUT it doesn't. The titlebar only 
becomes active for very short moment and then the 
window containing the TreeCtrl get active again.
It seems, that the 2nd click of the dblclick activates the 
treectrl back again.
How can this be avoided?
I was already told, that the command handler didn't 
finish for that message and should post a message 
to this window to make itself active. 
Unfortunately this doesn't apply to my problem, since 
i do a DestroyWindow in response to a OnActivate with
WA_INACTIVE as it parameter.

What i want to achive is:
Getting the window behaviour of this floating Property window like in the VC studio.
This window gets created when e.g. someone DblClick on a dialog control.

any hint?

Benno




Sanjay Chouksey -- sanjay@mediaway.com
Friday, February 07, 1997

I hope you are not creating the ( CMiniFrameWnd derived ) window 
on stack.

Learn from others mistakes!!
(If thats any help!)
Sanjay

[Moderator's note: The most common mistake people make in MFC is to
create something on the stack and not realize that it will get deleted
as soon as the routine returns.  It drives people from the X Window
world crazy, and will probably do the same for Java folks, neither of
whom have to worry about this in many cases.]

----------
> From: kukulies@axpn01.fev.de
> To: MFC-L@majordomo.netcom.com
> Subject: Double Click on CTreeCtrl item
> Date: Wednesday, February 05, 1997 2:28 AM
> 
> 
> Environment: VC++ 4.2-flat, Win 95
> 
> i want to create a ( CMiniFrameWnd derived ) window 
> in response to a doubleclick on a CTreeCtrl. The new window
> should become active, BUT it doesn't. The titlebar only 
> becomes active for very short moment and then the 
> window containing the TreeCtrl get active again.
> It seems, that the 2nd click of the dblclick activates the 
> treectrl back again.
> How can this be avoided?
> I was already told, that the command handler didn't 
> finish for that message and should post a message 
> to this window to make itself active. 
> Unfortunately this doesn't apply to my problem, since 
> i do a DestroyWindow in response to a OnActivate with
> WA_INACTIVE as it parameter.
> 
> What i want to achive is:
> Getting the window behaviour of this floating Property window like in the
VC studio.
> This window gets created when e.g. someone DblClick on a dialog control.
> 
> any hint?
> 
> Benno
> 




Become an MFC-L member | Вернуться в корень Архива |