Author: gadamopoulos Date: Sat Feb 25 22:39:45 2017 New Revision: 73914 URL: http://svn.reactos.org/svn/reactos?rev=73914&view=rev Log: [COMCTL32] -Implement BCM_GETTEXTMARGIN, BCM_SETTEXTMARGIN, BCM_SETIMAGELIST and BCM_GETIMAGELIST.
Modified: trunk/reactos/dll/win32/comctl32/button.c trunk/reactos/dll/win32/comctl32/comctl32.h Modified: trunk/reactos/dll/win32/comctl32/button.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/button.c?rev=73914&r1=73913&r2=73914&view=diff ============================================================================== --- trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/button.c [iso-8859-1] Sat Feb 25 22:39:45 2017 @@ -395,6 +395,8 @@ } memset(data, 0, sizeof(BUTTON_DATA)); + SetRect(&data->rcTextMargin, 1,1,1,1); + _SetButtonData(hWnd, data); break; } @@ -447,6 +449,42 @@ TrackMouseEvent(&mouse_event); } break; + } + case BCM_GETTEXTMARGIN: + { + RECT* prc = (RECT*)lParam; + PBUTTON_DATA data = _GetButtonData(hWnd); + if (!prc || !data) + return FALSE; + *prc = data->rcTextMargin; + return TRUE; + } + case BCM_SETTEXTMARGIN: + { + RECT* prc = (RECT*)lParam; + PBUTTON_DATA data = _GetButtonData(hWnd); + if (!prc || !data) + return FALSE; + data->rcTextMargin = *prc; + return TRUE; + } + case BCM_SETIMAGELIST: + { + BUTTON_IMAGELIST * pimldata = (BUTTON_IMAGELIST *)lParam; + PBUTTON_DATA data = _GetButtonData(hWnd); + if (!data || !pimldata || !pimldata->himl) + return FALSE; + data->imlData = *pimldata; + return TRUE; + } + case BCM_GETIMAGELIST: + { + BUTTON_IMAGELIST * pimldata = (BUTTON_IMAGELIST *)lParam; + PBUTTON_DATA data = _GetButtonData(hWnd); + if (!data|| !pimldata) + return FALSE; + *pimldata = data->imlData; + return TRUE; } } Modified: trunk/reactos/dll/win32/comctl32/comctl32.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32.h?rev=73914&r1=73913&r2=73914&view=diff ============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/comctl32.h [iso-8859-1] Sat Feb 25 22:39:45 2017 @@ -81,6 +81,9 @@ HFONT font; LONG_PTR image; DWORD ui_state; + + RECT rcTextMargin; + BUTTON_IMAGELIST imlData; } BUTTON_DATA, *PBUTTON_DATA; static inline PBUTTON_DATA _GetButtonData(HWND hwnd)