By "empty" you mean it's not showing on screen?
If yes, it's because when you subclass a Window, all it's messages will be sent to the new MessageProc, which doesn't have all the functions to properly show it in it's defaultProc function (such as WM_PAINT, or even a button click).
So you need something like this:
//store the old window proc somewhere
WNDPROC oldWindowProc = (WNDPROC)SetWindowLong(subWindowHandle, GWL_WNDPROC, long(NewMessageProc));
//and in the message proc
switch(uMsg)
{
//your "case"s here
default:
{
CallWindowProc(oldWindowProc, windowHandle, uMsg, wParam, lParam);
}
}
This will call the proper WM_PAINT and other messages to the messageProc that is responsible for drawing and clicking and other functions (the DefWindowProc() of the subclassed window).
Alternatively you can also just implement the WM_PAINT in your NewMessageProc for all your subclassed windows, but without calling their DefWindowProc you'll need to do for every event they might receive (mousemove, mouse clicks, button clicks, everything), so using their original DefWindowProc is easier.