To control the x and y sizes of the window, you can handle the WM_GETMINMAXINFO message and return the smallest you are willing to accept, which can just be the size of the current window, meaning no change allowed.
Bing / Google / Yahoo Search for WM_GETMINMAXINFO for details. Also, this article may help.
http://www.olivierlanglois.net/minmaxdemo.html[
^]