Removing window border?

前端 未结 4 927
孤街浪徒
孤街浪徒 2020-11-29 19:32

I have a window with a solid border around it. How can I remove the border (all of the non-client area) by using SetWindowLong and GetWindowLong

4条回答
  •  醉梦人生
    2020-11-29 20:09

    The following Delphi codes does it:

      SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_STYLE) and not WS_BORDER and not WS_SIZEBOX and not WS_DLGFRAME );
      SetWindowPos(Handle, HWND_TOP, Left, Top, Width, Height, SWP_FRAMECHANGED);
    

    Of course, these API calls look the same in all languages.

提交回复
热议问题