Strange behavior with Size/Getwindowrect/setwindowpos
Posted: Mon Jul 10, 2017 12:16 pm
I have a strange behavior in the dotnet version of our programs: Modal Dialogwindows (inherited from dialogwindow) return with the access Size a width/height that is exactly 10 points larger than the real size of the window or the size returned by the Win32 version. The same values are returned using getwindowrect directly. Getclientrect returns the same values as the Win32 version. The assign size/Setwindowpos behaves similarly: It sizes the window 10 points smaller than the sizes passed to, so that odlg:size := odlg:size works ok.
This happens on different operating systems with Visual themes enabled or not. Without sizing the windows the windows are displayed in the same size as in Win32. It is independent of the size and position of the window. The sizes of dtawindows are ok. It must be related to a Windows behavior. A work around could be simple, but I want to understand this behavior.
This happens on different operating systems with Visual themes enabled or not. Without sizing the windows the windows are displayed in the same size as in Win32. It is independent of the size and position of the window. The sizes of dtawindows are ok. It must be related to a Windows behavior. A work around could be simple, but I want to understand this behavior.