1

Topic: TreeView NM_DBLCLK

All kind time of days!
Faced a problem of program pushing node element TreeView in other application.
Who can prompt where an error?

NMHDR nmh;
nmh.code = NM_DBLCLK;
nmh.idFrom = (UINT_PTR) hItem;//hItem (variable type HTREEITEM) which needs to be pushed element TreeView program
nmh.hwndFrom = hwnd_stv;// element SysTreeView
:: SendMessageW (:: GetParent (hwnd_stv), WM_NOTIFY, nmh.idFrom, (LPARAM) &nmh);

And works nothing
Thankful in advance

2

Re: TreeView NM_DBLCLK

lnix;
I suspect that under NMHDR it is necessary to select storage in other application (VirtualAllocEx, WriteProcessMemory)

3

Re: TreeView NM_DBLCLK

Isokerf;
I selected storage when read this treeview and searched   treeview. And here I need to cause simply function connected with given . Unless for this purpose it is necessary to select storage? And as then the output agent will be launched. (I write from the smart phone. Misprints) are possible

4

Re: TreeView NM_DBLCLK

lnix wrote:

I selected storage when read this treeview and searched   treeview.

Same storage in your application, instead of in where treeview lives

5

Re: TreeView NM_DBLCLK

lnix wrote:

All kind time of days!
Faced a problem of program pushing node element TreeView in other application.
Who can prompt where an error?

NMHDR nmh;
nmh.code = NM_DBLCLK;
nmh.idFrom = (UINT_PTR) hItem;//hItem (variable type HTREEITEM) which needs to be pushed element TreeView program
nmh.hwndFrom = hwnd_stv;// element SysTreeView
:: SendMessageW (:: GetParent (hwnd_stv), WM_NOTIFY, nmh.idFrom, (LPARAM) &nmh);

And works nothing
Thankful in advance

So will not work, you cannot send this message to other application at all.
It contains structure NMHDR address in sending application to which storage at accepting application is not present
Access.
Besides, the code generally wrong - NMHDR is only a common part of all structures   COMMCLL32, and to send you should not it, and its "successors" is is described in the description specific  messages, NM_DBLCLK in this case.
Plus to it is structure is incorrectly filled. The size of structure in title is not filled in particular.
In general, all not so, and at you it hardly turns out generally.
You should study examples of applications from MSDN, working with specific  from COMMCLL32, and at first to achieve operation with , local in the given application. Then to research already sending to the remote application.

6

Re: TreeView NM_DBLCLK

wrote:

it is passed...
Same storage in your application, instead of in where treeview lives

Windows on idea it can  and copy temporarily given in storage of other application.
It synchronizes flows at sending of messages why and it not to make?
Becomes or not, I do not remember. It is necessary to research MSDN or Richter.

7

Re: TreeView NM_DBLCLK

MasterZiv wrote:

Windows on idea it can  and copy temporarily given in storage of other application.

But it is far not for all messages.
WM_COPYDATA - Yes. And here to understand details  is too.

8

Re: TreeView NM_DBLCLK

Precisely I know that it is possible to send, those who are able to do it do not wish to share even an example

9

Re: TreeView NM_DBLCLK

Who can prompt as correctly to do?

10

Re: TreeView NM_DBLCLK

lnix wrote:

who Can prompt as correctly to do?

MSDN.

11

Re: TreeView NM_DBLCLK

That me again did not accuse in  to beginners, I will quote:

MSDN wrote:

For Windows 2000 and later systems, the WM_NOTIFY message cannot be sent
between processes.

12

Re: TreeView NM_DBLCLK

What interesting sex - https://social.msdn.microsoft.com/Forum … =vbgeneral

13

Re: TreeView NM_DBLCLK

Dimitry Sibiryakov wrote:

That me again did not accuse in  to beginners, I will quote:
it is passed...

Well means it is possible to implement in another's process dll and to control  from native process

14

Re: TreeView NM_DBLCLK

Search necessary  at me is implemented. Too most only on with ++. Works, and here is how program to push selected  I do not know. Initially thought all simply.

15

Re: TreeView NM_DBLCLK

lnix;
I speak, at you so it does not turn out.
You should learn AT FIRST at least to control TreeView in the process, only after that to climb in the another's.
Even if you somehow will transfer this message or will implement.dll (that very uneasy) for you all the same will work nothing;
Because the code at you bluntly incorrect. And true to make for TreeView it is difficult enough, well, in sense, there  and it is necessary to do all accurately.
Besides I will prompt other way - not mandatory to send WM_NOTIFY, can try to control TreeView, sending to it
Mouse or keypad messages. Their key singularity that these messages should contain all data in the
Parameters, LPARAM, WPARAM and not to contain the reference there on structures in storage, such messages are easily transferred to other process.

16

Re: TreeView NM_DBLCLK

lnix wrote:

Search necessary  at me is implemented. Too most only on with ++. Works, and here is how program to push selected  I do not know. Initially thought all simply.

What means to "push"?
To select - WM_SELECTITEM
https://msdn.microsoft.com/ru-ru/librar … p/bb773736 (v=vs.85).aspx

17

Re: TreeView NM_DBLCLK

The choice  too is implemented. And here for idea to send the mouse message . I will try.

18

Re: TreeView NM_DBLCLK

I here resembled drank to tea, thought, and after all unless notification message WM_NOTUFY together with NM_DBLCLK is not emulation of double pushing of the left mouse button?

19

Re: TreeView NM_DBLCLK

lnix;
It is good that you thought, but are not present, is not.

20

Re: TreeView NM_DBLCLK

lnix;
To begin with: it is strange that the remote application not . You transfer in SendMessage the address from the address space, accordingly that application will address to this address in the address space and with probability of 100 % falls. You were rescued only by that WM_NOTIFY not a cross connect-process.
Then: WM_NOTIFY is already response  towards the parent on any event (in this case)
The idea to send manually cliques, basically, quite good, but need so to do, already guards. What for the task generally costs initially, what it is necessary such to do? Most likely the answer to this question solves all problems smile
To send cliques, it is necessary to know position , for this purpose is TVM_GETITEMRECT, and for the fourth parameter it is necessary to select storage in another's process, differently here it will precisely be screwed.
Itself cliques it is sent by function SendInput

21

Re: TreeView NM_DBLCLK

CEMb wrote:

for the fourth parameter it is necessary to select storage in another's process, differently here it is exact
It will be screwed.

Not precisely. Windows not fools initially wrote, parameters of system messages they
also transfer between address spaces of processes normally. At
Usage WM_SETTEXT you do not climb in storage of another's process...