From: Corinna Vinschen Date: Fri, 15 Nov 2013 11:41:12 +0000 (+0000) Subject: * root.cc: Move inline definitions of GetDlgItemRect and X-Git-Tag: release_2.869~28 X-Git-Url: https://cygwin.com/git/?a=commitdiff_plain;h=c0fd969d1f00f91f95ce5240515dc278074df6db;p=cygwin-apps%2Fsetup.git * root.cc: Move inline definitions of GetDlgItemRect and SetDlgItemRect from here... * win32.h: ...to here, for potential usage in other dialogs. --- diff --git a/ChangeLog b/ChangeLog index fcac226a..1bc7d2ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-11-15 Corinna Vinschen + + * root.cc: Move inline definitions of GetDlgItemRect and + SetDlgItemRect from here... + * win32.h: ...to here, for potential usage in other dialogs. + 2013-11-15 Corinna Vinschen * res.rc: Fix size and position of rootdir textbox and button. diff --git a/root.cc b/root.cc index 8e78f7c5..96e3d1e4 100644 --- a/root.cc +++ b/root.cc @@ -71,20 +71,6 @@ check_if_enable_next (HWND h) egetString (h, IDC_ROOT_DIR).size() && root_scope); } -static inline void -GetDlgItemRect (HWND h, int item, LPRECT r) -{ - GetWindowRect (GetDlgItem (h, item), r); - MapWindowPoints (HWND_DESKTOP, h, (LPPOINT) r, 2); -} - -static inline void -SetDlgItemRect (HWND h, int item, LPRECT r) -{ - MoveWindow (GetDlgItem (h, item), r->left, r->top, - r->right - r->left, r->bottom - r->top, TRUE); -} - static void load_dialog (HWND h) { diff --git a/win32.h b/win32.h index 964a5088..75906294 100644 --- a/win32.h +++ b/win32.h @@ -180,4 +180,18 @@ VersionInfo& GetVer (); #define OSMajorVersion() (GetVer ().major ()) #define OSMinorVersion() (GetVer ().minor ()) +static inline void +GetDlgItemRect (HWND h, int item, LPRECT r) +{ + GetWindowRect (GetDlgItem (h, item), r); + MapWindowPoints (HWND_DESKTOP, h, (LPPOINT) r, 2); +} + +static inline void +SetDlgItemRect (HWND h, int item, LPRECT r) +{ + MoveWindow (GetDlgItem (h, item), r->left, r->top, + r->right - r->left, r->bottom - r->top, TRUE); +} + #endif /* SETUP_WIN32_H */