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.

[RESOLVED] Context menu for TextBox

Hello 2 u, programmer :-)

How can I get standard context menu of TextBox (ThunderTextBox) using VB6 and/or WinAPI and add my own menu item(s) to it?
Someone wrote something like: "use standard menu from user32.dll, byt I can't recall the method."
So the question is... How? How to realize the functionality? Is it real at least?

Re: Context menu for TextBox

Originally Posted by dglienna

If it's your program, it isn't hard. Somebody else's program is different

So... Where's the solution? Excuse me, but u wrote nothing except common words.

The problem is:
1. Where's no WM_INIT... messages it's only WM_CONTEXTMENU - so there's no handle to menu
2. I don't know the resource identifier within system dll to direct load the menu
And u said "it's not hard"... :-/

Re: Context menu for TextBox

What he said was if it is your program it is not that hard but if it is someone elses it is a different story. Meaning if you wrote the program and have the source code it is fairly easy. If someone else wrote it and you do not have the source then that is another matter.

Re: Context menu for TextBox

Unfortunately, I think, I can't understand that I need.
Ok. Here's an attachment.
The question still "How to do?"

P.S. Sorry, I didn't specify that the application is mine. I need to extend standard textbox's context menu. Standard means that the menu is not specialy created and show but generated by the control itself.

Re: Context menu for TextBox

Originally Posted by dglienna

That wouldn't be so good.

No way! I'm a friendly programmer. :-)

I created a program that helps me with my duties with my job.
There's a ServiceDesk that strores service calls. My job is analize the calls and make various report based on it. I create my own data base (mdb) and a cliend (vb6) to automate rut. (Export some information from ServiceDesk, import to my database, analyzing and reporting i've done). Now I work on my code to maximum automate rut.
There's primary actions that I've automated via hot-keys, but there's a secondary one that I wanna realize via context menu.

I just need to select part of text information in text box and have ability to select from context menu there the selection to store (there's a number of a textboxes). But there's a number of colleagues working with my application with its own habits (some of them like to use context menu instead of hot-keys to copy/paste)

I think its foolish to wrote so big project just for masking desructive things... If I would wish to write a virus or malware i'd like to use C++. :-)

I can realize my own context menu (that's not a problem) but on the spot i've got WinXP, at home Win7 and there's a different menues in both the systems. That's why I need smart solution to add items to standard menu