Name

RegisterWindowMessage

Synopsis

Registers a new message that the system can use:

Public Declare Function RegisterWindowMessage Lib "user32" _
    Alias "RegisterWindowMessageA" _
    (ByVal lpString As String) As Long

Parameters

lpString

A null-terminated string that identifies the new message

Return Value

Returns a unique number identifying the message in the range of &HC000 to &HFFFF. Messages in this range are global to the system; therefore, after a message is registered, any application can use it. If a is returned, the message failed to register.

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.