[ros-dev] [ros-diffs] [gbrunmar] 29384: Added context menu on right click in treeviews

Zachary Gorden drakekaizer666 at gmail.com
Wed Oct 3 22:57:01 CEST 2007


I think those changes were taken from Wine.  Since we haven't synced in a
while, ALiENiD did a diff and applied it to our current code.

Z98

On 10/3/07, Ged <gedmurphy at gmail.com> wrote:
>
> Have any attempts been made to submit these changes to Wine?
> local changes will just cause us grief further down the line.
>
> Ged.
>
> gbrunmar at svn.reactos.org wrote:
> > Author: gbrunmar
> > Date: Wed Oct  3 23:45:39 2007
> > New Revision: 29384
> >
> > URL: http://svn.reactos.org/svn/reactos?rev=29384&view=rev
> > Log:
> > Added context menu on right click in treeviews
> >
> > Modified:
> >     trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
> >     trunk/reactos/dll/win32/comctl32/treeview.c
> >
> > Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
> > URL:
> http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32_ros.diff?rev=29384&r1=29383&r2=29384&view=diff
> >
> ==============================================================================
> > --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
> > +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Wed Oct  3
> 23:45:39 2007
> > @@ -172,3 +172,26 @@
> >       if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
> >       infoPtr->cdmode =
> >           TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc,
> rect);
> > +@@ -4160,6 +4158,22 @@
> > + static LRESULT
> > + TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
> > + {
> > ++    TVHITTESTINFO ht;
> > ++
> > ++    ht.pt = *pPt;
> > ++
> > ++    TREEVIEW_HitTest(infoPtr, &ht);
> > ++
> > ++    if (ht.hItem)
> > ++    {
> > ++        /* Change to screen coordinate for WM_CONTEXTMENU */
> > ++        ClientToScreen(infoPtr->hwnd, &ht.pt);
> > ++
> > ++        /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP
> */
> > ++        SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
> > ++            (WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
> > ++    }
> > ++
> > +     return 0;
> > + }
> > +
> >
> > Modified: trunk/reactos/dll/win32/comctl32/treeview.c
> > URL:
> http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treeview.c?rev=29384&r1=29383&r2=29384&view=diff
> >
> ==============================================================================
> > --- trunk/reactos/dll/win32/comctl32/treeview.c (original)
> > +++ trunk/reactos/dll/win32/comctl32/treeview.c Wed Oct  3 23:45:39 2007
> > @@ -4158,6 +4158,22 @@
> >  static LRESULT
> >  TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
> >  {
> > +    TVHITTESTINFO ht;
> > +
> > +    ht.pt = *pPt;
> > +
> > +    TREEVIEW_HitTest(infoPtr, &ht);
> > +
> > +    if (ht.hItem)
> > +    {
> > +        /* Change to screen coordinate for WM_CONTEXTMENU */
> > +        ClientToScreen(infoPtr->hwnd, &ht.pt);
> > +
> > +        /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP
> */
> > +        SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
> > +            (WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
> > +    }
> > +
> >      return 0;
> >  }
> >
> >
> >
> >
> >
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-dev/attachments/20071003/845e512f/attachment.html 


More information about the Ros-dev mailing list