/* Creating Message Uniquely */ /* First, register the message. To ensure its uniqueness use a GUID. Might seem over the top but it will not clash!!! This will have to be in an availible header file. */ static const UINT UWM_MY_UNIQUE_MSG = ::RegisterWindowMessage(_T("UWM_MY_UNIQUE_MSG4E7F6EC0-6ADC-11d3-BC36-006067709674")); /* The application that wishes to receive registered messages must include the following message map entry and function. */ ON_REGISTERED_MESSAGE(UWM_MY_UNIQUE_MSG, OnMyUniqueMessage) LRESULT YOURCLASS::OnMyUniqueMessage(WPARAM wp, LPARAM lp) { LRESULT lr = 0; return lr; } /* The applications *.h file will need the following prototype. */ afx_msg LRESULT OnMyUniqueMessage(WPARAM wp, LPARAM lp);