![]() This is rather difficult in Windows Vista and above. To change it, you must modify the non-client area. In Windows 10 the borders on left/right/bottom are transparent. I also found this related Qt bug report QTBUG-47543 which was closed as not being a Qt problem, because it can be reproduced with win32 api. Return DefWindowProc(hwnd, uMsg, wParam, lParam) ![]() ![]() LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)įillRect(hdc, &ps.rcPaint, (HBRUSH) (COLOR_WINDOWTEXT)) SetWindowPos(hwnd, NULL, 0,0,0,0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER) LONG lStyle = GetWindowLong(hwnd, GWL_STYLE) Int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR pCmdLine, int nCmdShow)Ĭonst wchar_t CLASS_NAME = L"Sample Window Class" ĬW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) With the following code I create a window and paint all the client area with black, the window gets a left, right and bottom 6px transparent margins, however the top margin is white. This can easily be achieved by removing WS_CAPTION and adding WS_THICKFRAME, however, since Windows 10, there's a 6px white non-client area. I want a window without title bar but with resizable frames and shadow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |