Click here to Skip to main content
15,887,477 members
Home / Discussions / C#
   

C#

 
AnswerRe: BPM Pin
DaveyM6925-Mar-10 14:34
professionalDaveyM6925-Mar-10 14:34 
GeneralRe: BPM Pin
kobola25-Mar-10 23:10
kobola25-Mar-10 23:10 
GeneralRe: BPM Pin
DaveyM6925-Mar-10 23:29
professionalDaveyM6925-Mar-10 23:29 
GeneralRe: BPM Pin
kobola25-Mar-10 23:32
kobola25-Mar-10 23:32 
GeneralRe: BPM Pin
DaveyM6925-Mar-10 23:39
professionalDaveyM6925-Mar-10 23:39 
GeneralRe: BPM Pin
kobola28-Mar-10 23:21
kobola28-Mar-10 23:21 
GeneralRe: BPM Pin
thorsten.de16-Apr-10 6:57
thorsten.de16-Apr-10 6:57 
QuestionWindows Shell Context Menu Pin
95ulisse25-Mar-10 5:51
95ulisse25-Mar-10 5:51 
Hello everyone,
I'm new to the forum and this is only my second post, so I apologize in advance for any mistakes.

This is my situation:
I'm using Microsoft Visual Studio 2008 with .Net Framework 3.5.
I'm developing an extension of the Windows Shell Context menu, and I did it, but I have a problem:
when my menu is invoked on the links (*.lnk), it doesn't work and prevents the upper voices.
This only occurs on Vista and Seven, not on XP.
This is the IContextMenu.QueryContextMenu:

int IContextMenu.QueryContextMenu(uint hmenu,
              uint iMenu,
              int idCmdFirst,
              int idCmdLast,
              uint uFlags)
            {

                //Clicked file
                StringBuilder sb = new StringBuilder(1024);
                DllImports.DragQueryFile(m_hDrop, 0, sb, sb.Capacity + 1);

                //If it's a link (*.lnk) exits
                //Maybe the mistake is here, but I don't know!
                if (new FileInfo(sb.ToString()).Extension == ".lnk") { return 1; }

                // Adds the menus
                for (int i = 0; i < Menus.Length; i++)
                {

                    //Updates the ID
                    Menus[i].MenuItemInfo.wID += idCmdFirst;

                    //Verifies if the menu has some submenus
                    if (Menus[i].SubMenu != null) { PopolateSubMenu(Menus[i], idCmdFirst); }

                    //Adds the menu
                    DllImports.InsertMenuItem(hmenu, Menus[i].Position - 1, 1, ref Menus[i].MenuItemInfo);

                    //Adds the icon
                    if (Menus[i].Image != null) {
                        System.Drawing.Bitmap Bmp = Menus[i].Image;
                        DllImports.SetMenuItemBitmaps((IntPtr)hmenu, (IntPtr)(Menus[i].Position - 1), 0x400, Bmp.GetHbitmap(), Bmp.GetHbitmap());
                    }

                }

                // Returns the number of added menu item
                return (int)(NumeroMenu + 1);

            }


I don't know what to do!
Please help me!

Thank you in advance for your help!

PS: I apologize for my bad English, too: I'm Italian!
AnswerRe: Windows Shell Context Menu Pin
95ulisse28-Mar-10 4:38
95ulisse28-Mar-10 4:38 
QuestionExchange Web Services (EWS) Pin
MWRivera25-Mar-10 4:40
MWRivera25-Mar-10 4:40 
AnswerRe: Exchange Web Services (EWS) Pin
MWRivera25-Mar-10 6:50
MWRivera25-Mar-10 6:50 
AnswerRe: Exchange Web Services (EWS) Pin
Ravi Bhavnani25-Mar-10 7:06
professionalRavi Bhavnani25-Mar-10 7:06 
GeneralRe: Exchange Web Services (EWS) Pin
MWRivera29-Mar-10 5:09
MWRivera29-Mar-10 5:09 
GeneralRe: Exchange Web Services (EWS) Pin
Travis Citrine2-Jul-15 17:56
Travis Citrine2-Jul-15 17:56 
QuestionExceptions across invoke Pin
richasea25-Mar-10 4:23
richasea25-Mar-10 4:23 
AnswerRe: Exceptions across invoke Pin
ricmil4225-Mar-10 4:50
ricmil4225-Mar-10 4:50 
GeneralRe: Exceptions across invoke Pin
richasea25-Mar-10 5:40
richasea25-Mar-10 5:40 
GeneralRe: Exceptions across invoke Pin
Keith Barrow25-Mar-10 6:17
professionalKeith Barrow25-Mar-10 6:17 
Questionproblem accessing a control from a thread (the callback is in another user defined class) Pin
George Nistor25-Mar-10 2:57
George Nistor25-Mar-10 2:57 
AnswerRe: problem accessing a control from a thread (the callback is in another user defined class) Pin
Covean25-Mar-10 3:33
Covean25-Mar-10 3:33 
GeneralRe: problem accessing a control from a thread (the callback is in another user defined class) Pin
George Nistor25-Mar-10 3:45
George Nistor25-Mar-10 3:45 
GeneralRe: problem accessing a control from a thread (the callback is in another user defined class) Pin
Covean25-Mar-10 3:59
Covean25-Mar-10 3:59 
QuestionHow to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 1:42
igalep13225-Mar-10 1:42 
AnswerRe: How to get values after dictionary sorting by values with linq Pin
Not Active25-Mar-10 1:46
mentorNot Active25-Mar-10 1:46 
GeneralRe: How to get values after dictionary sorting by values with linq Pin
igalep13225-Mar-10 1:56
igalep13225-Mar-10 1:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.