FYI...

---------- Forwarded message ----------
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: 9 Sep 2005 17:39:31 -0000
Subject: [perlguitest] Digest Number 387
To: [EMAIL PROTECTED]


------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/ndFolB/TM
--------------------------------------------------------------------~->

There are 2 messages in this issue.

Topics in this digest:

      1. Getting the Popup menu handle. It may work but it's hedious
           From: "rafelafrance" <[EMAIL PROTECTED]>
      2. Re: Getting the Popup menu handle. It may work but it's hedious
           From: "Piotr Kaluski" <[EMAIL PROTECTED]>


________________________________________________________________________
________________________________________________________________________

Message: 1
   Date: Thu, 08 Sep 2005 23:40:46 -0000
   From: "rafelafrance" <[EMAIL PROTECTED]>
Subject: Getting the Popup menu handle. It may work but it's hedious

*Ugh* The current method (I'll space you the XS code): THERE HAS TO
BE A BETTER WAY!

1) Call up the context menu using MouseClick() or SendKeys()
2) Set up an event trap to look for the WM_MENUSELECT event
3) SendKeys('{DOWN}'); #Which will post the WM_MENUSELECT
4) In the callback HookProc() get the popup handle from lParam.
5) Call another routine to retrive the popup handle GetPopupHandle()

This should sound like nails on a chalkboard by about now. The
problems are legion and here are just a few.

- If you never call GetPopupHandle() the hook isn't released. BAD!
  Sure I test & release it if I can but there's no guarantee.
- You have to dirty the menu by pressing {DOWN} to get its handle

==================================
I've tried to get the popup handle all in one fell swoop by doing the
SendKeys() etc in the C code but that wasn't working. Tho it seems
like the way to go. Maybe...

I'm looking for other events to trap that don't dirty the menu but I
haven't found any that would be generally useful. Any suggestions?

Maybe I can set up an XS object so that the trap will be set up once
during New(). Have all popups post to this object and release the
hook during the DESTROY method. A lot of work for little reward.
=====================================

Any ideas please.







________________________________________________________________________
________________________________________________________________________

Message: 2
   Date: Fri, 09 Sep 2005 06:46:02 -0000
   From: "Piotr Kaluski" <[EMAIL PROTECTED]>
Subject: Re: Getting the Popup menu handle. It may work but it's hedious

Hi,
Some time ago I was trying to find a solution for the same problem. I
was thinking on the way to handle IE menu bar and its submenus.
This problem is related to what you write about, since IE menu is a
toolbar with popup menus.
And yes, you are right about the main problem - how to get a menu
handle. Win32 API provides many fancy functions for managing menus
but most of them expect menu handle as a parameter. I have found one
promising function - GetMenuBarInfo. However I could not make the
function work. I was getting really strange error messages
(including "Function was successful", with an indication that there
is an error). I tried to post the question to win32 programming
newsgroup, but did not get any help. It would be good to have some
real windows guru to have a look at it.
-Piotr

--- In [EMAIL PROTECTED], "rafelafrance"
<[EMAIL PROTECTED]> wrote:
> *Ugh* The current method (I'll space you the XS code): THERE HAS TO
> BE A BETTER WAY!
>
> 1) Call up the context menu using MouseClick() or SendKeys()
> 2) Set up an event trap to look for the WM_MENUSELECT event
> 3) SendKeys('{DOWN}'); #Which will post the WM_MENUSELECT
> 4) In the callback HookProc() get the popup handle from lParam.
> 5) Call another routine to retrive the popup handle GetPopupHandle()
>
> This should sound like nails on a chalkboard by about now. The
> problems are legion and here are just a few.
>
> - If you never call GetPopupHandle() the hook isn't released. BAD!
>   Sure I test & release it if I can but there's no guarantee.
> - You have to dirty the menu by pressing {DOWN} to get its handle
>
> ==================================
> I've tried to get the popup handle all in one fell swoop by doing
the
> SendKeys() etc in the C code but that wasn't working. Tho it seems
> like the way to go. Maybe...
>
> I'm looking for other events to trap that don't dirty the menu but
I
> haven't found any that would be generally useful. Any suggestions?
>
> Maybe I can set up an XS object so that the trap will be set up
once
> during New(). Have all popups post to this object and release the
> hook during the DESTROY method. A lot of work for little reward.
> =====================================
>
> Any ideas please.




________________________________________________________________________
________________________________________________________________________



------------------------------------------------------------------------
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/perlguitest/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

------------------------------------------------------------------------

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to