Can't change window size in WM_NCCREATE

I tried this code in WM_NCCREATE
1
2
3
4
5
6
7
case WM_NCCREATE:
{
LPCREATESTRUCT lpCs = (LPCREATESTRUCT)lParam;
lpCs->cx = 90;
...
}
return TRUE;

to change the width of the window, but it doesn't work, the window still gets created with the width that I specified in CreateWindowEx().
Can you change the window size in WM_NCCREATE by changing the values of the CREATESTRUCT before the window is displayed?
Last edited on
SetWindowPos(hwnd, HWND_TOP, 0, 0, width, height, SWP_NOMOVE);
Registered users can post here. Sign in or register to post.