ReactOS 0.4.17-dev-1321-g5c122a9
static.c File Reference
#include <user32.h>
Include dependency graph for static.c:

Go to the source code of this file.

Macros

#define HFONT_GWL_OFFSET   0
 
#define HICON_GWL_OFFSET   (sizeof(HFONT))
 

Typedefs

typedef void(* pfPaint) (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (static)
 
static void STATIC_PaintOwnerDrawfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintTextfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintRectfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintIconfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintBitmapfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintEnhMetafn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static void STATIC_PaintEtchedfn (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)
 
static HFONT get_control_font (HWND hwnd)
 
static HFONT set_control_font (HWND hwnd, HFONT font)
 
static HANDLE get_control_icon (HWND hwnd)
 
static HANDLE set_control_icon (HWND hwnd, HANDLE icon)
 
static HICON STATIC_SetIcon (HWND hwnd, HICON hicon, DWORD style)
 
static HBITMAP STATIC_SetBitmap (HWND hwnd, HBITMAP hBitmap, DWORD style)
 
static HENHMETAFILE STATIC_SetEnhMetaFile (HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style)
 
static HANDLE STATIC_GetImage (HWND hwnd, WPARAM wParam, DWORD style)
 
static HICON STATIC_LoadIconA (HINSTANCE hInstance, LPCSTR name, DWORD style)
 
static HBRUSH STATIC_SendWmCtlColorStatic (HWND hwnd, HDC hdc)
 
static HICON STATIC_LoadIconW (HINSTANCE hInstance, LPCWSTR name, DWORD style)
 
static VOID STATIC_TryPaintFcn (HWND hwnd, LONG full_style)
 
static VOID STATIC_InitColours (void)
 
static BOOL hasTextStyle (DWORD style)
 
LRESULT WINAPI StaticWndProc_common (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
 
LRESULT WINAPI StaticWndProcA (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
LRESULT WINAPI StaticWndProcW (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL CALLBACK STATIC_DrawTextCallback (HDC hdc, LPARAM lp, WPARAM wp, int cx, int cy)
 

Variables

static COLORREF color_3dshadow
 
static COLORREF color_3ddkshadow
 
static COLORREF color_3dhighlight
 
static const pfPaint staticPaintFunc [SS_TYPEMASK+1]
 

Macro Definition Documentation

◆ HFONT_GWL_OFFSET

#define HFONT_GWL_OFFSET   0

Definition at line 46 of file static.c.

◆ HICON_GWL_OFFSET

#define HICON_GWL_OFFSET   (sizeof(HFONT))

Definition at line 47 of file static.c.

Typedef Documentation

◆ pfPaint

typedef void(* pfPaint) (HWND hwnd, HDC hdc, HBRUSH hbrush, DWORD style)

Definition at line 53 of file static.c.

Function Documentation

◆ get_control_font()

static HFONT get_control_font ( HWND  hwnd)
static

Definition at line 96 of file static.c.

97{
98 return (HFONT)NtUserGetPrivateData( hwnd, HFONT_GWL_OFFSET, sizeof(HFONT) );
99}
#define HFONT_GWL_OFFSET
Definition: static.c:54
#define NtUserGetPrivateData(HWND, OFFSET, SIZE)
Definition: user_x.h:131
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by STATIC_PaintOwnerDrawfn(), STATIC_PaintTextfn(), and StaticWndProc_common().

◆ get_control_icon()

static HANDLE get_control_icon ( HWND  hwnd)
static

Definition at line 106 of file static.c.

107{
108 return (HFONT)NtUserGetPrivateData( hwnd, HICON_GWL_OFFSET, sizeof(HICON) );
109}
#define HICON_GWL_OFFSET
Definition: static.c:55
static HICON
Definition: imagelist.c:80

Referenced by STATIC_GetImage(), STATIC_PaintBitmapfn(), STATIC_PaintEnhMetafn(), and STATIC_PaintIconfn().

◆ hasTextStyle()

static BOOL hasTextStyle ( DWORD  style)
static

Definition at line 339 of file static.c.

340{
341 switch(style & SS_TYPEMASK)
342 {
343 case SS_SIMPLE:
344 case SS_LEFT:
346 case SS_CENTER:
347 case SS_RIGHT:
348 case SS_OWNERDRAW:
349 return TRUE;
350 }
351
352 return FALSE;
353}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define SS_RIGHT
Definition: pedump.c:694
#define SS_SIMPLE
Definition: pedump.c:702
#define SS_LEFTNOWORDWRAP
Definition: pedump.c:703
#define SS_CENTER
Definition: pedump.c:693
#define SS_LEFT
Definition: pedump.c:692
#define SS_OWNERDRAW
Definition: winuser.h:352
#define SS_TYPEMASK
Definition: winuser.h:362
Definition: style.c:91

◆ set_control_font()

static HFONT set_control_font ( HWND  hwnd,
HFONT  font 
)
static

Definition at line 101 of file static.c.

102{
103 return (HFONT)NtUserSetPrivateData( hwnd, HFONT_GWL_OFFSET, sizeof(font), (LONG_PTR)font );
104}
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
Definition: mk_font.cpp:20
#define NtUserSetPrivateData(HWND, OFFSET, SIZE, VALUE)
Definition: user_x.h:132

Referenced by StaticWndProc_common().

◆ set_control_icon()

static HANDLE set_control_icon ( HWND  hwnd,
HANDLE  icon 
)
static

Definition at line 111 of file static.c.

112{
113 return (HANDLE)NtUserSetPrivateData( hwnd, HICON_GWL_OFFSET, sizeof(icon), (LONG_PTR)icon );
114}

Referenced by STATIC_SetBitmap(), STATIC_SetEnhMetaFile(), and STATIC_SetIcon().

◆ STATIC_DrawTextCallback()

static BOOL CALLBACK STATIC_DrawTextCallback ( HDC  hdc,
LPARAM  lp,
WPARAM  wp,
int  cx,
int  cy 
)
static

Definition at line 661 of file static.c.

662{
663 RECT rc;
664
665 SetRect(&rc, 0, 0, cx, cy);
666 DrawTextW(hdc, (LPCWSTR)lp, -1, &rc, (UINT)wp);
667 return TRUE;
668}
unsigned int UINT
Definition: sysinfo.c:13
HDC hdc
Definition: main.c:9
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Definition: dcommon.idl:28
const uint16_t * LPCWSTR
Definition: typedefs.h:57

◆ STATIC_GetImage()

static HANDLE STATIC_GetImage ( HWND  hwnd,
WPARAM  wParam,
DWORD  style 
)
static

Definition at line 208 of file static.c.

209{
210 switch(style & SS_TYPEMASK)
211 {
212 case SS_ICON:
213 if ((wParam != IMAGE_ICON) &&
214 (wParam != IMAGE_CURSOR)) return NULL;
215 break;
216 case SS_BITMAP:
217 if (wParam != IMAGE_BITMAP) return NULL;
218 break;
219 case SS_ENHMETAFILE:
220 if (wParam != IMAGE_ENHMETAFILE) return NULL;
221 break;
222 default:
223 return NULL;
224 }
225 return get_control_icon( hwnd );
226}
WPARAM wParam
Definition: combotst.c:138
#define NULL
Definition: types.h:112
#define SS_BITMAP
Definition: pedump.c:704
#define SS_ICON
Definition: pedump.c:695
#define IMAGE_BITMAP
Definition: winuser.h:211
#define IMAGE_ICON
Definition: winuser.h:212
#define SS_ENHMETAFILE
Definition: winuser.h:341
#define IMAGE_ENHMETAFILE
Definition: winuser.h:214
#define IMAGE_CURSOR
Definition: winuser.h:213
static HANDLE get_control_icon(HWND hwnd)
Definition: static.c:106

◆ STATIC_InitColours()

static VOID STATIC_InitColours ( void  )
static

Definition at line 327 of file static.c.

328{
332}
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_3DDKSHADOW
Definition: winuser.h:950
#define COLOR_3DHIGHLIGHT
Definition: winuser.h:947
#define COLOR_3DSHADOW
Definition: winuser.h:942
static COLORREF color_3ddkshadow
Definition: static.c:43
static COLORREF color_3dhighlight
Definition: static.c:43
static COLORREF color_3dshadow
Definition: static.c:43

Referenced by StaticWndProc_common().

◆ STATIC_LoadIconA()

static HICON STATIC_LoadIconA ( HINSTANCE  hInstance,
LPCSTR  name,
DWORD  style 
)
static

Definition at line 233 of file static.c.

234{
235 HICON hicon = 0;
236
237 if (hInstance && ((ULONG_PTR)hInstance >> 16))
238 {
239 if ((style & SS_REALSIZEIMAGE) != 0)
240 hicon = LoadImageA(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
241 else
242 {
243 hicon = LoadIconA( hInstance, name );
244 if (!hicon) hicon = LoadCursorA( hInstance, name );
245 }
246 }
247 if (!hicon) hicon = LoadIconA( 0, name );
248 /* Windows doesn't try to load a standard cursor,
249 probably because most IDs for standard cursors conflict
250 with the IDs for standard icons anyway */
251 return hicon;
252}
HINSTANCE hInstance
Definition: charmap.c:19
#define SS_REALSIZEIMAGE
Definition: winuser.h:354
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
Definition: cursoricon.c:2429
#define LR_SHARED
Definition: winuser.h:1111
HANDLE WINAPI LoadImageA(_In_opt_ HINSTANCE hInst, _In_ LPCSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2547
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2459
Definition: name.c:39
uint32_t ULONG_PTR
Definition: typedefs.h:65

Referenced by StaticWndProc_common().

◆ STATIC_LoadIconW()

static HICON STATIC_LoadIconW ( HINSTANCE  hInstance,
LPCWSTR  name,
DWORD  style 
)
static

Definition at line 279 of file static.c.

280{
281 HICON hicon = 0;
282
283 if (hInstance && ((ULONG_PTR)hInstance >> 16))
284 {
285 if ((style & SS_REALSIZEIMAGE) != 0)
286 hicon = LoadImageW(hInstance, name, IMAGE_ICON, 0, 0, LR_SHARED);
287 else
288 {
289 hicon = LoadIconW( hInstance, name );
290 if (!hicon) hicon = LoadCursorW( hInstance, name );
291 }
292 }
293 if (!hicon) hicon = LoadIconW( 0, name );
294 /* Windows doesn't try to load a standard cursor,
295 probably because most IDs for standard cursors conflict
296 with the IDs for standard icons anyway */
297 return hicon;
298}
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2572
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2474
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2444

◆ STATIC_PaintBitmapfn()

static void STATIC_PaintBitmapfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 860 of file static.c.

861{
862 HDC hMemDC;
863 HBITMAP hBitmap, oldbitmap;
864
865 if ((hBitmap = get_control_icon( hwnd ))
867 && (hMemDC = CreateCompatibleDC( hdc )))
868 {
869 BITMAP bm;
870 RECT rcClient;
871
872 GetObjectW(hBitmap, sizeof(bm), &bm);
873 oldbitmap = SelectObject(hMemDC, hBitmap);
874
875 GetClientRect(hwnd, &rcClient);
876 if (style & SS_CENTERIMAGE)
877 {
878 hbrush = CreateSolidBrush(GetPixel(hMemDC, 0, 0));
879
880 FillRect(hdc, &rcClient, hbrush);
881
882 rcClient.left = (rcClient.right - rcClient.left)/2 - bm.bmWidth/2;
883 rcClient.top = (rcClient.bottom - rcClient.top)/2 - bm.bmHeight/2;
884 rcClient.right = rcClient.left + bm.bmWidth;
885 rcClient.bottom = rcClient.top + bm.bmHeight;
886
888 }
889 StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
890 rcClient.bottom - rcClient.top, hMemDC,
891 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
892 SelectObject(hMemDC, oldbitmap);
893 DeleteDC(hMemDC);
894 }
895}
static HBRUSH hbrush
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
Definition: ObTypes.cpp:68
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
Definition: blt.cpp:2
static HBITMAP hBitmap
Definition: timezone.c:26
pKey DeleteObject()
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
#define OBJ_BITMAP
Definition: objidl.idl:1020
#define SS_CENTERIMAGE
Definition: winuser.h:339
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
LONG bmHeight
Definition: wingdi.h:1869
LONG bmWidth
Definition: wingdi.h:1868
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
#define SRCCOPY
Definition: wingdi.h:333
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)

◆ STATIC_PaintEnhMetafn()

static void STATIC_PaintEnhMetafn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 898 of file static.c.

899{
900 HENHMETAFILE hEnhMetaFile;
901 RECT rc;
902
903 GetClientRect(hwnd, &rc);
904 FillRect(hdc, &rc, hbrush);
905 if ((hEnhMetaFile = get_control_icon( hwnd )))
906 {
907 /* The control's current font is not selected into the
908 device context! */
909 if (GetObjectType(hEnhMetaFile) == OBJ_ENHMETAFILE)
910 PlayEnhMetaFile(hdc, hEnhMetaFile, &rc);
911 }
912}
#define OBJ_ENHMETAFILE
Definition: objidl.idl:1026
BOOL WINAPI PlayEnhMetaFile(_In_ HDC, _In_ HENHMETAFILE, _In_ LPCRECT)

◆ STATIC_PaintEtchedfn()

static void STATIC_PaintEtchedfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 915 of file static.c.

916{
917 RECT rc;
918
919 GetClientRect( hwnd, &rc );
921}
#define EDGE_ETCHED
Definition: winuser.h:452
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define BF_RECT
Definition: winuser.h:462

◆ STATIC_PaintIconfn()

static void STATIC_PaintIconfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 826 of file static.c.

827{
828 RECT rc, iconRect;
829 HICON hIcon;
830 SIZE size;
831
832 GetClientRect( hwnd, &rc );
834 if (!hIcon || !get_icon_size( hIcon, &size ))
835 {
836 FillRect(hdc, &rc, hbrush);
837 }
838 else
839 {
840 if (style & SS_CENTERIMAGE)
841 {
842 iconRect.left = (rc.right - rc.left) / 2 - size.cx / 2;
843 iconRect.top = (rc.bottom - rc.top) / 2 - size.cy / 2;
844 iconRect.right = iconRect.left + size.cx;
845 iconRect.bottom = iconRect.top + size.cy;
846 }
847 else
848 iconRect = rc;
849 FillRect( hdc, &rc, hbrush );
850#ifdef __REACTOS__
851 NtUserDrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left,
852 iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL, 0, 0 );
853#else
854 NtUserDrawIconEx( hdc, iconRect.left, iconRect.top, hIcon, iconRect.right - iconRect.left,
855 iconRect.bottom - iconRect.top, 0, NULL, DI_NORMAL );
856#endif
857 }
858}
static BOOL get_icon_size(HICON handle, SIZE *size)
Definition: static.c:83
GLsizeiptr size
Definition: glext.h:5919
BOOL NTAPI NtUserDrawIconEx(HDC hdc, int xLeft, int yTop, HICON hIcon, int cxWidth, int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags, BOOL bMetaHDC, PVOID pDIXData)
Definition: cursoricon.c:2086
HICON hIcon
Definition: msconfig.c:44
#define DI_NORMAL
Definition: wingdi.h:72

◆ STATIC_PaintOwnerDrawfn()

static void STATIC_PaintOwnerDrawfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 639 of file static.c.

640{
641 DRAWITEMSTRUCT dis;
642 HFONT font, oldFont = NULL;
644
645 dis.CtlType = ODT_STATIC;
646 dis.CtlID = id;
647 dis.itemID = 0;
650 dis.hwndItem = hwnd;
651 dis.hDC = hdc;
652 dis.itemData = 0;
653 GetClientRect( hwnd, &dis.rcItem );
654
656 if (font) oldFont = SelectObject( hdc, font );
658 if (font) SelectObject( hdc, oldFont );
659}
GLuint id
Definition: glext.h:5910
LONG_PTR LPARAM
Definition: minwindef.h:175
#define ODS_DISABLED
Definition: winuser.h:2583
#define GetWindowLongPtrW
Definition: winuser.h:4983
#define ODA_DRAWENTIRE
Definition: winuser.h:2578
#define WM_DRAWITEM
Definition: winuser.h:1673
BOOL WINAPI IsWindowEnabled(_In_ HWND)
HWND WINAPI GetParent(_In_ HWND)
#define GWLP_ID
Definition: winuser.h:871
#define ODT_STATIC
Definition: winuser.h:2577
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define UINT
Definition: utils.c:29
ULONG_PTR itemData
Definition: winuser.h:3201
static HFONT get_control_font(HWND hwnd)
Definition: static.c:96

◆ STATIC_PaintRectfn()

static void STATIC_PaintRectfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 786 of file static.c.

787{
788 RECT rc;
789
790 GetClientRect( hwnd, &rc);
791
792 /* FIXME: send WM_CTLCOLORSTATIC */
793 switch (style & SS_TYPEMASK)
794 {
795 case SS_BLACKRECT:
797 FillRect( hdc, &rc, hbrush );
798 break;
799 case SS_GRAYRECT:
801 FillRect( hdc, &rc, hbrush );
802 break;
803 case SS_WHITERECT:
805 FillRect( hdc, &rc, hbrush );
806 break;
807 case SS_BLACKFRAME:
809 FrameRect( hdc, &rc, hbrush );
810 break;
811 case SS_GRAYFRAME:
813 FrameRect( hdc, &rc, hbrush );
814 break;
815 case SS_WHITEFRAME:
817 FrameRect( hdc, &rc, hbrush );
818 break;
819 default:
820 return;
821 }
823}
#define SS_WHITERECT
Definition: pedump.c:698
#define SS_WHITEFRAME
Definition: pedump.c:701
#define SS_BLACKRECT
Definition: pedump.c:696
#define SS_GRAYFRAME
Definition: pedump.c:700
#define SS_GRAYRECT
Definition: pedump.c:697
#define SS_BLACKFRAME
Definition: pedump.c:699
int WINAPI FrameRect(_In_ HDC, _In_ LPCRECT, _In_ HBRUSH)

◆ STATIC_PaintTextfn()

static void STATIC_PaintTextfn ( HWND  hwnd,
HDC  hdc,
HBRUSH  hbrush,
DWORD  style 
)
static

Definition at line 670 of file static.c.

671{
672 RECT rc;
673 HFONT hFont, hOldFont = NULL;
674 UINT format;
675 INT len, buf_size;
676 WCHAR *text;
677
678 GetClientRect( hwnd, &rc);
679
680 switch (style & SS_TYPEMASK)
681 {
682 case SS_LEFT:
684 break;
685
686 case SS_CENTER:
688 break;
689
690 case SS_RIGHT:
692 break;
693
694 case SS_SIMPLE:
696 break;
697
700 break;
701
702 default:
703 return;
704 }
705
708
709 if (style & SS_NOPREFIX)
711#ifdef __REACTOS__
712 else if (GetWindowLongW(hwnd, UISTATE_GWL_OFFSET) & UISF_HIDEACCEL) // ReactOS r30727
714#endif
715
716 if ((style & SS_TYPEMASK) != SS_SIMPLE)
717 {
718 if (style & SS_CENTERIMAGE)
720 if (style & SS_EDITCONTROL)
722 if (style & SS_ENDELLIPSIS)
728 }
729
730 if ((hFont = get_control_font( hwnd )))
731 hOldFont = SelectObject( hdc, hFont );
732
733 if ((style & SS_TYPEMASK) != SS_SIMPLE)
734 {
735 FillRect( hdc, &rc, hbrush );
737 }
738
739 buf_size = 256;
740 if (!(text = HeapAlloc( GetProcessHeap(), 0, buf_size * sizeof(WCHAR) )))
741 goto no_TextOut;
742
743 while ((len = NtUserInternalGetWindowText( hwnd, text, buf_size )) == buf_size - 1)
744 {
745 buf_size *= 2;
746 if (!(text = HeapReAlloc( GetProcessHeap(), 0, text, buf_size * sizeof(WCHAR) )))
747 goto no_TextOut;
748 }
749
750 if (!len) goto no_TextOut;
751
752 if (((style & SS_TYPEMASK) == SS_SIMPLE) && (style & SS_NOPREFIX))
753 {
754 /* Windows uses the faster ExtTextOut() to draw the text and
755 to paint the whole client rectangle with the text background
756 color. Reference: "Static Controls" by Kyle Marsh, 1992 */
758 &rc, text, len, NULL );
759 }
760#ifdef __REACTOS__
761 else
762 {
764 if (style & WS_DISABLED)
768 rc.left, rc.top,
769 rc.right - rc.left, rc.bottom - rc.top,
770 flags);
771 }
772#else
773 else
774 {
775 DrawTextW( hdc, text, -1, &rc, format );
776 }
777#endif
778
779no_TextOut:
781
782 if (hFont)
783 SelectObject( hdc, hOldFont );
784}
HFONT hFont
Definition: main.c:53
static BOOL CALLBACK STATIC_DrawTextCallback(HDC hdc, LPARAM lp, WPARAM wp, int cx, int cy)
Definition: static.c:531
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapReAlloc
Definition: compat.h:734
#define HeapFree(x, y, z)
Definition: compat.h:735
const WCHAR * text
Definition: package.c:1826
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
INT NTAPI NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
Definition: window.c:4592
UINT_PTR WPARAM
Definition: minwindef.h:174
short WCHAR
Definition: pedump.c:58
#define WS_DISABLED
Definition: pedump.c:621
#define DT_NOPREFIX
Definition: winuser.h:537
#define COLOR_GRAYTEXT
Definition: winuser.h:943
#define SS_PATHELLIPSIS
Definition: winuser.h:364
#define DT_CENTER
Definition: winuser.h:527
#define DT_END_ELLIPSIS
Definition: winuser.h:529
#define DSS_DISABLED
Definition: winuser.h:519
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define DT_SINGLELINE
Definition: winuser.h:540
#define SS_EDITCONTROL
Definition: winuser.h:340
#define SS_NOPREFIX
Definition: winuser.h:350
#define SS_WORDELLIPSIS
Definition: winuser.h:365
#define DT_LEFT
Definition: winuser.h:534
#define DST_COMPLEX
Definition: winuser.h:512
#define DT_WORDBREAK
Definition: winuser.h:544
#define DT_VCENTER
Definition: winuser.h:543
#define DT_WORD_ELLIPSIS
Definition: winuser.h:531
#define DT_RIGHT
Definition: winuser.h:538
#define DT_EXPANDTABS
Definition: winuser.h:532
#define DT_HIDEPREFIX
Definition: winuser.h:547
#define DT_EDITCONTROL
Definition: winuser.h:528
BOOL WINAPI DrawStateW(_In_ HDC, _In_opt_ HBRUSH, _In_opt_ DRAWSTATEPROC, _In_ LPARAM, _In_ WPARAM, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define DT_PATH_ELLIPSIS
Definition: winuser.h:530
#define WS_EX_RIGHT
Definition: winuser.h:400
#define GWL_EXSTYLE
Definition: winuser.h:862
#define SS_ENDELLIPSIS
Definition: statst2.c:8
int32_t INT
Definition: typedefs.h:58
#define ETO_CLIPPED
Definition: wingdi.h:648
BOOL WINAPI ExtTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_ UINT options, _In_opt_ const RECT *lprect, _In_reads_opt_(c) LPCWSTR lpString, _In_ UINT c, _In_reads_opt_(c) const INT *lpDx)
#define ETO_OPAQUE
Definition: wingdi.h:647
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:917

◆ STATIC_SendWmCtlColorStatic()

static HBRUSH STATIC_SendWmCtlColorStatic ( HWND  hwnd,
HDC  hdc 
)
static

Definition at line 258 of file static.c.

259{
260#ifdef __REACTOS__
262#else
263 HBRUSH hBrush;
265
266 if (!parent) parent = hwnd;
267 hBrush = (HBRUSH) SendMessageW( parent, WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
268 if (!hBrush) /* did the app forget to call DefWindowProc ? */
270 return hBrush;
271#endif
272}
r parent
Definition: btrfs.c:3010
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1800
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HBRUSH FASTCALL GetControlBrush(PWND pwnd, HDC hdc, UINT ctlType)
Definition: misc.c:179

◆ STATIC_SetBitmap()

static HBITMAP STATIC_SetBitmap ( HWND  hwnd,
HBITMAP  hBitmap,
DWORD  style 
)
static

Definition at line 156 of file static.c.

157{
158 HBITMAP hOldBitmap;
159
161 WARN("hBitmap != 0, but it's not a bitmap\n");
162 return 0;
163 }
164 hOldBitmap = set_control_icon( hwnd, hBitmap );
166 {
167 BITMAP bm;
168 GetObjectW(hBitmap, sizeof(bm), &bm);
169 /* Windows currently doesn't implement SS_RIGHTJUST */
170 /*
171 if ((style & SS_RIGHTJUST) != 0)
172 {
173 RECT wr;
174 GetWindowRect(hwnd, &wr);
175 SetWindowPos( hwnd, 0, wr.right - bm.bmWidth, wr.bottom - bm.bmHeight,
176 bm.bmWidth, bm.bmHeight, SWP_NOACTIVATE | SWP_NOZORDER );
177 }
178 else */
179 {
180 NtUserSetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
182 }
183
184 }
185 return hOldBitmap;
186}
#define WARN(fmt,...)
Definition: precomp.h:61
BOOL NTAPI NtUserSetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
Definition: winpos.c:3573
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SS_REALSIZECONTROL
Definition: winuser.h:353
#define SWP_NOZORDER
Definition: winuser.h:1258
static HANDLE set_control_icon(HWND hwnd, HANDLE icon)
Definition: static.c:111

◆ STATIC_SetEnhMetaFile()

static HENHMETAFILE STATIC_SetEnhMetaFile ( HWND  hwnd,
HENHMETAFILE  hEnhMetaFile,
DWORD  style 
)
static

Definition at line 193 of file static.c.

194{
195 if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE) {
196 WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
197 return 0;
198 }
199 return set_control_icon( hwnd, hEnhMetaFile );
200}

◆ STATIC_SetIcon()

static HICON STATIC_SetIcon ( HWND  hwnd,
HICON  hicon,
DWORD  style 
)
static

Definition at line 121 of file static.c.

122{
123 HICON prevIcon;
124 SIZE size;
125
126 if (hicon && !get_icon_size( hicon, &size ))
127 {
128 WARN("hicon != 0, but invalid\n");
129 return 0;
130 }
131 prevIcon = set_control_icon( hwnd, hicon );
132 if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
133 {
134 /* Windows currently doesn't implement SS_RIGHTJUST */
135 /*
136 if ((style & SS_RIGHTJUST) != 0)
137 {
138 RECT wr;
139 GetWindowRect(hwnd, &wr);
140 SetWindowPos( hwnd, 0, wr.right - info->nWidth, wr.bottom - info->nHeight,
141 info->nWidth, info->nHeight, SWP_NOACTIVATE | SWP_NOZORDER );
142 }
143 else */
144 {
146 }
147 }
148 return prevIcon;
149}

◆ STATIC_TryPaintFcn()

static VOID STATIC_TryPaintFcn ( HWND  hwnd,
LONG  full_style 
)
static

Definition at line 305 of file static.c.

306{
308 {
309 RECT rc;
310 HDC hdc;
311 HRGN hrgn;
312 HBRUSH hbrush;
313 LONG style = full_style & SS_TYPEMASK;
314
315 GetClientRect( hwnd, &rc );
316 hdc = NtUserGetDC( hwnd );
317 hrgn = set_control_clipping( hdc, &rc );
320 (staticPaintFunc[style])( hwnd, hdc, hbrush, full_style );
322 if (hrgn) DeleteObject( hrgn );
324 }
325}
static HRGN hrgn
HRGN set_control_clipping(HDC hdc, const RECT *rect)
Definition: button.c:242
static HBRUSH STATIC_SendWmCtlColorStatic(HWND hwnd, HDC hdc)
Definition: static.c:285
static const pfPaint staticPaintFunc[SS_TYPEMASK+1]
Definition: static.c:60
HDC NTAPI NtUserGetDC(HWND hWnd)
Definition: windc.c:1014
long LONG
Definition: pedump.c:60
BOOL WINAPI IsWindowVisible(_In_ HWND)
#define NtUserReleaseDC(HWND, HDC)
Definition: user_x.h:120
int WINAPI SelectClipRgn(_In_ HDC, _In_opt_ HRGN)

◆ StaticWndProc_common()

LRESULT WINAPI StaticWndProc_common ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL  unicode 
)

Definition at line 358 of file static.c.

359{
360 LRESULT lResult = 0;
361 LONG full_style = GetWindowLongW( hwnd, GWL_STYLE );
362 LONG style = full_style & SS_TYPEMASK;
363
364 if (!IsWindow( hwnd )) return 0;
366
367 switch (uMsg)
368 {
369 case WM_CREATE:
370 if (style < 0L || style > SS_TYPEMASK)
371 {
372 ERR("Unknown style 0x%02lx\n", style );
373 return -1;
374 }
375 STATIC_update_uistate(hwnd, unicode); // ReactOS r30727
377 break;
378
379 case WM_NCDESTROY:
380#ifdef __REACTOS__
382#endif
383 if (style == SS_ICON) {
384/*
385 * FIXME
386 * DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
387 *
388 * We don't want to do this yet because DestroyIcon32 is broken. If the icon
389 * had already been loaded by the application the last thing we want to do is
390 * GlobalFree16 the handle.
391 */
392 break;
393 }
394 else return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) :
396
397 case WM_ERASEBKGND:
398 /* do all painting in WM_PAINT like Windows does */
399 return 1;
400
401 case WM_PRINTCLIENT:
402 case WM_PAINT:
403 {
404 PAINTSTRUCT ps;
405 RECT rect;
407 HRGN hrgn;
408 HBRUSH hbrush;
409
414 (staticPaintFunc[style])( hwnd, hdc, hbrush, full_style );
416 if (hrgn) DeleteObject( hrgn );
417 if (!wParam) NtUserEndPaint( hwnd, &ps );
418 }
419 break;
420
421 case WM_ENABLE:
422 STATIC_TryPaintFcn( hwnd, full_style );
423 if (full_style & SS_NOTIFY) {
424 if (wParam) {
427 }
428 else {
431 }
432 }
433 break;
434
437 STATIC_TryPaintFcn( hwnd, full_style );
438 break;
439
440 case WM_NCCREATE:
441 {
443
444 if (full_style & SS_SUNKEN || style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT)
447
449 {
450 RECT rc;
451 GetClientRect(hwnd, &rc);
452 if (style == SS_ETCHEDHORZ)
453 rc.bottom = rc.top;
454 else
455 rc.right = rc.left;
457 NtUserSetWindowPos( hwnd, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
459 }
460
461 switch (style) {
462 case SS_ICON:
463 {
464 const WCHAR *name = cs->lpszName;
465 HICON hIcon;
466
467 if (!unicode)
468 {
469 const char *nameA = (const char *)name;
470 if (nameA && nameA[0] == '\xff')
471 name = MAKEINTRESOURCEW(MAKEWORD(nameA[1], nameA[2]));
472 }
473 else if (name && name[0] == 0xffff)
474 {
476 }
477
478 if (unicode || IS_INTRESOURCE(name))
479 hIcon = STATIC_LoadIconW(cs->hInstance, name, full_style);
480 else
481 hIcon = STATIC_LoadIconA(cs->hInstance, (const char *)name, full_style);
482 STATIC_SetIcon(hwnd, hIcon, full_style);
483 }
484 break;
485 case SS_BITMAP:
486 if ((ULONG_PTR)cs->hInstance >> 16)
487 {
488 const WCHAR *name = cs->lpszName;
490
491 if (!unicode)
492 {
493 const char *nameA = (const char *)name;
494 if (nameA && nameA[0] == '\xff')
495 name = MAKEINTRESOURCEW(MAKEWORD(nameA[1], nameA[2]));
496 }
497 else if (name && name[0] == 0xffff)
498 {
500 }
501
502 if (unicode || IS_INTRESOURCE(name))
503 hBitmap = LoadBitmapW(cs->hInstance, name);
504 else
505 hBitmap = LoadBitmapA(cs->hInstance, (const char *)name);
506 STATIC_SetBitmap(hwnd, hBitmap, full_style);
507 }
508 break;
509 }
510 /* SS_ENHMETAFILE: Despite what MSDN says, Windows does not load
511 the enhanced metafile that was specified as the window text. */
512 }
513 return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) :
515
516 case WM_SETTEXT:
517 if (hasTextStyle( full_style ))
518 {
519 if (unicode)
520 lResult = DefWindowProcW( hwnd, uMsg, wParam, lParam );
521 else
522 lResult = DefWindowProcA( hwnd, uMsg, wParam, lParam );
523 STATIC_TryPaintFcn( hwnd, full_style );
524 }
525 break;
526
527 case WM_SETFONT:
528 if (hasTextStyle( full_style ))
529 {
530 set_control_font( hwnd, (HFONT)wParam );
531 if (LOWORD(lParam))
534 }
535 break;
536
537 case WM_GETFONT:
538 return (LRESULT)get_control_font( hwnd );
539
540 case WM_NCHITTEST:
541 if (full_style & SS_NOTIFY)
542 return HTCLIENT;
543 else
544 return HTTRANSPARENT;
545
546 case WM_GETDLGCODE:
547 return DLGC_STATIC;
548
549 case WM_LBUTTONDOWN:
550 case WM_NCLBUTTONDOWN:
551 if (full_style & SS_NOTIFY)
554 return 0;
555
556 case WM_LBUTTONDBLCLK:
558 if (full_style & SS_NOTIFY)
561 return 0;
562
563 case STM_GETIMAGE:
564 return (LRESULT)STATIC_GetImage( hwnd, wParam, full_style );
565
566 case STM_GETICON:
567 return (LRESULT)STATIC_GetImage( hwnd, IMAGE_ICON, full_style );
568
569 case STM_SETIMAGE:
570 switch(wParam) {
571 case IMAGE_BITMAP:
572 if (style != SS_BITMAP) return 0; // ReactOS r43158
573 if (style != SS_BITMAP) return 0;
574 lResult = (LRESULT)STATIC_SetBitmap( hwnd, (HBITMAP)lParam, full_style );
575 break;
577 if (style != SS_ENHMETAFILE) return 0; // ReactOS r43158
578 if (style != SS_ENHMETAFILE) return 0;
579 lResult = (LRESULT)STATIC_SetEnhMetaFile( hwnd, (HENHMETAFILE)lParam, full_style );
580 break;
581 case IMAGE_ICON:
582 case IMAGE_CURSOR:
583 if (style != SS_ICON) return 0; // ReactOS r43158
584 if (style != SS_ICON) return 0;
585 lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, full_style );
586 break;
587 default:
588 FIXME("STM_SETIMAGE: Unhandled type %Ix\n", wParam);
589 break;
590 }
591 STATIC_TryPaintFcn( hwnd, full_style );
592 break;
593
594 case STM_SETICON:
595 if (style != SS_ICON) return 0;
596 lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)wParam, full_style );
597 STATIC_TryPaintFcn( hwnd, full_style );
598 break;
599
600#ifdef __REACTOS__
601 case WM_UPDATEUISTATE:
602 if (unicode)
604 else
606
607 if (STATIC_update_uistate(hwnd, unicode) && hasTextStyle( full_style ))
608 {
610 }
611 break;
612#endif
613
614 default:
615 return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) :
617 }
618 return lResult;
619}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
RECT rect
Definition: combotst.c:67
LPARAM lParam
Definition: combotst.c:139
static HBITMAP STATIC_SetBitmap(HWND hwnd, HBITMAP hBitmap, DWORD style)
Definition: static.c:159
static HICON STATIC_LoadIconW(HINSTANCE hInstance, LPCWSTR name, DWORD style)
Definition: static.c:239
static HICON STATIC_SetIcon(HWND hwnd, HICON hicon, DWORD style)
Definition: static.c:123
static BOOL hasTextStyle(DWORD style)
Definition: static.c:306
static HANDLE STATIC_GetImage(HWND hwnd, WPARAM wParam, DWORD style)
Definition: static.c:214
static VOID STATIC_TryPaintFcn(HWND hwnd, LONG full_style)
Definition: static.c:265
static HENHMETAFILE STATIC_SetEnhMetaFile(HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style)
Definition: static.c:197
#define IS_INTRESOURCE(x)
Definition: loader.c:613
#define cs
Definition: i386-dis.c:442
#define FNID_DESTROY
Definition: ntuser.h:905
BOOL NTAPI NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT *lPs)
Definition: painting.c:1660
HDC NTAPI NtUserBeginPaint(HWND hWnd, PAINTSTRUCT *lPs)
Definition: painting.c:1614
BOOL NTAPI NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
Definition: painting.c:2002
BOOL NTAPI NtUserSetWindowFNID(HWND hWnd, WORD fnID)
Definition: window.c:4335
LONG_PTR LRESULT
Definition: minwindef.h:176
#define LRESULT
Definition: ole.h:14
#define LOWORD(l)
Definition: pedump.c:82
#define WM_PAINT
Definition: winuser.h:1648
#define WM_ERASEBKGND
Definition: winuser.h:1653
#define MAKEWPARAM(l, h)
Definition: winuser.h:4117
#define WS_EX_STATICEDGE
Definition: winuser.h:403
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define WM_ENABLE
Definition: winuser.h:1643
#define STM_SETICON
Definition: winuser.h:2128
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1636
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1806
#define WM_COMMAND
Definition: winuser.h:1768
#define SS_NOTIFY
Definition: winuser.h:351
#define WM_NCHITTEST
Definition: winuser.h:1714
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define RDW_UPDATENOW
Definition: winuser.h:1231
#define SS_ETCHEDHORZ
Definition: winuser.h:343
#define RDW_ERASE
Definition: winuser.h:1222
HBITMAP WINAPI LoadBitmapA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2517
#define WM_LBUTTONDOWN
Definition: winuser.h:1804
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1654
#define WM_GETFONT
Definition: winuser.h:1679
#define SS_ETCHEDVERT
Definition: winuser.h:344
#define STM_SETIMAGE
Definition: winuser.h:2129
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1722
#define WM_NCCREATE
Definition: winuser.h:1711
#define STM_GETICON
Definition: winuser.h:2126
#define STN_DISABLE
Definition: winuser.h:2132
#define WM_SETTEXT
Definition: winuser.h:1645
#define RDW_ALLCHILDREN
Definition: winuser.h:1232
#define WM_SETFONT
Definition: winuser.h:1678
#define HTCLIENT
Definition: winuser.h:2511
#define DLGC_STATIC
Definition: winuser.h:2661
#define WM_NCDESTROY
Definition: winuser.h:1712
#define HTTRANSPARENT
Definition: winuser.h:2509
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2532
#define GWL_STYLE
Definition: winuser.h:863
#define STN_DBLCLK
Definition: winuser.h:2131
#define STM_GETIMAGE
Definition: winuser.h:2127
#define SS_SUNKEN
Definition: winuser.h:358
#define STN_ENABLE
Definition: winuser.h:2133
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1720
#define STN_CLICKED
Definition: winuser.h:2130
#define RDW_INVALIDATE
Definition: winuser.h:1225
#define WM_GETDLGCODE
Definition: winuser.h:1717
#define WM_PRINTCLIENT
Definition: richedit.h:70
#define MAKEWORD(a, b)
Definition: typedefs.h:248
static __inline BOOL STATIC_update_uistate(HWND hwnd, BOOL unicode)
Definition: user_x.h:65
#define MAKE_FNID(index)
Definition: user_x.h:143
#define NTUSER_WNDPROC_STATIC
Definition: user_x.h:139
static VOID STATIC_InitColours(void)
Definition: static.c:327
static HFONT set_control_font(HWND hwnd, HFONT font)
Definition: static.c:101
static HICON STATIC_LoadIconA(HINSTANCE hInstance, LPCSTR name, DWORD style)
Definition: static.c:233

