PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Jean-pierre Leroy on August 22, 2010, 11:26:22 AM

Title: How to disable standard windows popup menu when right click on a TEXTBOX
Post by: Jean-pierre Leroy on August 22, 2010, 11:26:22 AM
Dear FireFly users,

For an application, I created a specific popup menu with the new CONTEXTMENU handler provided by FF when the user right-click on an TEXTBOX; then I managed the option choosen by the user in the WM_COMMAND handler.

Everything works fine, except the fact that at the end, the standard windows popup menu also appears on the screen; it is the default popup menu provided by Microsoft with these options (undo, cut,copy,paste, delete and select all).

Is there any way to disable this standard windows popup menu for a specific TEXTBOX of a form ?

Thanks,
Jean-Pierre
Title: Re: How to disable standard windows popup menu when right click on a TEXTBOX
Post by: Marc van Cauwenberghe on August 22, 2010, 11:59:41 AM
Hi Jean-Pierre,

Maybe this will help:
http://support.microsoft.com/kb/224302 (http://support.microsoft.com/kb/224302)

What I just did was:
Function FORM1_TEXT1_WM_CONTEXTMENU ( _
                                    ControlIndex  As Long,  _  ' index in Control Array
                                    hWndForm      As Dword, _  ' handle of Form
                                    hWndControl   As Dword, _  ' handle of Control
                                    xPos          As Long,  _  ' x-coordinate of cursor
                                    yPos          As Long   _  ' y-coordinate of cursor
                                    ) As Long
   Function = %TRUE
End Function


Hope this helps.

Marc
Title: Re: How to disable standard windows popup menu when right click on a TEXTBOX
Post by: Jean-pierre Leroy on August 22, 2010, 03:07:15 PM
Hi Marc,

Thanks a lot, it works exactly as expected.

Regards,
Jean-Pierre