Original Post
I have created base Object class for creating Windows object, windows, command buttons etc... I have the following 2 methods for Set the object Pos and Size, but SetWidnowPos behave weird as in my Window disapears. I can see ti in the task bar and the only way I can size it is by right clicking on the taskbar and clicking on maximize. I think SetWindowPos is probably shrinking the window or something...
Am I callint the SetWindowPos function correctly?
void move(const int pX, const int pY) { x += pX; y += pY; SetWindowPos(getHandle(), HWND_TOP, getX(), getY(), width, height, SWP_NOSIZE); }
void size(const int pWidth, const int pHeight) { width += pWidth; height += pHeight; SetWindowPos(getHandle(), HWND_TOP, 0, 0, getWidth(), getHeight(), SWP_NOMOVE); }