this-is-me Posted October 14, 2006 Posted October 14, 2006 I have been trying to cancel the default context menu on a gui, and haven't been doing so well. I have a piece of code hastily thrown together to show what I have tried so far: #Include <GuiConstants.au3> $WM_CONTEXTMENU = 0x007B $test = GuiCreate("test") GuiCtrlCreateInput("test", 0, 0, 30, 30) GUIRegisterMsg($WM_CONTEXTMENU, "catchcontext") GuiSetState() While 1 sleep(1000) wend Func catchcontext($hWndGUI, $MsgID) msgbox(0,"","") return endfunc As you can see when right-clicking the gui, the message is captured only from the gui itself, not on the input box. I am attempting to cancel any context menu whatsoever from the inputbox. Who else would I be?
this-is-me Posted October 15, 2006 Author Posted October 15, 2006 Hello Everyone. Just bumping for further perusal. Who else would I be?
this-is-me Posted October 21, 2006 Author Posted October 21, 2006 *Bump* Anyone? Who else would I be?
Valik Posted October 21, 2006 Posted October 21, 2006 This would require subclassing the edit control so that you can catch it's messages and discard the one that triggers the menu. You can not use AutoIt to subclass a window.
this-is-me Posted October 21, 2006 Author Posted October 21, 2006 When you say subclass the edit box, doesn't GuiRegisterMsg allow subclassing for the Gui window? Who else would I be?
Valik Posted October 21, 2006 Posted October 21, 2006 No. You have to provide your own Window procedure to subclass a window. There is no way to write a Window procedure in AutoIt. It requires the ability to use AutoIt functions as callbacks to C API functions.
this-is-me Posted October 21, 2006 Author Posted October 21, 2006 I see. Thanks anyway. I will cancel it in another way. Who else would I be?
Richard Robertson Posted October 21, 2006 Posted October 21, 2006 Why can't the user right click the edit control?
this-is-me Posted October 22, 2006 Author Posted October 22, 2006 I don't want them to, and that's all the info you get. Who else would I be?
Richard Robertson Posted October 22, 2006 Posted October 22, 2006 We can't help if you aren't nice. It doesn't matter if AutoIt can do it or not. We will or will not help based on you and you should know that being an experienced forum user.
this-is-me Posted October 22, 2006 Author Posted October 22, 2006 @Icekirby1, I will explain this very simply.Valik has explained that this cannot be done using AutoIt.I have accepted his answer and have decided to pursue another avenue.If this thread had a close button I would have used it two posts ago, because the matter is resolved.Your help (or anyone else's) at this time is a mute point. Neither do I need any additional help on this matter nor did I request it again.Therefore, thank you for your offer, but any additional comments in this thread are superflous. Who else would I be?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now