If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Context menu for TextBox

Of course, the code you posted creates a menu with an item. But what's about standard context menu for TextBox?

Your code is not implemented for my goal. Right?

Do you know why?

Because, before working with menu one must have a handle to it. There's a two way at least, to get a handle: 1st way is reach the existing, and the second one is create a menu based on a standard resource from depth of a system.

The problem is that system during creating standard context menu (for f***in' textbox) sends only WM_CONTEXTMENU and this message has no handle. Instead of this then the system deals with Form's menu it sends WM_INITMENU there the handle presents. Feel the difference.

Re: Context menu for TextBox

Originally Posted by dglienna

as it DOESN'T HAVE A HANDLE!

Telling "has no handle" I just meant the only message WM_CONTEXTMENU preceding the context menu and the message has no handle of the menu.
There's WM_INIT* messages, and they both have handles to a menu, but this messages are not generating while spawn context menu.

Re: Context menu for TextBox

Originally Posted by Psych0

Telling "has no handle" I just meant the only message WM_CONTEXTMENU preceding the context menu and the message has no handle of the menu.
There's WM_INIT* messages, and they both have handles to a menu, but this messages are not generating while spawn context menu.

dear sir, did you find any solution to your question? you marked it as solved, but i don't see solution here so, i think you got solution from somewhere else.. can you help me please? as i need the same solution too