Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a tile to an MFC application

I have a C++ MFC application that has a bunch of dialogs which are defined in an .rc file. I need to add a tile to the application for pinning it to the start menu because the default "tile" that Windows creates from the icon doesn't look very good. Rewriting the whole application to use XAML instead of the .rc file isn't an option right now. The tile doesn't need to be interactive, just display a better looking picture than just slapping the small icon in.

Is there a way to add a tile to an MFC application with an .rc file?

If not, the other idea I had was to create a wrapper application which uses XAML to create a tile, and the only thing the wrapper application would do is launch the MFC application. Does anybody have a better solution?

I am using Visual Studio 2015. The .ico file I'm using has 768x768, 512x512, 256x256, 150x150, 48x48, 32x32, and 16x16 versions of the image in it.

Edit

There was some confusion about what exactly I needed. Here is an annotated screen shot which hopefully shows the issue clearly. annotated screen shot showing, default tile with small icon

One other clarification, I don't think this makes any difference, but I thought I'd add it just to be safe. The program does not need to run on Windows 8/8.1, just Windows7 and Windows10

like image 337
spikeynick Avatar asked Aug 12 '15 15:08

spikeynick


1 Answers

After extensive research it is clear that this is not possible. Not only is it not possible with MFC, but the only way to create a tile (live or static) is with a Windows Universal App. So my solution here is to create a simple launcher program that starts up the MFC application and then exists. However, one caveat here is that Windows Universal programs are not allowed to directly run other programs. What they are allowed to do is open a file with it's default program. So I created a new file extension and assigned the default application to be the MFC program.

like image 65
spikeynick Avatar answered Oct 03 '22 07:10

spikeynick