Thats not the problem, I can use multithread but where to put this _beginthread() for calling the function.

I mean where do I place this new thread inside my application window procedure ie: callback function.