@@ -98,7 +98,7 @@ LIBMULTI_DOUBLE libmulti_set_x(double index, double x) {
9898 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
9999
100100 RECT empty; SetRectEmpty (&empty);
101- AdjustWindowRectEx (&empty, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
101+ AdjustWindowRectEx (&empty, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
102102 RECT client;
103103 GetClientRect (window, &client);
104104 POINT p{ 0 , client.top };
@@ -119,7 +119,7 @@ LIBMULTI_DOUBLE libmulti_set_y(double index, double y) {
119119 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
120120
121121 RECT empty; SetRectEmpty (&empty);
122- AdjustWindowRectEx (&empty, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
122+ AdjustWindowRectEx (&empty, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
123123 RECT client;
124124 GetClientRect (window, &client);
125125 POINT p{ 0 , client.top };
@@ -143,7 +143,7 @@ LIBMULTI_DOUBLE libmulti_set_position(double index, double x, double y) {
143143 // get the offsets of the non-client area
144144 RECT rc;
145145 SetRectEmpty (&rc);
146- AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
146+ AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
147147
148148 // I have zero idea how it works, really. I don't understand how these calculations make it work.
149149 coord += rc.left ;
@@ -165,7 +165,7 @@ LIBMULTI_DOUBLE libmulti_set_width(double index, double w) {
165165 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
166166
167167 RECT empty; SetRectEmpty (&empty);
168- AdjustWindowRectEx (&empty, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
168+ AdjustWindowRectEx (&empty, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
169169 RECT rwindow;
170170 GetWindowRect (window, &rwindow);
171171
@@ -184,7 +184,7 @@ LIBMULTI_DOUBLE libmulti_set_height(double index, double h) {
184184 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
185185
186186 RECT empty; SetRectEmpty (&empty);
187- AdjustWindowRectEx (&empty, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
187+ AdjustWindowRectEx (&empty, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
188188 RECT rwindow;
189189 GetWindowRect (window, &rwindow);
190190
@@ -205,7 +205,7 @@ LIBMULTI_DOUBLE libmulti_set_size(double index, double w, double h) {
205205
206206 RECT rc;
207207 SetRectEmpty (&rc);
208- AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
208+ AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
209209
210210 // I have zero idea how it works, really.
211211 coord += rc.right - rc.left ;
@@ -231,7 +231,7 @@ LIBMULTI_DOUBLE libmulti_set_rectangle(double index, double x, double y, double
231231 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
232232 RECT rc{ ix,iy,iw,ih };
233233 RECT empty; SetRectEmpty (&empty);
234- AdjustWindowRectEx (&empty, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
234+ AdjustWindowRectEx (&empty, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
235235 ok = SetWindowPos (window, HWND_TOP , rc.left + empty.left , rc.top + empty.top , rc.right + empty.right - empty.left , rc.bottom + empty.bottom - empty.top , SWP_NOZORDER );
236236 LastError = GetLastError ();
237237 LeaveVector ();
@@ -248,7 +248,7 @@ LIBMULTI_DOUBLE libmulti_get_nonclient_left(double index) {
248248 EnterVector ();
249249 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
250250 RECT rc;
251- ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
251+ ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
252252 if (ok == TRUE ) v = rc.left ;
253253 LeaveVector ();
254254 return v;
@@ -263,7 +263,7 @@ LIBMULTI_DOUBLE libmulti_get_nonclient_top(double index) {
263263 EnterVector ();
264264 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
265265 RECT rc;
266- ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
266+ ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
267267 if (ok == TRUE ) v = rc.top ;
268268 LeaveVector ();
269269 return v;
@@ -278,7 +278,7 @@ LIBMULTI_DOUBLE libmulti_get_nonclient_right(double index) {
278278 EnterVector ();
279279 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
280280 RECT rc;
281- ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
281+ ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
282282 if (ok == TRUE ) v = rc.right ;
283283 LeaveVector ();
284284 return v;
@@ -293,7 +293,7 @@ LIBMULTI_DOUBLE libmulti_get_nonclient_bottom(double index) {
293293 EnterVector ();
294294 HWND window = vecWindows[static_cast <std::size_t >(index)].first ;
295295 RECT rc;
296- ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, GetWindowLongPtrW (window, GWL_STYLE ), GetMenu (window) != nullptr , GetWindowLongPtrW (window, GWL_EXSTYLE ));
296+ ok = SetRectEmpty (&rc) && AdjustWindowRectEx (&rc, static_cast < DWORD >( GetWindowLongPtrW (window, GWL_STYLE )) , GetMenu (window) != nullptr , static_cast < DWORD >( GetWindowLongPtrW (window, GWL_EXSTYLE ) ));
297297 if (ok == TRUE ) v = rc.bottom ;
298298 LeaveVector ();
299299 return v;
0 commit comments