How to use Widgets for Windows Desktop applications?

Smit Himanshu Shah 46 Reputation points
2023-06-27T05:31:27.5833333+00:00

I am trying to build a windows desktop application (C++) in unpackaged mode (as a single executable). I want the application to support widgets.

I tried following the steps mentioned here. It however required me to package the application in a UWP project (this is mentioned as a prerequisite).

However, I prefer having a standalone desktop style executable. Is it possible to achieve this without UWP artefacts?

Developer technologies | Universal Windows Platform (UWP)
Windows development | Windows App SDK
Windows development | Windows API - Win32
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 21,646 Reputation points
    2023-06-27T08:11:39.3666667+00:00

    Hi @Smit Himanshu Shah

    Welcome to Microsoft Q&A!

    I am trying to build a windows desktop application (C++) in unpackaged mode (as a single executable). I want the application to support widgets.

    It is stated in the document that currently only packaged apps can be registered as widget providers.

    It however required me to package the application in a UWP project (this is mentioned as a prerequisite).

    Your project is still a windows desktop application, not packaged into a UWP project, your project is packaged as an MSIX project.

    However, I prefer having a standalone desktop style executable. Is it possible to achieve this without UWP artefacts?

    It is not possible at present, it is recommended that you follow the steps in the document Implement a widget provider in a win32 app (C++/WinRT) to create your widget.

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.