How to be unable to select item(s) in menu when right-clicked
-
Hello, everyone. I'd like to develop ".exe" file by using VC++ 6 SP5 with Windows XP SP1. The content is that during executing this program, when right-click is done over the icon of file or folder in Explorer, the user can't select item(s) of popup menu(context menu). This "can't select" means that item(s) such as "open" or "edit" etc, is/are disapeeared completely. Or the name of item is appeared with gray and unable to select. I read topics in "Shell Programming", but I could't find helpful topic about above method.:sigh: Is it some experienced in development? Or are someone known method? If knows, and helpful www link(s) also exist(s), I'm glad. Please tell me.
-
Hello, everyone. I'd like to develop ".exe" file by using VC++ 6 SP5 with Windows XP SP1. The content is that during executing this program, when right-click is done over the icon of file or folder in Explorer, the user can't select item(s) of popup menu(context menu). This "can't select" means that item(s) such as "open" or "edit" etc, is/are disapeeared completely. Or the name of item is appeared with gray and unable to select. I read topics in "Shell Programming", but I could't find helpful topic about above method.:sigh: Is it some experienced in development? Or are someone known method? If knows, and helpful www link(s) also exist(s), I'm glad. Please tell me.
.EnableWindow(FALSE)
-
Hello, everyone. I'd like to develop ".exe" file by using VC++ 6 SP5 with Windows XP SP1. The content is that during executing this program, when right-click is done over the icon of file or folder in Explorer, the user can't select item(s) of popup menu(context menu). This "can't select" means that item(s) such as "open" or "edit" etc, is/are disapeeared completely. Or the name of item is appeared with gray and unable to select. I read topics in "Shell Programming", but I could't find helpful topic about above method.:sigh: Is it some experienced in development? Or are someone known method? If knows, and helpful www link(s) also exist(s), I'm glad. Please tell me.
>wisecrack: Thank you for answering. By the way, after posting message I looked into more information. And I found that "CMenu:CEnableMenuItem" may be right. My goal is to develop MFC project of dialog base. For example, here is a goal that when right-clicked over the icon of text file in Explorer, the item "cut" is glay. The below is the method. I created new MFC project of dialog base. (The project name is "Click".) And I added below code of "OnRButtonDown" with Class Wizard into "CClickDlg.cpp" file: === void CClickDlg::OnRButtonDown(UINT nFlags, CPoint point) { // TODO: CMenu *hMenu; CWnd* cwParent = GetParent(); DWORD dwStyle = cwParent->GetStyle(); hMenu = cwParent->GetSystemMenu(FALSE); hMenu -> EnableMenuItem(ID_EDIT_CUT, MF_GRAYED); CDialog::OnRButtonDown(nFlags, point); } === And including "afxres.h" in the first of "CClickDlg.cpp" file, I built "Click.exe" file. With "Click.exe" executing, I executed "explorer.exe" and I clicked right button over a certain text file. But the item "cut" wasn't glay. Which point of my method is wrong? If there is another good idea or programming flow, please tell me.