From: Geoff Schaller on
Guys,

ftp://www.softwareobjectives.com.au/anonymous/WndProc.zip

There are two examples here for two different effects:

1. Treeview class

There is obviously more here than you need but you can see how I use the
dispatch to trap certain things and provide event handlers for others.
You will also see how I can add functionality to the treeview with new
keys/events and also pass certain ones directly up to the owner window.
But as you guessed, some things get swallowed internally so we must do
more.

2. Combo box class

Again this has more than you need but it shows you how to subclass the
WndProc and how that works. So now you need to combine both examples to
get the full effect.

One thing you must do is obtain and read Charles Petzold. This is very
important. Only the first 3-4 chapters are relevant for VO'ers but a
proper understanding of the Win32 framework is essential. It is the
bible and much of this becomes a lot clearer when you know it.

Geoff


From: Carlos Rocha on
Thank you

--
Carlos Rocha
From: Jürgen Knauf on
Geoff,

thank you very much for your help!!!

Juergen

"Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> schrieb im Newsbeitrag
news:rDdQn.2112$Ls1.2029(a)news-server.bigpond.net.au...
> Guys,
>
> ftp://www.softwareobjectives.com.au/anonymous/WndProc.zip
>
> There are two examples here for two different effects:
>
> 1. Treeview class
>
> There is obviously more here than you need but you can see how I use the
> dispatch to trap certain things and provide event handlers for others. You
> will also see how I can add functionality to the treeview with new
> keys/events and also pass certain ones directly up to the owner window.
> But as you guessed, some things get swallowed internally so we must do
> more.
>
> 2. Combo box class
>
> Again this has more than you need but it shows you how to subclass the
> WndProc and how that works. So now you need to combine both examples to
> get the full effect.
>
> One thing you must do is obtain and read Charles Petzold. This is very
> important. Only the first 3-4 chapters are relevant for VO'ers but a
> proper understanding of the Win32 framework is essential. It is the bible
> and much of this becomes a lot clearer when you know it.
>
> Geoff
>
>
From: Jürgen Knauf on
Stefan,

where can I evaluate both events, in the dispatch method of the window?

What is the Name of the TreeviewItemChanged event TVN_?

Juergen



"Stefan" <info(a)sanosoft.com> schrieb im Newsbeitrag
news:18152d7c-07c5-4118-9871-289aabf83e50(a)h13g2000yqm.googlegroups.com...
> There will always be two events when you select an item by
> doubleclick: the TreeViewSelectionChanged is a notification sent by
> the control to the owner when a new item is selected and the
> MouseButtonDoubleClick is generated by the control itself when a
> doubleclick occurs.
>
>> I can only evaluate the TreeViewSelectionChanged event
> I can not understand what you mean. Why can you evaluate only the
> TreeViewSelectionChanged event? Put the code in a method and call the
> method on both events!
>
> Stefan

From: Stefan on
Jürgen,

the selection of an item causes a notification and therefore you can
evaluate it in the ControlNotify-method of the window that owns the
treeview (notification-code: TVN_SELCHANGEDA). If you look to the
ControlNotify-method of the Window-class (GUI Classes SDK) there are
also notifications for the mouse button double click (notification-
code: NM_DBLCLK and NM_RDBLCLK). But it seems that in the case of an
item selection these notifications are not sent. In this specific case
you have to evaluate the mouse button double click in the Dispatch-
method of the control (message-id: WM_LBUTTONDBLCLK, WM_RBUTTONDBLCLK,
WM_MBUTTONDBLCLK, WM_XBUTTONDBLCLK).

Stefan
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: ShowCaret() failing ...?
Next: Hexbyte sequence as string