Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

SHQueryUserNotificationState function

Checks the state of the computer for the current user to determine whether sending a notification is appropriate.

Syntax


HRESULT SHQueryUserNotificationState(
  _Out_  QUERY_USER_NOTIFICATION_STATE *pquns
);

Parameters

pquns [out]

Type: QUERY_USER_NOTIFICATION_STATE*

When this function returns, contains a pointer to one of the values of the QUERY_USER_NOTIFICATION_STATE enumeration.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Applications should call SHQueryUserNotificationState and test the return value before displaying any notification UI that is similar to the balloon notifications generated by Shell_NotifyIcon. Notifications should only be displayed if this API returns QNS_ACCEPTS_NOTIFICATIONS. This informs the application whether the user is running processes that should not be interrupted. Top-level windows receive a WM_SETTINGCHANGE message when the user turns presentation settings on or off, and also when the user's session is locked or unlocked. Note that there are no notifications sent when the user starts or stops a full-screen application.

If this function returns QUNS_QUIET_TIME, notifications should be displayed only if critical.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shellapi.h

DLL

Shell32.dll

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.