Jump to content

WinAlarm: Difference between revisions

From EDM2
m Redirected page to OS2 API:PMI:WinAlarm
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
#REDIRECT [[OS2 API:PMI:WinAlarm]]
== WinAlarm ==
; WinAlarm(desktopHandle, alarmStyle) : Generates an audible alarm.
 
=== Parameters ===
; desktopHandle - [[HWND]] - input : The desktop handle.
; alarmStyle - [[ULONG]] - input : The alarm style to be.
 
=== Constants ===
These are the differing alarm tone constants:
* [[WA_WARNING]]
* [[WA_NOTE]]
* [[WA_ERROR]]
 
The frequency of these alarm types can be changed with [[WinSetSysValue]]. The alarm frequency range is 0x0025 through 0x7FFF. If [[SV_ALARM]] is set to [[FALSE]] then no alarm will sound.
 
=== Returns ===
This function returns a [[BOOL]] with the values of:
* [[TRUE]]
* [[FALSE]]
 
Possible errors from [[OS2 API:WinGetLastError|WinGetLastError]] are:
* [[OS2 API:PMI:error#PM_INVALID_HWND|PM_INVALID_HWND]]
* [[OS2 API:PMI:error#PM_INVALID_PARAM|PM_INVALID_PARAM]]
 
=== Module ===
DOSCALLS
 
=== Define (C/C++) ===
INCL_WINDIALOGS or INCL_WIN or INCL_PM or INCL_COMMON
 
=== Calling conversion ===
[[Cdecl32]]
 
=== Example Code ===
...
APIRET rc;
rc = WinAlarm (HWND_DESKTOP, WA_NOTE);
...
 
=== Related Functions ===
[[WinFlashWindow]]
[[WinMessageBox]]
 
=== Notes ===
[[WinAlarm]] function also used for multimedia subsystem notification.
 
[[Category:Win]]

Revision as of 19:59, 28 November 2016

WinAlarm

WinAlarm(desktopHandle, alarmStyle)
Generates an audible alarm.

Parameters

desktopHandle - HWND - input
The desktop handle.
alarmStyle - ULONG - input
The alarm style to be.

Constants

These are the differing alarm tone constants:

The frequency of these alarm types can be changed with WinSetSysValue. The alarm frequency range is 0x0025 through 0x7FFF. If SV_ALARM is set to FALSE then no alarm will sound.

Returns

This function returns a BOOL with the values of:

Possible errors from WinGetLastError are:

Module

DOSCALLS

Define (C/C++)

INCL_WINDIALOGS or INCL_WIN or INCL_PM or INCL_COMMON

Calling conversion

Cdecl32

Example Code

...
APIRET rc;
rc = WinAlarm (HWND_DESKTOP, WA_NOTE);
...

Related Functions

WinFlashWindow WinMessageBox

Notes

WinAlarm function also used for multimedia subsystem notification.