Jump to content

WinAlarm: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== WinAlarm ==
Generates an audible alarm.
; WinAlarm(desktopHandle, alarmStyle) : Generates an audible alarm.


=== Parameters ===
== Syntax ==
; desktopHandle - [[HWND]] - input : The desktop handle.
WinAlarm(desktopHandle, alarmStyle)
; alarmStyle - [[ULONG]] - input : The alarm style to be.


=== Constants ===
== Parameters ==
;desktopHandle ([[HWND]]) - input : The desktop handle.
;alarmStyle ([[ULONG]]) input : The alarm style to be.
 
== Constants ==
These are the differing alarm tone constants:
These are the differing alarm tone constants:
* [[WA_WARNING]]
*WA_WARNING
* [[WA_NOTE]]
*WA_NOTE
* [[WA_ERROR]]
*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.
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 ===
== Returns ==
This function returns a [[BOOL]] with the values of:
This function returns a [[BOOL]] with the values of:
* [[TRUE]]
* [[TRUE]]
* [[FALSE]]
* [[FALSE]]


Possible errors from [[OS2 API:WinGetLastError|WinGetLastError]] are:
Possible errors from [[WinGetLastError]] are:
* [[OS2 API:PMI:error#PM_INVALID_HWND|PM_INVALID_HWND]]
* [[PM Error Codes#PM_INVALID_HWND|PM_INVALID_HWND]]
* [[OS2 API:PMI:error#PM_INVALID_PARAM|PM_INVALID_PARAM]]
* [[PM Error Codes#PM_INVALID_PARAM|PM_INVALID_PARAM]]


=== Module ===
== Module ==
  DOSCALLS
  DOSCALLS


=== Define (C/C++) ===
== Define (C/C++) ==
INCL_WINDIALOGS or INCL_WIN or INCL_PM or INCL_COMMON
INCL_WINDIALOGS or INCL_WIN or INCL_PM or INCL_COMMON


=== Calling conversion ===
== Calling Convention ==
[[Cdecl32]]
[[Cdecl32]]


=== Example Code ===
== Example Code ==
  ...
  ...
  APIRET rc;
  APIRET rc;
Line 38: Line 39:
  ...
  ...


=== Related Functions ===
==Related Functions==
[[WinFlashWindow]]
*[[WinFlashWindow]]
[[WinMessageBox]]
*[[WinMessageBox]]


=== Notes ===
==Notes==
[[WinAlarm]] function also used for multimedia subsystem notification.
[[WinAlarm]] function also used for multimedia subsystem notification.


[[Category:Win]]
[[Category:Win]]

Latest revision as of 15:14, 7 April 2024

Generates an audible alarm.

Syntax

WinAlarm(desktopHandle, alarmStyle)

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:

Possible errors from WinGetLastError are:

Module

DOSCALLS

Define (C/C++)

INCL_WINDIALOGS or INCL_WIN or INCL_PM or INCL_COMMON

Calling Convention

Cdecl32

Example Code

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

Related Functions

Notes

WinAlarm function also used for multimedia subsystem notification.