ipropertystorage

SHGetPropertyStoreForWindow - How to set properties on existing System.AppUserModel.ID

折月煮酒 提交于 2019-12-07 16:58:49
问题 So I split my window from the main tab group via IPropertyStore via SHGetPropertyStoreForWindow like so: IPropertyStore_SetValue(pps, PKEY_AppUserModel_ID.address(), 'Contoso.Scratch'); pps->Commit(); Then the user later decides he wants to rename it so with my feature he does: IPropertyStore_SetValue(pps, PKEY_AppUserModel_RelaunchCommand, customLaunchPath); IPropertyStore_SetValue(pps, PKEY_AppUserModel_RelaunchDisplayNameResource, 'my first name'); pps->Commit(); This works successfully

SetValue and Release are not functions

怎甘沉沦 提交于 2019-12-02 08:25:30
问题 In summary: I searched MSDN and thought to create my own SetValue but I can't find any sourcecode for it. It's not in a DLL, its like InitPropVariantFromString , it's in a header file, but I can't find it. :( If you can please just show me htat C++ code I'll take it from there :) Bottom stuff is to show the efforts I put on it. This is the tiny C++ code I'm converting: OnCreate(HWND hwnd, LPCREATESTRUCT lpcs) { IPropertyStore *pps; HRESULT hr = SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(