add wxGet/Set/HasWindowExStyle() helpers and use them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-02 22:30:05 +00:00
parent 65751a0ee7
commit d66d050088
2 changed files with 38 additions and 23 deletions

View File

@@ -23,6 +23,10 @@
#include "wx/log.h"
#if wxUSE_GUI
#include "wx/window.h"
#endif // wxUSE_GUI
class WXDLLIMPEXP_FWD_CORE wxFont;
class WXDLLIMPEXP_FWD_CORE wxWindow;
class WXDLLIMPEXP_FWD_CORE wxWindowBase;
@@ -900,6 +904,21 @@ inline bool wxStyleHasBorder(long style)
wxSUNKEN_BORDER | wxDOUBLE_BORDER)) != 0;
}
inline long wxGetWindowExStyle(const wxWindow *win)
{
return ::GetWindowLong(GetHwndOf(win), GWL_EXSTYLE);
}
inline bool wxHasWindowExStyle(const wxWindow *win, long style)
{
return (wxGetWindowExStyle(win) & style) != 0;
}
inline long wxSetWindowExStyle(const wxWindow *win, long style)
{
return ::SetWindowLong(GetHwndOf(win), GWL_EXSTYLE, style);
}
// ----------------------------------------------------------------------------
// functions mapping HWND to wxWindow
// ----------------------------------------------------------------------------