News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

RegisterWindowMessage

Started by Mr Earl, November 13, 2006, 02:12:44 PM

Previous topic - Next topic

Mr Earl

The description for RegisterWindowMessage states that "The message remains registered until the Windows session ends".
If I run a program several times during the same Windows session, how is the multiple "RegisterWindowMessage" for the same
string handled?  Does the msg value for that string simply get overlayed for each run?  Or does it matter that you are creating several values for the same msg?

ToutEnMasm


Hello,
You can register the same message in multiple instance af the same application.
Follow extract of winhelp
Allways use RegisterWindowMessage and if the message already exist,the fonction return the same value (don't failed)
                                           ToutEnMasm


Quote
If two different applications register the same message string, the applications return the same message value. The message remains registered until the Windows session ends.
Only use RegisterWindowMessage when more than one application must process the same message. For sending private messages within a window class, an application can use any integer in the range WM_USER through 0x7FFF. (Messages in this range are private to a window class, not to an application. For example, predefined control classes such as BUTTON, EDIT, LISTBOX, and COMBOBOX may use values in this range.)

Mr Earl