|
Post by enderboy on Aug 28, 2024 0:49:22 GMT -8
I was using the dolphin emulator today, but on the emulation screen, it ignores round corners, could a windhawk mod be made to make applications ignore round corners? I know there is already a windhawk mod to disable round corners, but I do know how unreliable the udwm patch is because it could brick you pc if you have more than one dwm running at one time, so how does it ignore the round corners
|
|
Legofan
Sophomore Member
Embrace modernity? Nah, embrace tradition.
Posts: 171
OS: Windows 11 24H2
Theme: Default
CPU: AMD Ryzen 5 3600 / Intel Pentium Gold 4425Y
RAM: 64GB / 8 GB
GPU: NVIDIA GeForce GTX 1050 Ti / IGPU
Computer Make/Model: Custom Built / Surface Go 2
|
Post by Legofan on Sept 3, 2024 13:46:33 GMT -8
I was using the dolphin emulator today, but on the emulation screen, it ignores round corners, could a windhawk mod be made to make applications ignore round corners? I know there is already a windhawk mod to disable round corners, but I do know how unreliable the udwm patch is because it could brick you pc if you have more than one dwm running at one time, so how does it ignore the round corners Why though? Both ExplorerPatcher and StartAllBack (If you enabled Dark Magic) have this baked in.
|
|
|
Post by ephemeralViolette on Sept 3, 2024 14:26:58 GMT -8
It's just a DWM window attribute which any application can set at its own discretion. This is an API which Microsoft intentionally provides. The following code should do the trick:
DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND; DwmSetWindowAttribute(hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref));
|
|
Legofan
Sophomore Member
Embrace modernity? Nah, embrace tradition.
Posts: 171
OS: Windows 11 24H2
Theme: Default
CPU: AMD Ryzen 5 3600 / Intel Pentium Gold 4425Y
RAM: 64GB / 8 GB
GPU: NVIDIA GeForce GTX 1050 Ti / IGPU
Computer Make/Model: Custom Built / Surface Go 2
|
Post by Legofan on Sept 3, 2024 14:55:01 GMT -8
It's just a DWM window attribute which any application can set at its own discretion. This is an API which Microsoft intentionally provides. The following code should do the trick: DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND; DwmSetWindowAttribute(hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref)); Huh, interesting. I guess that is probably what Xenia uses to disable rounded corners as well.
|
|
|
Post by enderboy on Sept 3, 2024 22:26:18 GMT -8
It's just a DWM window attribute which any application can set at its own discretion. This is an API which Microsoft intentionally provides. The following code should do the trick: DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND; DwmSetWindowAttribute(hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref)); Cool thanks
|
|
|
Post by enderboy on Sept 4, 2024 10:03:29 GMT -8
It's just a DWM window attribute which any application can set at its own discretion. This is an API which Microsoft intentionally provides. The following code should do the trick: DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND; DwmSetWindowAttribute(hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref)); So how do I put this into visual studio, I’m using mehraanakbarii‘s windows region and language remake as a base
|
|
|
Post by ephemeralViolette on Sept 4, 2024 10:33:44 GMT -8
It's just a DWM window attribute which any application can set at its own discretion. This is an API which Microsoft intentionally provides. The following code should do the trick: DWM_WINDOW_CORNER_PREFERENCE pref = DWMWCP_DONOTROUND; DwmSetWindowAttribute(hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &pref, sizeof(pref)); So how do I put this into visual studio, I’m using mehraanakbarii‘s windows region and language remake as a base This example code is C, but it should also work (perhaps with minor changes required) for C++. What language are you targeting?
|
|
|
Post by enderboy on Sept 4, 2024 10:50:02 GMT -8
So how do I put this into visual studio, I’m using mehraanakbarii‘s windows region and language remake as a base This example code is C, but it should also work (perhaps with minor changes required) for C++. What language are you targeting? Idk, how can I check?
|
|
|
Post by ephemeralViolette on Sept 4, 2024 11:20:53 GMT -8
This example code is C, but it should also work (perhaps with minor changes required) for C++. What language are you targeting? Idk, how can I check? You don't know? What's the file extension you're working with?
|
|
|
Post by enderboy on Sept 4, 2024 11:30:26 GMT -8
You don't know? What's the file extension you're working with? The file extension for the form? If so it’s cs
|
|
|
Post by ephemeralViolette on Sept 4, 2024 11:42:17 GMT -8
You don't know? What's the file extension you're working with? The file extension for the form? If so it’s cs Oh, then it's C#. You will need to marshal to use this API in C#. This would be something like enum DwmWindowAttribute : uint { NCRenderingEnabled = 1, NCRenderingPolicy, TransitionsForceDisabled, AllowNCPaint, CaptionButtonBounds, NonClientRtlLayout, ForceIconicRepresentation, Flip3DPolicy, ExtendedFrameBounds, HasIconicBitmap, DisallowPeek, ExcludedFromPeek, Cloak, Cloaked, FreezeRepresentation, PassiveUpdateMode, UseHostBackdropBrush, UseImmersiveDarkMode = 20, WindowCornerPreference = 33, BorderColor, CaptionColor, TextColor, VisibleFrameBorderThickness, SystemBackdropType, Last }
[DllImport("dwmapi.dll", PreserveSig = true)] public static extern int DwmSetWindowAttribute(IntPtr hwnd, DWMWINDOWATTRIBUTE attr, ref int attrValue, int attrSize); in your class and then int pref = 1; // DWMWCP_DONOTROUND DwmSetWindowAttribute(hWnd, DwmWindowAttribute.WindowCornerPref, ref pref, Marshal.SizeOf(typeof(int))); in your function. You will still need the HWND for your window. Retrieving this value depends on the GUI system you're using.
|
|