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?

P.S. The goal is to add custom item to standard context menu.

October 14th, 2010, 02:17 PM

dglienna

Re: Context menu for TextBox

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

October 14th, 2010, 11:19 PM

Psych0

Re: Context menu for TextBox

Quote:

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"... :-/

October 14th, 2010, 11:22 PM

DataMiser

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.

October 15th, 2010, 12:14 AM

Psych0

Re: Context menu for TextBox

Gosh!
Men don't you read my first post?
I clearly noted "standard". Have I explain you "standard".

Yes 2 days of searchin' via MSDN and internet (google, yandex, rambler).
And I didn't find anythin except "supress context menu" or "create your own menu and substitu standard one". But the question is: "How to get standard menu and change it (append item)"...

I apreciate your answers and hope your last link helps me.

October 15th, 2010, 05:28 AM

Psych0

1 Attachment(s)

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.

CH "I think I'm goin' crazy"

October 15th, 2010, 11:51 AM

dglienna

Re: Context menu for TextBox

So you can add, for example: DESTROY WORLD, or DELETE FILES?

That wouldn't be so good. That's why windows doesn't allow it.

You can create a CONTEXT MENU that lives in the taskbar with Windows 7

That, you can add items to

October 15th, 2010, 12:27 PM

Psych0

Re: Context menu for TextBox

Quote:

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

Uh...

Think I won't be banned for offtop :-)

October 15th, 2010, 12:46 PM

dglienna

Re: Context menu for TextBox

If you wrote the client, then you'd have to change it to create your menu. You can create a menu on the fly, but not from a different program.

October 15th, 2010, 01:00 PM

Psych0

Re: Context menu for TextBox

Quote:

Originally Posted by dglienna

You can create a menu on the fly, but not from a different program.

Dear Dglienna, I don't need a different program. I just want standard menu of a standard control.

I misunderstand you or you misunderstand me.

If I will follow your logic then I need to create my own TextBox control. No, no, no! That a control? Write whole program in Notepad using mnemonics of processor :-)

I've explain that I've done. I've explain that I need. I've explain almost everything but there's no answer. Now I hope you will tell me "It's impossible" or "You have to do... to realize it".

October 15th, 2010, 01:04 PM

Psych0

Re: Context menu for TextBox

Dr. Dglienna, u realy POWER Poster! :-) (in good part)

October 15th, 2010, 01:08 PM

dglienna

Re: Context menu for TextBox

This is an API that you might be able to use. Notice that the button COLORIZES the menu items.