Referenced by RegisterClientPFN(), StaticWndProcA(), and StaticWndProcW().

◆ StaticWndProcA()

LRESULT WINAPI StaticWndProcA ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 624 of file static.c.

625{
626 if (!IsWindow( hWnd )) return 0;
628}
HWND hWnd
Definition: settings.c:17
LRESULT WINAPI StaticWndProc_common(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL unicode)
Definition: static.c:358

Referenced by RegisterClientPFN().

◆ StaticWndProcW()

LRESULT WINAPI StaticWndProcW ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 633 of file static.c.

634{
635 if (!IsWindow( hWnd )) return 0;
636 return StaticWndProc_common(hWnd, uMsg, wParam, lParam, TRUE);
637}

Referenced by RegisterClientPFN().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( static  )

Variable Documentation

◆ color_3ddkshadow

COLORREF color_3ddkshadow
static

Definition at line 43 of file static.c.

Referenced by STATIC_InitColours(), and STATIC_PaintRectfn().

◆ color_3dhighlight

COLORREF color_3dhighlight
static

Definition at line 43 of file static.c.

Referenced by STATIC_InitColours(), and STATIC_PaintRectfn().

◆ color_3dshadow

COLORREF color_3dshadow
static

Definition at line 43 of file static.c.

Referenced by STATIC_InitColours(), and STATIC_PaintRectfn().

◆ staticPaintFunc

const pfPaint staticPaintFunc[SS_TYPEMASK+1]
static
Initial value:
=
{
NULL,
NULL,
NULL,
}
static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:765
static void STATIC_PaintOwnerDrawfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:508
static void STATIC_PaintTextfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:540
static void STATIC_PaintRectfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:650
static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:722
static void STATIC_PaintIconfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:691
static void STATIC_PaintEtchedfn(HWND hwnd, HDC hdc, DWORD style)
Definition: static.c:783

Definition at line 55 of file static.c.