Mood:

Topic: VC++
It's quite common that we use RegisterWindowMessage to register a message that is used for all instances of this application.
Have you ever wondered how to get the text back from from the message number that is returned by RegisterWindowMessage?
This will make it more clear...
const UINT uMyWndMessageReg = ::RegisterWindowMessage( _T( "Nibu is testing" ));
Now how to get back "Nibu is testing" from uMyWndMessageReg?
Well this is how we do it...
TCHAR szMsgBuf[ MAX_PATH ];
GetClipboardFormatName( uMyWndMessageReg, szMsgBuf, MAX_PATH );
MessageBox( NULL, szMsgBuf, _T( "RegisterWindowMessage String" ), MB_OK | MB_ICONINFORMATION );
Ah wait I have a question for you, can you tell me what's going behind the scenes of RegisterWindowMessage. ;)