Hello @semih artan ,
I can reproduce the same result using a Win32 C++ window application. SetWindowTheme(hWnd, L"", L"");
doesn't cause the window's border's width change. The same behavior found for SM_CXEDGE
and SM_CXFRAME
. And also you can check distance from the left of the client area to the left of the non-client, it keeps unchanged with or without calling SetWindowTheme(hWnd, L"", L"");
like this:
GetClientRect(hWnd, &rcClient);
GetWindowRect(hWnd, &rcWind);
ptDiff.x = ((rcWind.right - rcWind.left) - rcClient.right) / 2;
Based on the document: "When pszSubAppName and pszSubIdList are NULL, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying an empty string, (L" ")".
It seems removing the previously applied associations and visual styles don't affect the size of the border. What you see the bordor appearance's changes may be caused by the visual effects.
Thank you!
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.