How To Invoke Context Menu Of Winzip In Listview Of My Application?
I d like to add winzip context menu (or context menus of any application which add context menu when you right click on a file in window explorer) for the listview of my application when I right click on a file. Is it possible? If yes how? I am also developing in vb.net ...
thanks in advance
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do You Invoke The Context Menu?
OK, we know how to tweak the system context menu via the registry.
But what I want to know is, how do I trigger it? That is, if I am showing a list of files in my own ListView, how do I invoke the standard system context menu for a selected file?
Or do I have to write my own context menu handler?
Dr Memory
__________________
How Can I Pu My Application On The Context Menu?
Hello, everybody.
I have just finished my program, and since it edits .txt files, I would like it to appear in the context menu when right-clicking on a file name in Explorer, just as Winzip and other applications do.
Can anybody tell me how to make this happen?
Thanks
Pass The Listview Name To A Context Menu?
I have 2 Listviews on my form. I'd like to have one common context menu for both, and depending on which listview I right-click on, I need to pass that name to the function so it knows which lv to work with. (i.e. check selected items)
I could do this with "sender" in .NET, but how would I do it in VB6?
Code:
Private Sub mnuLVContextCheck_Click(Index As Integer)
LVContextCheck sender???
End Sub
Public Sub LVContextCheck(lv As ListView)
Dim itmx As ListItem
For Each itmx In lv.ListItems
If itmx.Selected = True Then itmx.Checked = True
Next itmx
End Sub
Listview And Context Menu In WinCE
I'm using eMbedded Visual C++ 6.0, targeting a Compaq iPaq device running Pocket PC 2002. My code is in NON MFC.
I need the classic behaviour of a context menu popping up on “tap and hold” on an item in a list view. One of the items in the context menu is: “show another form (lets call it Box 2)”, and I have gain that functionality. But when I want to close Box 2, for some reason it’s necessary to tap two times on the Close button. But only if there is any items selected in the listview!, -othervise if I activate the popup menu somewhere else in the listview, then there seems to be no problem. And one more thing: I only see the problem in Target and not in the simulator.
I have enclosed a zip file containing the project and an exe-file.
Any help would be appreciated
-Jesper R.
Snippet code:
Code:
g_hndBox1 = CreateDialog(g_hInst, (LPCTSTR)IDD_BOX_1, hWnd, (DLGPROC)Box1);
g_hndBox2 = CreateDialog(g_hInst, (LPCTSTR)IDD_BOX_2, hWnd, (DLGPROC)Box2);
// Mesage handler for the Box 1.
LRESULT CALLBACK Box1(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
SHINITDLGINFO shidi;
LVITEM lvI;// list view item structure
LVCOLUMN lvC;// list view column structure
switch (message)
{
case WM_INITDIALOG:
// Create a Done button and size it.
shidi.dwMask = SHIDIM_FLAGS;
//shidi.dwFlags = SHIDIF_DONEBUTTON; // | SHIDIF_SIPDOWN; // | SHIDIF_SIZEDLGFULLSCREEN;
shidi.hDlg = hDlg;
SHInitDialog(&shidi);
lvC.mask = LVCF_TEXT | LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM | LVIF_NORECOMPUTE;
lvC.fmt = LVCFMT_LEFT; // left-align column
lvC.cx = 100; // width of column in pixels
lvC.pszText = TEXT ("Mame");
lvC.iSubItem = 0;
ListView_InsertColumn(GetDlgItem(hDlg, IDC_LIST1), 0, &lvC);
lvC.pszText = TEXT ("Number");
lvC.iSubItem = 1;
ListView_InsertColumn(GetDlgItem(hDlg, IDC_LIST1), 1, &lvC);
lvI.mask = LVIF_TEXT | LVIF_NORECOMPUTE; //LVIF_IMAGE | LVIF_PARAM | LVIF_STATE
lvI.state = 0;
lvI.stateMask = 0;
lvI.iSubItem = 0;
lvI.cchTextMax = 12;
lvI.pszText = LPSTR_TEXTCALLBACK;
lvI.iItem = 0;
if (ListView_InsertItem(GetDlgItem(hDlg, IDC_LIST1), &lvI) == -1) return NULL;
ListView_SetItemText( GetDlgItem(hDlg, IDC_LIST1), 0, 0, TEXT ("John Doe"));
ListView_SetItemText( GetDlgItem(hDlg, IDC_LIST1), 0, 1, TEXT ("+4598381234"));
lvI.iItem = 1;
lvI.pszText = TEXT ("Peter Smith");
if (ListView_InsertItem(GetDlgItem(hDlg, IDC_LIST1), &lvI) == -1) return NULL;
ListView_SetItemText( GetDlgItem(hDlg, IDC_LIST1), 1, 0, TEXT ("Jesper Rovsing"));
ListView_SetItemText( GetDlgItem(hDlg, IDC_LIST1), 1, 1, TEXT ("+4596312345"));
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
ShowWindow(g_hndBox1, SW_HIDE);
}
if (LOWORD(wParam) == IDC_BUTTON1)
{
ShowWindow(g_hndBox2, SW_SHOW);
}
switch (LOWORD (wParam))
{
case IDC_SEDIT:
ShowWindow(g_hndBox2, SW_SHOW);
break;
case IDC_SNEW:
ShowWindow(g_hndBox1, SW_HIDE);
ShowWindow(g_hndBox2, SW_SHOW);
break;
}
break;
case WM_NOTIFY: // the message that is being sent always
if ((LOWORD(wParam)) == IDC_LIST1) //did we hit our ListView contorl?
{
switch (((LPNMHDR)lParam)->code)
{
case GN_CONTEXTMENU :
tpm.cbSize = sizeof (tpm);
CopyRect (&tpm.rcExclude, &rect);
test_hMenu = GetSubMenu (LoadMenu (g_hInst, TEXT ("POPMENU_PHONEBOOK")),0);
TrackPopupMenuEx (test_hMenu,
TPM_LEFTALIGN , //| TPM_VERTICAL | TPM_RETURNCMD
50,
50,
hDlg,
NULL);
DestroyMenu(test_hMenu);
//MessageBox(g_hWnd,TEXT("hmm"),TEXT("Message"),MB_OK);
break;
}
}
break;
}
return FALSE;
}
// Mesage handler for Box 2.
LRESULT CALLBACK Box2(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
SHINITDLGINFO shidi;
switch (message)
{
case WM_INITDIALOG:
// Create a Done button and size it.
shidi.dwMask = SHIDIM_FLAGS;
//shidi.dwFlags = SHIDIF_DONEBUTTON | SHIDIF_SIPDOWN; // | SHIDIF_SIZEDLGFULLSCREEN;
shidi.hDlg = hDlg;
SHInitDialog(&shidi);
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK)
{
ShowWindow(g_hndBox2, SW_HIDE);
}
break;
}
return FALSE;
}
How To Activate Context Menu For Listview Item
I'd like to create a context menu that works like the one in Windows explorer.
I.e. when you right-click on an item
the listitem under the cursor should be selected
and a popupmenu should be desplayed.
So far it looks as if the Click event is triggered, no matter whether the left or right mouse button is clicked. (I need left-clicks for another purpose).
I tried trapping the MouseDown-event, but then I don't know how to select the item under the cursor (HitText returns Nothing).
Any help greatly appreciated.
Select Item In Context Menu Of Another Application
I want to know if there is any way to invoke item in context-menu of another application.
Situation: I have an application which is a data window with “SysListView32” class. When I right click inside this window, the context menu pops-up and there is a option to copy the data, which basically gets copied to clipboard.
Problem: The problem is that the the ‘copy’ option of the context-menu doesn’t have ‘Ctrl+C’ option so sendkey doesn’t copy data from this window.
What I want? – I want to know if there is any other way where I can get menu handle or menu-id of one particular option within context menu. I want to send message to this window and achieve the result that would happened when ‘Copy’ option is selected within the context menu.
Thought – I know something like this is possible for normal menu options that are there on top of the window, like you can SendMessage to menu-id.
Can a similar this be achieved for auto selecting a particular option of context-menu of another application?
Would appreciate help on this one?
Add Application To Windows Explorer Context Menu
Could someone help me please?
I need to add an application to the Windows Context Menu (right-click file --> Open with MyApp). I have Googled, VBCity'd, MSDN'd and Yahoo'd for the answer, but to no avail
Maybe someone has a snippet they have used?
Thanks
(VB6 please)
Criticism comes easier than Craftmanship
Whilst I try and answer every thread there is, I find most of my answers to your posts here:
[Posting Guidelines] | [FAQ's] | [The Chosen One] | [Knowledge Search] | [Richie's Wisdom Forum]
Edited by - rjhare on 4/11/2007 5:44:32 AM
Select Context Menu Item Of Another Application
I want to know if there is any way to invoke context-menu option of another application.
Situation: I have an application which is a data window with “SysListView32” class. When I right click inside this window, the context menu pops-up and there is a option to copy the data, which basically gets copied to clipboard.
Problem: The problem is that the the ‘copy’ option the context-menu doesn’t have ‘Ctrl+C’ option so sendkey doesn’t copy data from this window.
What I want? – I want to know if there is any other way where I can get menu handle or menu-id of one particular option within context menu. I want to send message to this window and achieve the result that would happened when ‘Copy’ option is selected from the context menu.
Thought – I know something like this is possible for normal menu options that are there on top of window, like you can sendmessage to menu-id. Can a similar this be achieved for auto selecting a particular option of context-menu of another application?
Would appreciate help on this one?
Reply to hskohli@hotmail.com
Select Item In Context Menu Of Another Application
I want to know if there is any way to invoke item in context-menu of another application.
Situation: I have an application which is a data window with “SysListView32” class. When I right click inside this window, the context menu pops-up and there is a option to copy the data, which basically gets copied to clipboard.
Problem: The problem is that the the ‘copy’ option of the context-menu doesn’t have ‘Ctrl+C’ option so sendkey doesn’t copy data from this window.
What I want? – I want to know if there is any other way where I can get menu handle or menu-id of one particular option within context menu. I want to send message to this window and achieve the result that would happened when ‘Copy’ option is selected within the context menu.
Thought – I know something like this is possible for normal menu options that are there on top of the window, like you can SendMessage to menu-id.
Can a similar this be achieved for auto selecting a particular option of context-menu of another application?
Would appreciate help on this one?
hskohli@hotmail.com
Edited by - Harmeet_Kohli on 11/12/2003 8:59:06 AM
Context Menus Like Winzip...
Hi,
I'm developing an app that when you rightklick on a diectory adds an option to the windows explorer context menu (Run as mod...) Just like zinip or winrar do.
Can naybody give me some help on this?
Thanks a lot.
Disable MDI Parent's System Context Menu Right && Left Click Menu Pop-up. How?
I am trying to do this without much luck, but managed to get rid-of the Min/Max buttons via an MS example at the link below.
http://support.microsoft.com/default.aspx?scid=kb;en-us;137033
However, when a user right clicks on-the MDI parent's Caption bar, a popup up menu appears - Woud like to prevent that.
Secondly, if a user "LEFT" Click on the top Left corner of the same Caption bar (where the Icon appears); it pops the same Pop-Up Menu - Like to stop that.
Thirdly, If a user double clicks on the same menu bar, form flickers, bobs down & up (Min & back to Max state), looks back at you and say's "fooled Ya!", as if it was possessed by some sort of strange evil code. Now I Would really, really, like to make it stop doing that.
Basically, like to prevent any mouse action on MDI Parent's Title Bar. Searched for couple of hours in vain (pain), but nothing turned up for what I am looking for. I can stop the right click on the form it-self by detecting mouse down button, but that’s not preventing the click event in MDI parent's title/caption bar.
Anyone know how or what needs to be done to get this to work? Any and all help, suggestions, etc. will be greatly appreciated!
Add Custom Menu Item To Windows Right Click Context Menu ????
Hi everyone
Earlier today there was a thread with this Q in it but it wasnt ever resolved. What i want to do is add my own custom entry to the windows menu that pops up when you right click on an something in particular to the edit menu. So when you select some text no matter what app your in it has my custom menu option in it along with the usual copy and paste and what not.
Can this be done
If so how and where do i start ??
Invoke LabelEdit On Listview Through Code
I have my listview set for set with LabelEdit = lvwAutomatic and if I click on the listview I get the LabelEdit.
The problem is that I want to invoke the LabelEdit method when the user right clicks on the listview and
clicks on my popup menu.
I have the popup menu showing and when the user clicks on the menu I can not get the LabelEdit to happen.
Anyone know how to accomplish this?
Thanks for any help or suggestions.
Popup Menu, Context Menu Dynamic Creation?
Hi everyone,
i used the google search and the forum search but i didnt find any suitable result.
What i want to do:
i want to display a popup menu which is dynamic created from an xml file. i read the xml file to my own private type structure and now i want to display a popup menu. the only, as i think very ugly way i found is sevpopup menu active x. the problem with that menu is, that in every way there is a space for icons in menu which i dont have and the other problem is that i want to copy and not to install the application.
Really important for me is that i can create submenus!
Thank you all for help!
buechse
How To Add Menu Item To The Windows Explorer Context Menu Using Vb6
Hi,
Can anyone please let me know,
How to add my application item "Run My application" to the windows explorer context menu and on right click-> click on this item , i need to run my application. How can i do this using VB6? its exactly like winzip and other programs doing. First thing is i want to add to the context menu of windows explorer and on click my item, i need to know on whick item user selected this option. I need to do this in VB6. Please help me in this regard.
thanking you
Praveen
Regarding HTML Help File Invoke From Application
Hai guys,
Problem,
In My Application MDI Form, I have Help Menu, under this menu, there are Content, Index and Search Menu Items. When I click the Index menu item, a help file (CHM) is shown with HH.exe.
Problem, I need Index tab to be Active when i click the Index Menu Item. Like wise, if i click the content menu item, Help file should display the content Tab and same for Search Menu item. How to Do it.
Create Your Own Option In WINZIP S/w Menu
Dear All,
Scenario:
In Winzip s/w there is Options menu.
There are some options in that menu e.g Configuration, pasword, e.t.c
I want to put my own option in this menu.
Can u guide me how can i do this.
Other than Winzip, u may guide me to do so in any commonly used s/w.
I am eager to find how it can be done.
Regards,
How To Add Menu In Windows Explorer Context Menu
hi again,
I would like to add my custom menu to windows explorer.
some what i know that i need to add key entry into registry. and i did that. but it did not work
can any one help me..
Thanks in advance.
meena
How Do I Design A Context Menu (Popup Menu) In VB?
Hi,
I want to design a popup menu for a form in VB. I already have a menu for the form. This menu is displayed below the title bar. When I try to use the Menu Editor, it only lets me edit this menu. I want to design a new menu which will popup like a context menu. How do I do this?
Any help would be greatly appreciated.
Add Menu Item To Context Menu
How can I add a sub menu to the popup menu that you get when you right-click the desktop (similar to the attached picture)?
Context Menu
How i can get my application name in system context menu when right click on a file and on click opens that file in my application? Like winzip.
Please give me some suggestions.
thanx
Context Menu
I want to know how to invoke item in context-menu of another application.
Situation: I have an application which is a data window with “SysListView32” class. When I right click inside this window, the context menu pops-up and there is a option to copy the data, which basically gets copied to clipboard.
Problem: The problem is that the the ‘copy’ option of the context-menu doesn’t have ‘Ctrl+C’ option so sendkey doesn’t copy data from this window.
What I want? – I want to know if there is any other way where I can get menu handle or menu-id of one particular option within context menu. I want to send message to this window and achieve the result that would happened when ‘Copy’ option is selected within the context menu.
Thought – I know something like this is possible for normal menu options that are there on top of the window, like you can SendMessage to menu-id.
Can a similar this be achieved for auto selecting a particular option of context-menu of another application?
Would appreciate help on this one?
Context Menu
Hi all,
I want to write an application in VB 6.0, it automatically calls a context menu item of a control in .net application (It looks like we right-click on that control and choose a menu item when the context menu appeared).
Everyone who know it, help me pls.
Thanks in advance,
Context Menu In The .exe
Hi.
There are some programs that when you click on their .exe file, the context menu that is displayed has some uniqe options. For example WinZip has those: "Compress to Zip File" "Compress Ass..." etc.
How can i do that?
Thanks
IE Context Menu
Hi
I'm trying to implement my application to the internet explorer context menu. I managed to show the title of my application in the menu but there is no action using these registry keys:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt&MyAppl
(Standard)=P:WorkvbMyAppl.exe
contexts=1
What I'd like to do: As you click the menu entry, my application will get the url of the current page (or frame) like the way you can read it out in the properties.
Can anybody help me or give me some hints?
thanks and regards
Xdream
Context Menu
I have a question here. I need to know how to make a custom context menu, like when i right click on an item in a list box for example, a context menu with stuff i want on it will appear.
Abt....Context Menu
hi
i have 2 thing...
first i need to add my app shortcut with icon to windows SendTo option....
and the next i need to call the SendTo menu in my app... the existing all shortcuts in windows.
i tried making entried in register but that seams of no use... may be not at correct level.
Context Menu In IE
i want my app to do somethings with Internet Explorer pages..the best way is actually having menu's in the ie's context menu..and i already did that..i already created the menu but now i want to know how to use it:
http://msdn.microsoft.com/library/de...ls/context.asp here says that i must put a link to a script..but how do i make the script..? can the script be made in vb6? and in vb.net?
im a little desesperate about this for help..
any help appreciated
Context Menu
Hi,
How do i add a menu to the windows context menu similar to WinZip where you can right click on a file and click on "Add to Zip".
Some code(module) would be appriciated.
Thanks
Swf Context Menu
Does anyone know a way to disable the context menu which appears when you right click on a swf? In the control's properties, you can disable everything except for the last selection.....which is a link to Macromedia's website. My goal is preventing users from opening up I.E.
I've tried using a webbrowser control instead of the shockwave control to display the swf. With this I used Bloodeye's code to disable right click in a webbrowser, which worked w/ html pages, but not when the url was a non-embedded swf.
any ideas?
Context Menu
Hi all,
I have made a usercontrol that show files/folders from a specific path using a ListView control.
Is possible to show the context menu for my file/folder with a right click, like Windows?
Thanks to all
Context Menu
Hi,
suppose I've popped up a context menu
now the menu is open
but it wont close until I do a left click somewhere outside its area. What I want is on rightclick outside the are to reopen it again on the new position.
Any ideas?
Thanks
Valery Iskarov Nikolov
Software Dynamics
Context Menu
I have a problem displaying underlined symbols in Context Menu under Windows 2000. Everything is fine if I run application under WinNT 4.0.
CMenu menu;
if( menu.CreatePopupMenu() )
{
menu.AppendMenu(MF_STRING, ID_MY_ID, (LPCTSTR)_T("&MyMenu1") );
menu.TrackPopupMenu( TPM_LEFTALIGN | TPM_RIGHTBUTTON, 100, 100, this );
}
Context Menu
Hi! In my application there are many textboxs , and how can I make the context
menu do not visible when user click mouse right button in the textbox ?
Thanks !
Context Menu
When I right click on a maskedit box, windows default popup menu (Cut/Copy/Paste/Undo/Select All) is displayed. I want to disablel this popup menu. I know that this can be done if I invoke another user made dummy menu. But I don't want any kind of menus.
Software Engineer
Bangalore
Context Menu In NT
Hi,
I am making a submenu in context menu of the explorer. For that I am using the API calls for InsertMenu etc. The code is working fine for all the OS except Windows NT. In NT it makes the submenu and the icon associated with the menu but the text of the menu does not appears. Even the functionality of the menu is working properly.
Does anyone have any idea about it ?
Please reply soon
thanks in advance
Mayank Kumar
HELP On Context Menu
can someone tell me how to implement this,.,.I want to ADD TO..NOT REPLACE the internet explorer context menu. I want to add "Open in new tab" option to the right click menu..heres how its supposed to be done..just need the "explained code" for how to read/write/and delete from the registry....
Implementation Steps
The following steps are required to add an entry into the standard context menus in Internet Explorer.
Create a new key, using the text you want displayed in the context menu as the name, under:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt
The result should look like:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt<Menu Text>
<Menu Text> should be replaced with the text that you want displayed in the context menu. The name can include an ampersand (&) character, which will cause the character that follows to be underlined and used as a shortcut key.
Set the default value of the key to the URL of the page that contains the script you want the context menu entry to execute. This script can obtain the parent window object, the screen where the context menu item was executed, from the menuArguments property of the external object.
Optional. Create a binary value, Contexts, under:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt<Menu Text>
The result should look like:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt<Menu Text>Contexts
Set the value of Contexts to indicate which contexts your entry should appear in the standard context menu by using a bit mask consisting of the logical OR of the following values:
Context Value
Default 0x1
Images 0x2
Controls 0x4
Tables 0x8
Text selection 0x10
Anchor 0x20
For example, if you want your context menu entry to appear in the default context menu and when the context is a text selection, set the value of Contexts to 0x11.
Optional. Create a DWORD value, Flags, under:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt<Menu Text>
The result should look like:
HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExt<Menu Text>Flags
Set the value of Flags to 0x1 to make the script run just as if it had been called through the showModalDialog method. Unlike the showModalDialog method, the script can access the window object of the parent window from the menuArguments property of the external object.
so Ive all of the Pseuso code..i just need the "how to" and comment on the code to explain it to me would be great!
How Do A Add A Context Menu To A SSTab?
Hi,
I'm currently trying to add a right click popup menu to a sstab. The menu appears fine, but it doesn't select the tab that I right click (the previously selected tab remains selected). I'm currently trying to make the menu appear in SSTab_MouseUp. I need to know which tab is selected because I want to delete the selected tab.
Anybody have any idea?
Thanks!
Windows Context Menu
I can use
[HKEY_CLASSES_ROOT xtfileshellMyCommand]
@="MyCommand"
[HKEY_CLASSES_ROOT xtfileshellMyCommandcommand]
@="C:\WINDOWS\System32\myapp.exe "%1""
To add a right click context menu to explorer for filetype txtfile, with exception of adding the same entry for all registered filetypes in windows, does anyone know how to add a context entry so it displayes when ANY file is right clicked?
Context Menu In Outlook
Hi all
I try to add a button (link towards a macro) in the 'context menu' under outlook XP.
In light I want to be able to make a right click on a mail and launch an action on this mail.
Thank you in advance for your help …
Explorer Context Menu
Hi,
Is it possible to write an explorer shell extension that appears in the right-click context menu using VB6? Is it difficult to do?
Best regards,
AstroTux.
|