Re: [Rd] getWindowsHandle()

From: Duncan Murdoch <dmurdoch_at_pair.com>
Date: Fri 16 Jul 2004 - 06:39:18 EST

On Thu, 15 Jul 2004 16:13:51 -0400 (EDT), Peng Liu <pliu3@unity.ncsu.edu> wrote :

>I notice that this function is available after Dr. Murdoch's post at
>R-GUI. I am further wondering how to use "Process" and "ProcessID" two
>choices. Suppose I created more than one 'Document' windows within MDI. I
>need to find their corresponding process ID or handle, in order to
>communicate with them correctly.

You'll need to read Windows documentation.

The difference between Process and ProcessID is that one is the result of a call to the GetCurrentProcess function, and the other is the result of a call to the GetCurrentProcessID function.

Currently R has no way to get the list of MDI document windows. I think the function you want is EnumChildWindows, but you might need to use EnumWindows. I can't remember whether MDI documents are child windows or top level windows.

If you do get all of this worked out nicely, contributions of patches to R would be welcomed. The file where this function lives is src/gnuwin32/extra.c.

Duncan Murdoch



R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel Received on Fri Jul 16 06:43:37 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 08:59:10 EST