It's not SetWindowLong, I found it. I use SetClassLong(hwnd, GCL_STYLE, CS_NOCLOSE); Thanks for the help though! Now I want to do this:

I want to enable an X. Do I just repeat the SetClassLong(hwnd, GCL_STYLE, CS_NOCLOSE);?