OKay let's try to help you a little more.
You want to hook your client by using SetWindowsHookEx function.
Assuming that your are going to hook client's process you need to crate a dll taht will be content your hook function declare as an export.
Assuming that your dll is called Hook.Dll.
You need to define in this dll an exported function for example a MouseProc function.
In your process, the first thing you need is to get client to hook main thread id (i do this with toolhelp32.dll).
Secondary you need to import Hook.Dll in your process space and retrieve the module handle (GetModuleHandle)
Tertiary Get your MouseProc Addr using GetProcAddress (HMod, lpzFunctionNAme)
Finally you need to call SetWindowsHookEx with all this parameters you retrieve.
At this point you have injected in your client processes your dll Hook.Dll and you intercepting all mouse messages.
More interesting in your dll you can wrote a function for her entry point.
Entry point is a function called with one parameters by the kernel when a process or a thread load or unload (attach or unattach) a dll.
In this entry point you can do a lot of things like :
Creating a shared space between your process and the hooked process (CreateFileMapping).
Create a new thread with messaging queue to manage incoming command from your process to dll in target process.
And finaly memory patching target process exe code.
If you need help on this topic i will answer you but i'am mainly programming in delphi since many years so C++ is difficult for me
