mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[USER32] Fix RealUserDrawCaption() return type. Rename {HFONT,UISTATE}_GWL_OFFSET and pfPaint. #179
This commit is contained in:
parent
3b93ba0f31
commit
2367206744
2 changed files with 11 additions and 11 deletions
|
@ -69,10 +69,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(button);
|
||||||
|
|
||||||
/* GetWindowLong offsets for window extra information */
|
/* GetWindowLong offsets for window extra information */
|
||||||
#define STATE_GWL_OFFSET 0
|
#define STATE_GWL_OFFSET 0
|
||||||
#define HFONT_GWL_OFFSET (sizeof(LONG))
|
#define BUTTON_HFONT_GWL_OFFSET (sizeof(LONG))
|
||||||
#define HIMAGE_GWL_OFFSET (HFONT_GWL_OFFSET+sizeof(HFONT))
|
#define HIMAGE_GWL_OFFSET (BUTTON_HFONT_GWL_OFFSET+sizeof(HFONT))
|
||||||
#define UISTATE_GWL_OFFSET (HIMAGE_GWL_OFFSET+sizeof(HFONT))
|
#define BUTTON_UISTATE_GWL_OFFSET (HIMAGE_GWL_OFFSET+sizeof(HFONT))
|
||||||
#define NB_EXTRA_BYTES (UISTATE_GWL_OFFSET+sizeof(LONG))
|
#define NB_EXTRA_BYTES (BUTTON_UISTATE_GWL_OFFSET+sizeof(LONG))
|
||||||
|
|
||||||
/* undocumented flags */
|
/* undocumented flags */
|
||||||
#define BUTTON_NSTATES 0x0F
|
#define BUTTON_NSTATES 0x0F
|
||||||
|
@ -117,9 +117,9 @@ static const WORD maxCheckState[MAX_BTN_TYPE] =
|
||||||
BST_UNCHECKED /* BS_OWNERDRAW */
|
BST_UNCHECKED /* BS_OWNERDRAW */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, UINT action );
|
typedef void (*pfButtonPaint)( HWND hwnd, HDC hdc, UINT action );
|
||||||
|
|
||||||
static const pfPaint btnPaintFunc[MAX_BTN_TYPE] =
|
static const pfButtonPaint btnPaintFunc[MAX_BTN_TYPE] =
|
||||||
{
|
{
|
||||||
PB_Paint, /* BS_PUSHBUTTON */
|
PB_Paint, /* BS_PUSHBUTTON */
|
||||||
PB_Paint, /* BS_DEFPUSHBUTTON */
|
PB_Paint, /* BS_DEFPUSHBUTTON */
|
||||||
|
@ -169,24 +169,24 @@ static inline void set_button_state( HWND hwnd, LONG state )
|
||||||
|
|
||||||
static __inline void set_ui_state( HWND hwnd, LONG flags )
|
static __inline void set_ui_state( HWND hwnd, LONG flags )
|
||||||
{
|
{
|
||||||
SetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET, flags );
|
SetWindowLongPtrW( hwnd, BUTTON_UISTATE_GWL_OFFSET, flags );
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline LONG get_ui_state( HWND hwnd )
|
static __inline LONG get_ui_state( HWND hwnd )
|
||||||
{
|
{
|
||||||
return GetWindowLongPtrW( hwnd, UISTATE_GWL_OFFSET );
|
return GetWindowLongPtrW( hwnd, BUTTON_UISTATE_GWL_OFFSET );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __REACTOS__ */
|
#endif /* __REACTOS__ */
|
||||||
|
|
||||||
static inline HFONT get_button_font( HWND hwnd )
|
static inline HFONT get_button_font( HWND hwnd )
|
||||||
{
|
{
|
||||||
return (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
return (HFONT)GetWindowLongPtrW( hwnd, BUTTON_HFONT_GWL_OFFSET );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_button_font( HWND hwnd, HFONT font )
|
static inline void set_button_font( HWND hwnd, HFONT font )
|
||||||
{
|
{
|
||||||
SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font );
|
SetWindowLongPtrW( hwnd, BUTTON_HFONT_GWL_OFFSET, (LONG_PTR)font );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline UINT get_button_type( LONG window_style )
|
static inline UINT get_button_type( LONG window_style )
|
||||||
|
|
|
@ -76,7 +76,7 @@ UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient)
|
||||||
RealUserDrawCaption: This function is passed through RegisterUserApiHook to uxtheme
|
RealUserDrawCaption: This function is passed through RegisterUserApiHook to uxtheme
|
||||||
to call it when the classic caption is needed to be drawn.
|
to call it when the classic caption is needed to be drawn.
|
||||||
*/
|
*/
|
||||||
LRESULT WINAPI
|
BOOL WINAPI
|
||||||
RealUserDrawCaption(HWND hWnd, HDC hDC, LPCRECT lpRc, UINT uFlags)
|
RealUserDrawCaption(HWND hWnd, HDC hDC, LPCRECT lpRc, UINT uFlags)
|
||||||
{
|
{
|
||||||
ERR("Real DC flags %08x\n",uFlags);
|
ERR("Real DC flags %08x\n",uFlags);
|
||||||
|
|
Loading…
Reference in a new issue