# Windows Messages and Multithreading

RegisterWinMsgCallback allows you to register a callback to be invoked when your application receives a Windows message. To send a message to your application, either your application or another application must call the Windows SDK PostMessage function. The window handle passed to PostMessage determines the thread in which LabWindows/CVI invokes the callback function.

To send a message to a particular thread, pass the window handle that GetCVIWindowHandle returns when you call it from that thread.