Поделиться через


Coding with Presentation Mode in mind

Following on from my post the other day on Presentation Settings, I wanted to give you some technical details on how to code your applications so users have a good experience when they are making presentations.

Firstly, it's worth checking out the UX (User Experience) guide on Notifications in Vista which is a work in progress document highlighting how to create notifications that are consistent with the Vista theme.

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/UxGuide/UXGuide/Controls/Notifications/Notifications.asp

Next, if you are not familiar with the Shell libraries in Windows, make sure you familiarise yourself with what they are here:

https://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_intro.asp

So now you are up to speed on notifications and the Windows Shell, you will need your app to access the user notification state of the shell by using checking the  SHQueryUserNotificationState.   This will give you an indication as to whether you can send notifications to the user by telling your code what mode Windows is currently running in.  There are a few modes available including "Presentation Mode" which means that the user has turned on Presentation settings.

You can also be notified of the change in setting by listening to the WM_SETTINGCHANGE message and then checking the state afterwards.

The documentation for this can be found here: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shqueryusernotificationstate.asp

I'm going to be doing a screencast on how to put this into practice soon, so stay tuned.