Alaska Software Inc. - Mouse click events with XbpMenu()
Username: Password:
AuthorTopic: Mouse click events with XbpMenu()
Roger DonnayMouse click events with XbpMenu()
on Wed, 22 Jul 2015 21:51:55 +0200
Xbase++ does not generate any events when the right mouse button is clicked 
on a menu or when the left mouse button is clicked on the menu item that 
points to a sub menu.

This is a real problem because I have customers who want to create desktop 
shortcuts from a menu by right-clicking a menu item.
I have never been able to get this to work, so my workaround has been to 
intercept a Shift-Left Click and use that info to create the shortcut.

Does anyone know how to get Xbase++ to generate RbClick or RbDown events on 
an XbpMenu() ?
Roger Donnaynotifications
on Wed, 22 Jul 2015 21:52:52 +0200
Thomas BraunRe: Mouse click events with XbpMenu()
on Thu, 23 Jul 2015 08:26:04 +0200
Roger Donnay wrote:

> Does anyone know how to get Xbase++ to generate RbClick or RbDown events on 
> an XbpMenu() ?

Possibly the same way that my TaskBar library intercepts the menu events
from the taskbar icon popup menu.

Unfortunately I currently don't have a working C-compiler, so I can't do
any tests.

regards
Thomas
Jose Antonio Diego KerejeRe: Mouse click events with XbpMenu()
on Thu, 23 Jul 2015 21:46:21 +0200
Hi, Roger:

Here is a possible starting point.

Regards. Diego


menudemo.zip
Carlos A Beling Re: Mouse click events with XbpMenu()
on Tue, 28 Jul 2015 12:06:02 -0300
Hello Diego.
Good afternoon.
I took a look in your example and it is very interesting.
Could you, please, tell me where can I get information about 
::subscribeOSEvent() and how INLINE METHOD HandleOSEvent() is activated?


Fraternally
Beling

On 23/7/2015 16:46, Jose Antonio Diego Kereje wrote:
> Hi, Roger:
>
> Here is a possible starting point.
>
> Regards. Diego
Jose Antonio Diego KerejeRe: Mouse click events with XbpMenu()
on Tue, 28 Jul 2015 22:48:14 +0200
Hello Carlos:

> I took a look in your example and it is very interesting.
> Could you, please, tell me where can I get information about
> ::subscribeOSEvent() and how INLINE METHOD HandleOSEvent() is activated?

Alaska guys use in 
\Documents\Xbase++\source\runtime\dui\xbp-activex-statusbar.prg (v..2.0).
Also present in \Program Files\ALASKA\XPPW32\source\SYS\axctrls.prg file 
(v.1.90).
Both are internal, no documented methods.

If we subscribe an OSevent in a XbpPart, when that event is generated by the 
OS, the Xbase++ runtime automatically executes the method 
HandleOSEvent(nMsg, wp, lp )

Regards. Diego

PS:

For these purposes, I usually use ot4xb_SubclassWindow(). But as I believed 
that Roger would prefer a 100% Xbase++ solution, I remembered the existence 
of these methods.

And although in the first file you'll also find:

/  Remarks:
      THIS IS A SYSTEM FILE AND ITS CONTENTS ARE SUBJECT TO CHANGE
      WITH FUTURE RELEASES! MAKING ASSUMPTIONS ABOUT THE FILE'S
      CONTENTS IS DISCOURAGED.

, I would use without hesitation in the absence of Pablo's ot4xb.
Carlos A Beling Re: Mouse click events with XbpMenu()
on Wed, 29 Jul 2015 09:48:46 -0300
Hello Diego:
good morning.
Many thanks. Very, very nice.

Fraternally
Beling

On 28/7/2015 17:48, Jose Antonio Diego Kereje wrote:
> Hello Carlos:
>
>> I took a look in your example and it is very interesting.
>> Could you, please, tell me where can I get information about
>> ::subscribeOSEvent() and how INLINE METHOD HandleOSEvent() is activated?
>
> Alaska guys use in
> \Documents\Xbase++\source\runtime\dui\xbp-activex-statusbar.prg (v..2.0).
> Also present in \Program Files\ALASKA\XPPW32\source\SYS\axctrls.prg file
> (v.1.90).
> Both are internal, no documented methods.
>
> If we subscribe an OSevent in a XbpPart, when that event is generated by
> the OS, the Xbase++ runtime automatically executes the method
> HandleOSEvent(nMsg, wp, lp )
>
> Regards. Diego
>
> PS:
>
> For these purposes, I usually use ot4xb_SubclassWindow(). But as I
> believed that Roger would prefer a 100% Xbase++ solution, I remembered
> the existence of these methods.
>
> And although in the first file you'll also find:
>
> /  Remarks:
>       THIS IS A SYSTEM FILE AND ITS CONTENTS ARE SUBJECT TO CHANGE
>       WITH FUTURE RELEASES! MAKING ASSUMPTIONS ABOUT THE FILE'S
>       CONTENTS IS DISCOURAGED.
>
> , I would use without hesitation in the absence of Pablo's ot4xb.
Roger DonnayRe: Mouse click events with XbpMenu()
on Mon, 03 Aug 2015 17:59:49 +0200
Carlos -

Thanks for that info but it just didn't work.  The Rightbutton up never 
created an OS event.

I resolved the problem by writing a new menu system that works identical 
to XbpMenu() but uses XbpPushButton() objects for each menu item.  Owner 
drawing makes it look just like a Windows menu.


Carlos A Beling <beling@bipbip.com.br> wrote in message 
news:b8f4ce7$6364dca7$9587a@news.alaska-software.com...
>Hello Diego.
>Good afternoon.
>I took a look in your example and it is very interesting.
>Could you, please, tell me where can I get information about 
>::subscribeOSEvent() and how INLINE METHOD HandleOSEvent() is activated?
>
>
>Fraternally
>Beling
>
>On 23/7/2015 16:46, Jose Antonio Diego Kereje wrote:
>> Hi, Roger:
>>
>> Here is a possible starting point.
>>
>> Regards. Diego
Carlos A Beling Re: Mouse click events with XbpMenu()
on Tue, 04 Aug 2015 10:41:18 -0300
Hello Roger:
good morning.
Many thanks. Could you please show here some screen of the menu?

Fraternally
Beling

On 3/8/2015 12:59, Roger Donnay wrote:
> Carlos -
>
> Thanks for that info but it just didn't work.  The Rightbutton up never
> created an OS event.
>
> I resolved the problem by writing a new menu system that works identical
> to XbpMenu() but uses XbpPushButton() objects for each menu item.  Owner
> drawing makes it look just like a Windows menu.
>
>
> Carlos A Beling <beling@bipbip.com.br> wrote in message
> news:b8f4ce7$6364dca7$9587a@news.alaska-software.com...
>> Hello Diego.
>> Good afternoon.
>> I took a look in your example and it is very interesting.
>> Could you, please, tell me where can I get information about
>> ::subscribeOSEvent() and how INLINE METHOD HandleOSEvent() is activated?
>>
>>
>> Fraternally
>> Beling
>>
>> On 23/7/2015 16:46, Jose Antonio Diego Kereje wrote:
>>> Hi, Roger:
>>>
>>> Here is a possible starting point.
>>>
>>> Regards. Diego