-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在win7系统没有阴影边框 鼠标拖动到屏幕左上右边缘没有系统的动画效果 #12
Comments
same problem, and cannot maximized when double click header. |
源码中的 void NativeWindowHelperPrivate::updateWindowStyle()
{
Q_Q(NativeWindowHelper);
Q_CHECK_PTR(window);
HWND hWnd = reinterpret_cast<HWND>(window->winId());
if (NULL == hWnd)
return;
else if (oldWindow == hWnd)
{
return;
}
oldWindow = hWnd;
NativeWindowFilter::deliver(window, q);
QOperatingSystemVersion currentVersion = QOperatingSystemVersion::current();
if (currentVersion < QOperatingSystemVersion::Windows8)
{
return;
}
LONG oldStyle = WS_OVERLAPPEDWINDOW | WS_THICKFRAME
| WS_CAPTION | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;;
LONG newStyle = WS_POPUP | WS_THICKFRAME;
if (QtWin::isCompositionEnabled())
newStyle |= WS_CAPTION;
if (window->flags() & Qt::CustomizeWindowHint)
{
if (window->flags() & Qt::WindowSystemMenuHint)
newStyle |= WS_SYSMENU;
if (window->flags() & Qt::WindowMinimizeButtonHint)
newStyle |= WS_MINIMIZEBOX;
if (window->flags() & Qt::WindowMaximizeButtonHint)
newStyle |= WS_MAXIMIZEBOX;
}
else
{
newStyle |= WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX;
}
LONG currentStyle = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, (currentStyle & ~oldStyle) | newStyle);
SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
SWP_NOOWNERZORDER | SWP_NOZORDER |
SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
if (QtWin::isCompositionEnabled())
QtWin::extendFrameIntoClientArea(window, 1, 1, 1, 1);
} |
@hcaihao @564398053 内容显示错乱,两位大佬有好的解决方法吗? |
Try StyleWindow in my repositories. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
鼠标拖动到屏幕左上右边缘没有系统的动画效果,且鼠标光标会圈圈


是在win7虚拟机测试的
The text was updated successfully, but these errors were encountered: