Click here to Skip to main content
16,006,442 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Suspend ShellExcuteExd Pin
Richard Andrew x642-Apr-10 9:56
professionalRichard Andrew x642-Apr-10 9:56 
GeneralRe: Suspend ShellExcuteExd Pin
Orion Star2-Apr-10 10:09
Orion Star2-Apr-10 10:09 
GeneralRe: Suspend ShellExcuteEx Pin
Orion Star2-Apr-10 9:45
Orion Star2-Apr-10 9:45 
AnswerRe: Suspend ShellExcuteEx Pin
Adam Roderick J1-Apr-10 19:58
Adam Roderick J1-Apr-10 19:58 
GeneralRe: Suspend ShellExcuteEx Pin
Orion Star2-Apr-10 4:13
Orion Star2-Apr-10 4:13 
GeneralRe: Suspend ShellExcuteEx Pin
Adam Roderick J2-Apr-10 5:11
Adam Roderick J2-Apr-10 5:11 
GeneralRe: Suspend ShellExcuteEx Pin
Orion Star2-Apr-10 9:35
Orion Star2-Apr-10 9:35 
QuestionWindows 7 JumpLists! Pin
Fareed Rizkalla1-Apr-10 8:28
Fareed Rizkalla1-Apr-10 8:28 
Every time I run this code it fails at AppendCategory to the JumpList.
Any pointers or what effects that could cause that.

Thanks in advance. Wink | ;)


ICustomDestinationList* pJumpList = NULL;
if (SUCCEEDED(CoCreateInstance(CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pJumpList))))
{
    MessageBox (NULL, (LPCSTR)"JumpList variable Created!", (LPCSTR)"JumpList", MB_OK);
    if (SUCCEEDED(pJumpList->SetAppID(L"My App")))
    {
        MessageBox (NULL, (LPCSTR)"AppID Set!", (LPCSTR)"JumpList", MB_OK);
        UINT uMaxSlots;
        IObjectArray* pRemoved;
        if (SUCCEEDED(pJumpList->BeginList(&uMaxSlots, IID_PPV_ARGS(&pRemoved))))
        {
            MessageBox (NULL, (LPCSTR)"Beginning to create JumpList!", (LPCSTR)"JumpList", MB_OK);
            IObjectCollection* pContents = NULL;
            if (SUCCEEDED(CoCreateInstance(CLSID_EnumerableObjectCollection, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pContents))))
            {
                // HALTS HERE! File didn't exist, WORKING!
                MessageBox (NULL, (LPCSTR)"Created ObjectCollection!", (LPCSTR)"JumpList", MB_OK);
                IShellItem* pItem = NULL;
                if (SUCCEEDED(SHCreateItemInKnownFolder(FOLDERID_Downloads, KF_FLAG_DEFAULT, L"iTunes64Setup.exe", IID_PPV_ARGS(&pItem))))
                { // KF_FLAG updated since RC
                    MessageBox (NULL, (LPCSTR)"Identified Item to ShellItem!", (LPCSTR)"JumpList", MB_OK);
                    if (SUCCEEDED(pContents->AddObject(pItem)))
                    {
                        pItem->Release();
                        MessageBox (NULL, (LPCSTR)"Added ShellItem to ObjectCollection!", (LPCSTR)"JumpList", MB_OK);
                        IObjectArray* pContentsArr = NULL;
                        if (SUCCEEDED(pContents->QueryInterface(IID_PPV_ARGS(&pContentsArr))))
                        {
                            //UINT count;
                            //pContentsArr->GetCount(&count);
                            //MessageBox(NULL, (LPCSTR)count, (LPCSTR)"ObjectArray", MB_OK);
                            pContents->Release();
                            // HALTS HERE!!
                            MessageBox (NULL, (LPCSTR)"Linking ObjectCollection to ObjectArray!", (LPCSTR)"JumpList", MB_OK);
                            if (SUCCEEDED(pJumpList->AppendCategory(L"Custom Category", pContentsArr)))
                            {
                                pContentsArr->Release();
                                MessageBox (NULL, (LPCSTR)"Appended ObjectArray to the JumpList!", (LPCSTR)"JumpList", MB_OK);
                                pJumpList->CommitList();
                                MessageBox (NULL, (LPCSTR)"JumpList Created!", (LPCSTR)"JumpList", MB_OK);
                            }
                            else
                            {
                                MessageBox (NULL, (LPCSTR)"Can't AppendCategory!", (LPCSTR)"JumpList", MB_OK);
                            }
                        }
                    }
                }
            }
        }
    }
}

QuestionWin32/GDI+ - Using a transparent PNG image as window background Pin
Member 38216201-Apr-10 8:24
Member 38216201-Apr-10 8:24 
AnswerRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Code-o-mat1-Apr-10 8:52
Code-o-mat1-Apr-10 8:52 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Member 38216201-Apr-10 8:58
Member 38216201-Apr-10 8:58 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Code-o-mat1-Apr-10 9:06
Code-o-mat1-Apr-10 9:06 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Member 38216201-Apr-10 9:33
Member 38216201-Apr-10 9:33 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
LunaticFringe1-Apr-10 11:13
LunaticFringe1-Apr-10 11:13 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Member 38216201-Apr-10 13:06
Member 38216201-Apr-10 13:06 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
LunaticFringe1-Apr-10 13:23
LunaticFringe1-Apr-10 13:23 
GeneralRe: Win32/GDI+ - Using a transparent PNG image as window background Pin
Code-o-mat1-Apr-10 21:35
Code-o-mat1-Apr-10 21:35 
QuestionA joke on C Pin
Edward10261-Apr-10 7:57
Edward10261-Apr-10 7:57 
AnswerRe: A joke on C Pin
CPallini1-Apr-10 8:10
mveCPallini1-Apr-10 8:10 
QuestionHow to do function with timout & getting message properly ? Pin
oppstp1-Apr-10 7:42
oppstp1-Apr-10 7:42 
QuestionRe: How to do function with timout & getting message properly ? Pin
David Crow1-Apr-10 8:15
David Crow1-Apr-10 8:15 
AnswerRe: How to do function with timout & getting message properly ? Pin
oppstp1-Apr-10 15:06
oppstp1-Apr-10 15:06 
QuestionPicture Control with scroll bars. PinPopular
ashwath19791-Apr-10 5:02
ashwath19791-Apr-10 5:02 
QuestionC++ Thousand Separators Pin
awesometrickycool1-Apr-10 2:37
awesometrickycool1-Apr-10 2:37 
AnswerRe: C++ Thousand Separators Pin
Garth J Lancaster1-Apr-10 2:56
professionalGarth J Lancaster1-Apr-10 2: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.