How to change lockscreen wallpaper by using Windows SDK (C++) or modifying registry?

Jiakang Li 20 Reputation points

Hi all.

My Windows version is Windows 10 22H2 19045.2846, and I'd like to change my lockscreen wallpaper by using Windows SDK (or dll function), but I can't find any function for it.

I want to get a function, which is equal to [Setting]-[Personalize]-[Lockscreen Interface]-[Select picture] operation.

How can I implement this functionality (not using UWP/C# but C++ or C)?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
7,562 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,071 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,911 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 5,981 Reputation points Microsoft Vendor


    Welcome to Microsoft Q&A!

    According to your description (Windows SDK) and the tag (Windows App SDK), whether you want to use winui3 project (Windows App SDK) or desktop project (Windows SDK)?

    For desktop project:

    According to the Doc: Personalization CSP

    I suggest you could try to change the registry by creating a new key in the


    For more details, you could refer to the threads:

    For winui3 project:

    You could follow Castorix31's suggestion. And you could refer to the sample: Lock screen personalization sample

    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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Castorix31 71,866 Reputation points
    1 person found this answer helpful.