How to use the window messages( WM_USER + @ ) and Callback Function?

I want to use to define the window messages( WM_USER + @ ).

How can i do that?

In addition,

How can i declare and define the callback function to be called external?