Dettecting Change to windows appearance / XP styles
-
Afternoon Gents (and ladies) I'm writing an app that uses some information from windows settings to set layout metrics. I've retrieved all the metrics information successfuly, but i'm not sure how to detect when it's changed. I'd like to have the settings fixed for my object and changed only when the windows appearance is modified, as currently they are tested and updated on every redraw action. I'm making this component in C#, but i'm looking for the system event to marshal into my program as it will dramatically improve efficiency. Cheers Cata
-
Afternoon Gents (and ladies) I'm writing an app that uses some information from windows settings to set layout metrics. I've retrieved all the metrics information successfuly, but i'm not sure how to detect when it's changed. I'd like to have the settings fixed for my object and changed only when the windows appearance is modified, as currently they are tested and updated on every redraw action. I'm making this component in C#, but i'm looking for the system event to marshal into my program as it will dramatically improve efficiency. Cheers Cata
You should be fine if you handle the
WM_SYSCOLORCHANGE
message. You could then refresh your color cache. In C#, you have to handle theSystemColorsChanged
for the form or control. Yves -
You should be fine if you handle the
WM_SYSCOLORCHANGE
message. You could then refresh your color cache. In C#, you have to handle theSystemColorsChanged
for the form or control. YvesThanks, but it's not just the colour. It's the text size, border sizes, and whether themes are enabled / disabled in XP. If a user changes these without changing the colour, then it won't update properly. I'm sure I read about a system metrics change method somewhere, but it was in the windows SDK. Any other thoughts? Cata