-1

As I mentioned in the title, I want to create C++ console application with jump list.

I searched too much websites including this website.

For example, I looked especially these websites:

Chapter 14: Adding Support for Windows 7 Jump Lists & Taskbar Tabs

Windows 7 Goodies in C++: Adding Custom Tasks to Jump Lists

But I don't still get it.

I am newbie at COM objects.

Image sample which I want:

Can I do this like:

int main(int argc, char* argv[])
{
   //Write something and compile!
}
DrakeMcCain
  • 129
  • 3
  • 14
  • Why don't anybody answer my question? – DrakeMcCain Apr 13 '18 at 11:39
  • 1
    I can't speak for anyone else, but I didn't see your question until just now (11 hours after you posted it). You can't expect answers in real-time, it may take time for people to respond. Be patient. As for your question, asking for a tutorial is off-topic for StackOverflow. Read MSDN's documentation, all the information you need is there. You already found one article with good information to answer your question. If you are having trouble understanding something *specific*, then you need to say what that something is. Your question is currently a bit too broad. What *exactly* don't you get? – Remy Lebeau Apr 13 '18 at 16:00
  • As I mentioned in my question and the image which I shared, I want to show a task list for my application's start menu shortcut. I read MSDN document; but where do I add these codes in my app? In main() or another location? – DrakeMcCain Apr 13 '18 at 17:36
  • You are only saying what you WANT to achieve, but not what is PREVENTING you from achieving it. What is the ACTUAL PROBLEM you are having with following the instructions in the articles? Did you try the code examples? Did you read the documentation for the COM interfaces that are mentioned? BE SPECIFIC about your problem. If you just don't understand how to work with COM in general, then I suggest you follow some COM tutorials first before you then tackle Jump Lists. And yes, you would write code in your `main()` function to handle this. – Remy Lebeau Apr 13 '18 at 17:45

1 Answers1

0

Ok, I have solved my problem; but in C#, not in C++ like this:

using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using Microsoft.WindowsAPICodecPack.Shell;
using Microsoft.WindowsAPICodecPack.Taskbar;

namespace StackOverFlow
{
  class StackOverFlowJumpList
  {
    private JumpList StackOverFlowList;

    private void StackOverFlowBuildList()
    {
      string StackOverFlowTask = Path.Combine(System.Reflection.Assembly.GetExecutionAssembly().CodeBase, "StackOverFlow.exe");

      JumpListLink StackOverFlowLink = new JumpListLink(StackOverFlowTask, "StackOverFlow");

      StackOverFlowLink.IconReference = new IconReference(StackOverFlowTask, 0);

      StackOverFlowList.AddUserTasks(StackOverFlowLink);

      StackOverFlowLink.Refresh();
    }
  }
}
DrakeMcCain
  • 129
  • 3
  • 14