Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 3085

How do I revert a control back to its default theme?

$
0
0

A customer disabled visual styles for their control so that they could do custom rendering, but when the system switches to high contrast mode, they want to abandon their customizations and revert to the system styles.

// Disable visual styles for this control so we can
// draw it our own way.
SetWindowTheme(hwndControl, L"", L"");

But how do they undo the effect of that call and tell the system, "Um, hey, I know I told you that I didn't want the system to draw any visual styles, but I changed my mind. Can you draw visual styles for me after all?"

You can return to the default behavior by passing NULL for the last two parameters.

When pszSubAppName and pszSubIdList are NULL, the theme manager removes the previously applied associations.

// Return to default visual styles for this control.
SetWindowTheme(hwndControl, NULL, NULL);

Viewing all articles
Browse latest Browse all 3085

Trending Articles


Practice Sheet of Right form of verbs for HSC Students


Rajasthan Board 10th Result 2016 Roll No wise & Name Wise


Moondru Mudichu 20-07-2016 – Polimer tv Serial


fs_older_downloads


Calaveras conflict results in shooting, 4 arrests


Guilty Pleasures


Black Angus Grilled Artichokes


Download: Rich Bizzy -Panono Ukwenda (Cover)


Muloraki Au


where in jaunpur randi khana



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>