ReactOS 0.4.16-dev-112-g52265ae
rebar.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>
#include "wine/heap.h"
#include "wine/test.h"
Include dependency graph for rebar.c:

Go to the source code of this file.

Classes

struct  rbband_result_t
 
struct  rbsize_result_t
 
struct  rbresize_test_result_t
 

Macros

#define _WIN32_WINNT   0x500
 
#define _WIN32_IE   0x500
 
#define check_rect(name, val, exp)
 
#define check_rect_no_top(name, val, exp)
 
#define compare(val, exp, format)   ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));
 
#define expect_eq(line, expr, value, type, format)
 
#define rbsize_results_num   27
 
#define check_sizes_todo(todomask)
 
#define check_sizes()   check_sizes_todo(0)
 
#define comment(fmt, arg1)
 
#define check_client()
 
#define expect_band_content(hRebar, uBand, fStyle, clrFore, clrBack, lpText, iImage, hwndChild, cxMinChild, cyMinChild, cx, hbmBack, wID, cyChild, cyMaxChild, cyIntegral, cxIdeal, lParam, cxHeader, cxHeader_broken)
 
#define X(f)   p##f = (void*)GetProcAddress(hComCtl32, #f);
 

Functions

static BOOL (WINAPI *pImageList_Destroy)(HIMAGELIST)
 
static HIMAGELIST (WINAPI *pImageList_LoadImageA)(HINSTANCE
 
static INT CALLBACK is_font_installed_proc (const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
 
static BOOL is_font_installed (const char *name)
 
static void init_system_font_height (void)
 
static HWND create_rebar_control (void)
 
static HWND build_toolbar (int nr, HWND hParent)
 
static LRESULT CALLBACK parent_wndproc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static int string_width (const CHAR *s)
 
static rbsize_result_t rbsize_init (int cleft, int ctop, int cright, int cbottom, int cyBarHeight, int nRows, int nBands)
 
static void rbsize_add_row (rbsize_result_t *rbsr, int rowHeight)
 
static void rbsize_add_band (rbsize_result_t *rbsr, int left, int top, int right, int bottom, DWORD fStyle, UINT cx)
 
static void rbsize_results_init (void)
 
static void rbsize_results_free (void)
 
static void add_band_w (HWND hRebar, LPCSTR lpszText, int cxMinChild, int cx, int cxIdeal)
 
static void test_layout (void)
 
static void test_resize (void)
 
static void expect_band_content_ (int line, HWND hRebar, UINT uBand, INT fStyle, COLORREF clrFore, COLORREF clrBack, LPCSTR lpText, int iImage, HWND hwndChild, INT cxMinChild, INT cyMinChild, INT cx, HBITMAP hbmBack, INT wID, INT cyChild, INT cyMaxChild, INT cyIntegral, INT cxIdeal, LPARAM lParam, UINT cxHeader, UINT cxHeader_broken)
 
static void test_bandinfo (void)
 
static void test_colors (void)
 
static BOOL register_parent_wnd_class (void)
 
static HWND create_parent_window (void)
 
static void test_showband (void)
 
static void test_notification (void)
 
static void init_functions (void)
 
 START_TEST (rebar)
 

Variables

static LPCSTR
 
static int
 
static COLORREF
 
static UINT
 
static RECT height_change_notify_rect
 
static HWND hMainWnd
 
static int system_font_height
 
static int g_parent_measureitem
 
static rbsize_result_trbsize_results
 
static int rbsize_numtests = 0
 
static const rbresize_test_result_t resize_results []
 
static DWORD resize_numtests = 0
 

Macro Definition Documentation

◆ _WIN32_IE

#define _WIN32_IE   0x500

Definition at line 22 of file rebar.c.

◆ _WIN32_WINNT

#define _WIN32_WINNT   0x500

Definition at line 21 of file rebar.c.

◆ check_client

#define check_client ( )
Value:
{ \
RECT r; \
int value; \
GetWindowRect(hRebar, &r); \
MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2); \
check_rect_no_top("client", r, res->rc); /* the top coordinate changes after every layout and is very implementation-dependent */ \
} else { \
check_rect("client", r, res->rc); \
} \
value = (int)SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0); \
ok(res->iNumRows == value, "RB_GETROWCOUNT expected %d got %d\n", res->iNumRows, value); \
if (res->heightNotify) { \
RECT rcClient; \
GetClientRect(hRebar, &rcClient); \
check_rect("notify", height_change_notify_rect, rcClient); \
} else ok(height_change_notify_rect.top == -1, "Unexpected RBN_HEIGHTCHANGE received\n"); \
SetRect(&height_change_notify_rect, -1, -1, -1, -1); \
}
#define ok(value,...)
Definition: atltest.h:57
#define ARRAY_SIZE(A)
Definition: main.h:20
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint res
Definition: glext.h:9613
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static RECT height_change_notify_rect
Definition: rebar.c:37
static HWND hMainWnd
Definition: rebar.c:38
static const rbresize_test_result_t resize_results[]
Definition: rebar.c:720
static DWORD resize_numtests
Definition: rebar.c:841
#define RB_GETROWCOUNT
Definition: commctrl.h:1586
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2251
LONG top
Definition: windef.h:307
Definition: pdh_main.c:94
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define HWND_DESKTOP
Definition: winuser.h:1212

Definition at line 844 of file rebar.c.

◆ check_rect

#define check_rect (   name,
  val,
  exp 
)
Value:
"invalid rect (" name ") %s - expected %s\n", wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp));
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
GLuint GLfloat * val
Definition: glext.h:7180
DWORD exp
Definition: msg.c:16058
Definition: name.c:39
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)

Definition at line 42 of file rebar.c.

◆ check_rect_no_top

#define check_rect_no_top (   name,
  val,
  exp 
)
Value:
{ \
ok((val.bottom - val.top == exp.bottom - exp.top) && \
val.left == exp.left && val.right == exp.right, \
"invalid rect (" name ") %s - expected %s, ignoring top\n", \

Definition at line 45 of file rebar.c.

◆ check_sizes

#define check_sizes ( )    check_sizes_todo(0)

Definition at line 474 of file rebar.c.

◆ check_sizes_todo

#define check_sizes_todo (   todomask)
Value:
{ \
RECT rc; \
int count, i/*, mask=(todomask)*/; \
GetClientRect(hRebar, &rc); \
check_rect("client", rc, res->rcClient); \
count = SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0); \
compare(count, res->nRows, "%d"); \
for (i=0; i<min(count, res->nRows); i++) { \
int height = SendMessageA(hRebar, RB_GETROWHEIGHT, 0, 0);\
ok(height == res->cyRowHeights[i], "Height mismatch for row %d - %d vs %d\n", i, res->cyRowHeights[i], height); \
} \
count = SendMessageA(hRebar, RB_GETBANDCOUNT, 0, 0); \
compare(count, res->nBands, "%d"); \
for (i=0; i<min(count, res->nBands); i++) { \
ok(SendMessageA(hRebar, RB_GETRECT, i, (LPARAM)&rc) == 1, "RB_GETRECT\n"); \
if (!(res->bands[i].fStyle & RBBS_HIDDEN)) \
check_rect("band", rc, res->bands[i].rc); \
ok(SendMessageA(hRebar, RB_GETBANDINFOA, i, (LPARAM)&rbi) == 1, "RB_GETBANDINFOA\n"); \
compare(rbi.fStyle, res->bands[i].fStyle, "%x"); \
compare(rbi.cx, res->bands[i].cx, "%d"); \
} \
}
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static rbsize_result_t * rbsize_results
Definition: rebar.c:244
static int rbsize_numtests
Definition: rebar.c:444
#define min(a, b)
Definition: monoChain.cc:55
#define RB_GETRECT
Definition: commctrl.h:1582
#define RB_GETBANDINFOA
Definition: commctrl.h:1610
#define REBARBANDINFOA_V6_SIZE
Definition: commctrl.h:1541
#define RBBS_HIDDEN
Definition: commctrl.h:1492
#define RBBIM_STYLE
Definition: commctrl.h:1502
#define RBBIM_SIZE
Definition: commctrl.h:1508
#define RB_GETROWHEIGHT
Definition: commctrl.h:1587
#define RB_GETBANDCOUNT
Definition: commctrl.h:1585
LONG_PTR LPARAM
Definition: windef.h:208

Definition at line 446 of file rebar.c.

◆ comment

#define comment (   fmt,
  arg1 
)

Definition at line 843 of file rebar.c.

◆ compare

#define compare (   val,
  exp,
  format 
)    ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));

Definition at line 51 of file rebar.c.

◆ expect_band_content

#define expect_band_content (   hRebar,
  uBand,
  fStyle,
  clrFore,
  clrBack,
  lpText,
  iImage,
  hwndChild,
  cxMinChild,
  cyMinChild,
  cx,
  hbmBack,
  wID,
  cyChild,
  cyMaxChild,
  cyIntegral,
  cxIdeal,
  lParam,
  cxHeader,
  cxHeader_broken 
)
Value:
expect_band_content_(__LINE__, hRebar, uBand, fStyle, clrFore, clrBack,\
lpText, iImage, hwndChild, cxMinChild, cyMinChild, cx, hbmBack, wID,\
cyChild, cyMaxChild, cyIntegral, cxIdeal, lParam, cxHeader, cxHeader_broken)
LPARAM lParam
Definition: combotst.c:139
static void expect_band_content_(int line, HWND hRebar, UINT uBand, INT fStyle, COLORREF clrFore, COLORREF clrBack, LPCSTR lpText, int iImage, HWND hwndChild, INT cxMinChild, INT cyMinChild, INT cx, HBITMAP hbmBack, INT wID, INT cyChild, INT cyMaxChild, INT cyIntegral, INT cxIdeal, LPARAM lParam, UINT cxHeader, UINT cxHeader_broken)
Definition: rebar.c:921
_Out_opt_ int * cx
Definition: commctrl.h:585

Definition at line 959 of file rebar.c.

◆ expect_eq

#define expect_eq (   line,
  expr,
  value,
  type,
  format 
)
Value:
{ type ret = expr;\
ok((value) == ret, #expr " expected " format " got " format " from line %d\n", (value), (ret), line); }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: query.h:86
Definition: format.c:58
Definition: parser.c:49
int ret

Definition at line 53 of file rebar.c.

◆ rbsize_results_num

#define rbsize_results_num   27

Definition at line 246 of file rebar.c.

◆ X

#define X (   f)    p##f = (void*)GetProcAddress(hComCtl32, #f);

Function Documentation

◆ add_band_w()

static void add_band_w ( HWND  hRebar,
LPCSTR  lpszText,
int  cxMinChild,
int  cx,
int  cxIdeal 
)
static

Definition at line 478 of file rebar.c.

479{
481 REBARBANDINFOA rbi;
482
483 if (lpszText != NULL)
484 strcpy(buffer, lpszText);
487 rbi.cx = cx;
488 rbi.cxMinChild = cxMinChild;
489 rbi.cxIdeal = cxIdeal;
490 rbi.cyMinChild = 20;
491 rbi.hwndChild = build_toolbar(1, hRebar);
492 rbi.lpText = (lpszText ? buffer : NULL);
493 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
494}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
GLuint buffer
Definition: glext.h:5915
static HWND build_toolbar(int nr, HWND hParent)
Definition: rebar.c:97
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1507
#define RB_INSERTBANDA
Definition: commctrl.h:1575
#define RBBIM_CHILD
Definition: commctrl.h:1506
#define RBBIM_TEXT
Definition: commctrl.h:1504
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1511
char CHAR
Definition: xmlstorage.h:175

Referenced by test_colors(), test_layout(), and test_resize().

◆ BOOL()

static BOOL ( WINAPI pImageList_Destroy)
static

◆ build_toolbar()

static HWND build_toolbar ( int  nr,
HWND  hParent 
)
static

Definition at line 97 of file rebar.c.

98{
99 TBBUTTON btns[8];
101 hParent, (HMENU)5, GetModuleHandleA(NULL), NULL);
102 int iBitmapId = 0;
103 int i;
104
105 ok(hToolbar != NULL, "Toolbar creation problem\n");
106 ok(SendMessageA(hToolbar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0) == 0, "TB_BUTTONSTRUCTSIZE failed\n");
107 ok(SendMessageA(hToolbar, TB_AUTOSIZE, 0, 0) == 0, "TB_AUTOSIZE failed\n");
108 ok(SendMessageA(hToolbar, WM_SETFONT, (WPARAM)GetStockObject(SYSTEM_FONT), 0)==1, "WM_SETFONT\n");
109
110 for (i=0; i<5+nr; i++)
111 {
112 btns[i].iBitmap = i;
113 btns[i].idCommand = i;
114 btns[i].fsStyle = BTNS_BUTTON;
115 btns[i].fsState = TBSTATE_ENABLED;
116 btns[i].iString = 0;
117 }
118
119 switch (nr)
120 {
121 case 0: iBitmapId = IDB_HIST_SMALL_COLOR; break;
122 case 1: iBitmapId = IDB_VIEW_SMALL_COLOR; break;
123 case 2: iBitmapId = IDB_STD_SMALL_COLOR; break;
124 }
125 ok(SendMessageA(hToolbar, TB_LOADIMAGES, iBitmapId, (LPARAM)HINST_COMMCTRL) == 0, "TB_LOADIMAGES failed\n");
126 ok(SendMessageA(hToolbar, TB_ADDBUTTONSA, 5+nr, (LPARAM)btns), "TB_ADDBUTTONSA failed\n");
127 return hToolbar;
128}
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
ULONG nr
Definition: thread.c:7
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define WS_CHILD
Definition: pedump.c:617
#define WS_VISIBLE
Definition: pedump.c:620
#define BTNS_BUTTON
Definition: commctrl.h:998
#define TB_AUTOSIZE
Definition: commctrl.h:1137
#define HINST_COMMCTRL
Definition: commctrl.h:1063
#define IDB_HIST_SMALL_COLOR
Definition: commctrl.h:1068
#define IDB_VIEW_SMALL_COLOR
Definition: commctrl.h:1066
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define TB_ADDBUTTONSA
Definition: commctrl.h:1106
#define TB_LOADIMAGES
Definition: commctrl.h:1152
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define CCS_NORESIZE
Definition: commctrl.h:2250
#define TOOLBARCLASSNAMEA
Definition: commctrl.h:944
#define IDB_STD_SMALL_COLOR
Definition: commctrl.h:1064
BYTE fsState
Definition: commctrl.h:951
INT_PTR iString
Definition: commctrl.h:959
int idCommand
Definition: commctrl.h:950
int iBitmap
Definition: commctrl.h:949
BYTE fsStyle
Definition: commctrl.h:952
UINT_PTR WPARAM
Definition: windef.h:207
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define SYSTEM_FONT
Definition: wingdi.h:911
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define WM_SETFONT
Definition: winuser.h:1653

Referenced by add_band_w(), and test_layout().

◆ create_parent_window()

static HWND create_parent_window ( void  )
static

Definition at line 1092 of file rebar.c.

1093{
1094 HWND hwnd;
1095
1096 if (!register_parent_wnd_class()) return NULL;
1097
1098 hwnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW,
1102
1104 return hwnd;
1105}
static BOOL register_parent_wnd_class(void)
Definition: rebar.c:1074
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SM_CXSIZEFRAME
Definition: winuser.h:996
#define CW_USEDEFAULT
Definition: winuser.h:225
#define SW_SHOW
Definition: winuser.h:778
#define SM_CYCAPTION
Definition: winuser.h:966
#define SM_CYSIZEFRAME
Definition: winuser.h:998
int WINAPI GetSystemMetrics(_In_ int)

Referenced by START_TEST().

◆ create_rebar_control()

static HWND create_rebar_control ( void  )
static

Definition at line 84 of file rebar.c.

85{
86 HWND hwnd;
87
90 ok(hwnd != NULL, "Failed to create Rebar\n");
91
93
94 return hwnd;
95}
#define REBARCLASSNAMEA
Definition: commctrl.h:1464
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4318

Referenced by test_bandinfo(), test_colors(), test_layout(), test_notification(), and test_showband().

◆ expect_band_content_()

static void expect_band_content_ ( int  line,
HWND  hRebar,
UINT  uBand,
INT  fStyle,
COLORREF  clrFore,
COLORREF  clrBack,
LPCSTR  lpText,
int  iImage,
HWND  hwndChild,
INT  cxMinChild,
INT  cyMinChild,
INT  cx,
HBITMAP  hbmBack,
INT  wID,
INT  cyChild,
INT  cyMaxChild,
INT  cyIntegral,
INT  cxIdeal,
LPARAM  lParam,
UINT  cxHeader,
UINT  cxHeader_broken 
)
static

Definition at line 921 of file rebar.c.

926{
927 CHAR buf[MAX_PATH] = "abc";
929
930 memset(&rb, 0xdd, sizeof(rb));
935 rb.lpText = buf;
936 rb.cch = MAX_PATH;
937 ok(SendMessageA(hRebar, RB_GETBANDINFOA, uBand, (LPARAM)&rb), "RB_GETBANDINFOA failed from line %d\n", line);
938 expect_eq(line, rb.fStyle, fStyle, int, "%x");
939 expect_eq(line, rb.clrFore, clrFore, COLORREF, "%x");
940 expect_eq(line, rb.clrBack, clrBack, COLORREF, "%x");
941 expect_eq(line, strcmp(rb.lpText, lpText), 0, int, "%d");
942 expect_eq(line, rb.iImage, iImage, int, "%x");
943 expect_eq(line, rb.hwndChild, hwndChild, HWND, "%p");
944 expect_eq(line, rb.cxMinChild, cxMinChild, int, "%d");
945 expect_eq(line, rb.cyMinChild, cyMinChild, int, "%d");
946 expect_eq(line, rb.cx, cx, int, "%d");
947 expect_eq(line, rb.hbmBack, hbmBack, HBITMAP, "%p");
948 expect_eq(line, rb.wID, wID, int, "%d");
949 /* the values of cyChild, cyMaxChild and cyIntegral can't be read unless the band is RBBS_VARIABLEHEIGHT */
950 expect_eq(line, rb.cyChild, cyChild, int, "%x");
951 expect_eq(line, rb.cyMaxChild, cyMaxChild, int, "%x");
952 expect_eq(line, rb.cyIntegral, cyIntegral, int, "%x");
953 expect_eq(line, rb.cxIdeal, cxIdeal, int, "%d");
954 expect_eq(line, rb.lParam, lParam, LPARAM, "%ld");
955 ok(rb.cxHeader == cxHeader || rb.cxHeader == cxHeader + 1 || broken(rb.cxHeader == cxHeader_broken),
956 "expected %d for %d from line %d\n", cxHeader, rb.cxHeader, line);
957}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define broken(x)
Definition: atltest.h:178
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static HBITMAP
Definition: button.c:44
#define expect_eq(line, expr, value, type, format)
Definition: rebar.c:53
#define RBBIM_IMAGE
Definition: commctrl.h:1505
#define RBBIM_BACKGROUND
Definition: commctrl.h:1509
#define RBBIM_ID
Definition: commctrl.h:1510
#define RBBIM_LPARAM
Definition: commctrl.h:1512
#define RBBIM_COLORS
Definition: commctrl.h:1503
#define RBBIM_HEADERSIZE
Definition: commctrl.h:1513
#define memset(x, y, z)
Definition: compat.h:39
COLORREF clrBack
Definition: commctrl.h:1520
COLORREF clrFore
Definition: commctrl.h:1519
DWORD COLORREF
Definition: windef.h:300

◆ HIMAGELIST()

static HIMAGELIST ( WINAPI pImageList_LoadImageA)
static

◆ init_functions()

static void init_functions ( void  )
static

Definition at line 1151 of file rebar.c.

1152{
1153 HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
1154
1155#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
1158#undef X
1159}
HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi, LPCSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2164
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define X(f)

Referenced by START_TEST().

◆ init_system_font_height()

static void init_system_font_height ( void  )
static

Definition at line 73 of file rebar.c.

73 {
74 HDC hDC;
76
80
81 system_font_height = tm.tmHeight;
82}
static HDC hDC
Definition: 3dtext.c:33
static HDC
Definition: imagelist.c:88
static int system_font_height
Definition: rebar.c:39
Definition: time.h:68
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
Definition: text.c:200
BOOL WINAPI DeleteDC(_In_ HDC)

Referenced by START_TEST().

◆ is_font_installed()

static BOOL is_font_installed ( const char name)
static

Definition at line 61 of file rebar.c.

62{
63 HDC hdc = GetDC(0);
64 BOOL ret = FALSE;
65
67 ret = TRUE;
68
69 ReleaseDC(0, hdc);
70 return ret;
71}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
HDC hdc
Definition: main.c:9
static INT CALLBACK is_font_installed_proc(const LOGFONTA *elf, const TEXTMETRICA *ntm, DWORD type, LPARAM lParam)
Definition: rebar.c:56
int WINAPI EnumFontFamiliesA(_In_ HDC, _In_opt_ LPCSTR, _In_ FONTENUMPROCA, _In_ LPARAM)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by START_TEST().

◆ is_font_installed_proc()

static INT CALLBACK is_font_installed_proc ( const LOGFONTA elf,
const TEXTMETRICA ntm,
DWORD  type,
LPARAM  lParam 
)
static

Definition at line 56 of file rebar.c.

57{
58 return 0;
59}

Referenced by is_font_installed().

◆ parent_wndproc()

static LRESULT CALLBACK parent_wndproc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 132 of file rebar.c.

133{
134 switch (msg)
135 {
136 case WM_NOTIFY:
137 {
138 NMHDR *lpnm = (NMHDR *)lParam;
139 if (lpnm->code == RBN_HEIGHTCHANGE)
141 }
142 break;
143 case WM_MEASUREITEM:
145 break;
146 }
148}
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
static int g_parent_measureitem
Definition: rebar.c:130
#define RBN_HEIGHTCHANGE
Definition: commctrl.h:1628
#define WM_NOTIFY
Definition: richedit.h:61
UINT code
Definition: winuser.h:3162
HWND hwndFrom
Definition: winuser.h:3160
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define WM_MEASUREITEM
Definition: winuser.h:1649

Referenced by register_parent_wnd_class().

◆ rbsize_add_band()

static void rbsize_add_band ( rbsize_result_t rbsr,
int  left,
int  top,
int  right,
int  bottom,
DWORD  fStyle,
UINT  cx 
)
static

Definition at line 236 of file rebar.c.

237{
238 SetRect(&(rbsr->bands[rbsr->nBands].rc), left, top, right, bottom);
239 rbsr->bands[rbsr->nBands].fStyle = fStyle;
240 rbsr->bands[rbsr->nBands].cx = cx;
241 rbsr->nBands++;
242}
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
DWORD fStyle
Definition: rebar.c:204
rbband_result_t * bands
Definition: rebar.c:214
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

Referenced by rbsize_results_init().

◆ rbsize_add_row()

static void rbsize_add_row ( rbsize_result_t rbsr,
int  rowHeight 
)
static

Definition at line 231 of file rebar.c.

231 {
232 rbsr->cyRowHeights[rbsr->nRows] = rowHeight;
233 rbsr->nRows++;
234}
int * cyRowHeights
Definition: rebar.c:212

Referenced by rbsize_results_init().

◆ rbsize_init()

static rbsize_result_t rbsize_init ( int  cleft,
int  ctop,
int  cright,
int  cbottom,
int  cyBarHeight,
int  nRows,
int  nBands 
)
static

Definition at line 217 of file rebar.c.

218{
220
221 SetRect(&ret.rcClient, cleft, ctop, cright, cbottom);
222 ret.cyBarHeight = cyBarHeight;
223 ret.nRows = 0;
224 ret.cyRowHeights = heap_alloc_zero(nRows * sizeof(int));
225 ret.nBands = 0;
226 ret.bands = heap_alloc_zero(nBands * sizeof(*ret.bands));
227
228 return ret;
229}
int nRows
Definition: appswitch.c:56

Referenced by rbsize_results_init().

◆ rbsize_results_free()

static void rbsize_results_free ( void  )
static

Definition at line 432 of file rebar.c.

433{
434 int i;
435
436 for (i = 0; i < rbsize_results_num; i++) {
437 heap_free(rbsize_results[i].cyRowHeights);
438 heap_free(rbsize_results[i].bands);
439 }
442}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define rbsize_results_num
Definition: rebar.c:246

Referenced by test_layout().

◆ rbsize_results_init()

static void rbsize_results_init ( void  )
static

Definition at line 248 of file rebar.c.

249{
251
252 rbsize_results[0] = rbsize_init(0, 0, 672, 0, 0, 0, 0);
253
254 rbsize_results[1] = rbsize_init(0, 0, 672, 4, 4, 1, 1);
256 rbsize_add_band(&rbsize_results[1], 0, 0, 672, 4, 0x00, 200);
257
258 rbsize_results[2] = rbsize_init(0, 0, 672, 4, 4, 1, 2);
260 rbsize_add_band(&rbsize_results[2], 0, 0, 200, 4, 0x00, 200);
261 rbsize_add_band(&rbsize_results[2], 200, 0, 672, 4, 0x04, 200);
262
263 rbsize_results[3] = rbsize_init(0, 0, 672, 30, 30, 1, 3);
265 rbsize_add_band(&rbsize_results[3], 0, 0, 200, 30, 0x00, 200);
266 rbsize_add_band(&rbsize_results[3], 200, 0, 400, 30, 0x04, 200);
267 rbsize_add_band(&rbsize_results[3], 400, 0, 672, 30, 0x00, 200);
268
269 rbsize_results[4] = rbsize_init(0, 0, 672, 34, 34, 1, 4);
271 rbsize_add_band(&rbsize_results[4], 0, 0, 200, 34, 0x00, 200);
272 rbsize_add_band(&rbsize_results[4], 200, 0, 400, 34, 0x04, 200);
273 rbsize_add_band(&rbsize_results[4], 400, 0, 604, 34, 0x00, 200);
274 rbsize_add_band(&rbsize_results[4], 604, 0, 672, 34, 0x04, 68);
275
276 rbsize_results[5] = rbsize_init(0, 0, 672, 34, 34, 1, 4);
278 rbsize_add_band(&rbsize_results[5], 0, 0, 200, 34, 0x00, 200);
279 rbsize_add_band(&rbsize_results[5], 200, 0, 400, 34, 0x04, 200);
280 rbsize_add_band(&rbsize_results[5], 400, 0, 604, 34, 0x00, 200);
281 rbsize_add_band(&rbsize_results[5], 604, 0, 672, 34, 0x04, 68);
282
283 rbsize_results[6] = rbsize_init(0, 0, 672, 34, 34, 1, 4);
285 rbsize_add_band(&rbsize_results[6], 0, 0, 200, 34, 0x00, 200);
286 rbsize_add_band(&rbsize_results[6], 202, 0, 402, 34, 0x04, 200);
287 rbsize_add_band(&rbsize_results[6], 404, 0, 604, 34, 0x00, 200);
288 rbsize_add_band(&rbsize_results[6], 606, 0, 672, 34, 0x04, 66);
289
290 rbsize_results[7] = rbsize_init(0, 0, 672, 70, 70, 2, 5);
293 rbsize_add_band(&rbsize_results[7], 0, 0, 142, 34, 0x00, 200);
294 rbsize_add_band(&rbsize_results[7], 144, 0, 557, 34, 0x00, 200);
295 rbsize_add_band(&rbsize_results[7], 559, 0, 672, 34, 0x04, 200);
296 rbsize_add_band(&rbsize_results[7], 0, 36, 200, 70, 0x00, 200);
297 rbsize_add_band(&rbsize_results[7], 202, 36, 672, 70, 0x04, 66);
298
299 rbsize_results[8] = rbsize_init(0, 0, 672, 34, 34, 1, 5);
301 rbsize_add_band(&rbsize_results[8], 0, 0, 167, 34, 0x00, 200);
302 rbsize_add_band(&rbsize_results[8], 169, 0, 582, 34, 0x00, 200);
303 rbsize_add_band(&rbsize_results[8], 559, 0, 759, 34, 0x08, 200);
304 rbsize_add_band(&rbsize_results[8], 584, 0, 627, 34, 0x00, 200);
305 rbsize_add_band(&rbsize_results[8], 629, 0, 672, 34, 0x04, 66);
306
307 rbsize_results[9] = rbsize_init(0, 0, 672, 34, 34, 1, 4);
309 rbsize_add_band(&rbsize_results[9], 0, 0, 167, 34, 0x00, 200);
310 rbsize_add_band(&rbsize_results[9], 169, 0, 582, 34, 0x00, 200);
311 rbsize_add_band(&rbsize_results[9], 584, 0, 627, 34, 0x00, 200);
312 rbsize_add_band(&rbsize_results[9], 629, 0, 672, 34, 0x04, 66);
313
314 rbsize_results[10] = rbsize_init(0, 0, 672, 34, 34, 1, 3);
316 rbsize_add_band(&rbsize_results[10], 0, 0, 413, 34, 0x00, 200);
317 rbsize_add_band(&rbsize_results[10], 415, 0, 615, 34, 0x00, 200);
318 rbsize_add_band(&rbsize_results[10], 617, 0, 672, 34, 0x04, 66);
319
320 rbsize_results[11] = rbsize_init(0, 0, 672, 34, 34, 1, 2);
322 rbsize_add_band(&rbsize_results[11], 0, 0, 604, 34, 0x00, 200);
323 rbsize_add_band(&rbsize_results[11], 606, 0, 672, 34, 0x04, 66);
324
325 rbsize_results[12] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
328 rbsize_add_band(&rbsize_results[12], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
329 rbsize_add_band(&rbsize_results[12], 87 + string_width("ABC"), 0, 157 + string_width("ABC"), 4 + system_font_height, 0x00, 70);
330 rbsize_add_band(&rbsize_results[12], 157 + string_width("ABC"), 0, 397 + string_width("ABC"), 4 + system_font_height, 0x00, 240);
331 rbsize_add_band(&rbsize_results[12], 397 + string_width("ABC"), 0, 672, 4 + system_font_height, 0x00, 60);
332 rbsize_add_band(&rbsize_results[12], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
333
334 rbsize_results[13] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
337 rbsize_add_band(&rbsize_results[13], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
338 rbsize_add_band(&rbsize_results[13], 87 + string_width("ABC"), 0, 200 + string_width("ABC"), 4 + system_font_height, 0x00, 113);
339 rbsize_add_band(&rbsize_results[13], 200 + string_width("ABC"), 0, 397 + string_width("ABC"), 4 + system_font_height, 0x00, 197);
340 rbsize_add_band(&rbsize_results[13], 397 + string_width("ABC"), 0, 672, 4 + system_font_height, 0x00, 60);
341 rbsize_add_band(&rbsize_results[13], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
342
343 rbsize_results[14] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
346 rbsize_add_band(&rbsize_results[14], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
347 rbsize_add_band(&rbsize_results[14], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
348 rbsize_add_band(&rbsize_results[14], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 183);
349 rbsize_add_band(&rbsize_results[14], 595 - string_width("MMMMMMM"), 0, 672, 4 + system_font_height, 0x00, 77 + string_width("MMMMMMM"));
350 rbsize_add_band(&rbsize_results[14], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
351
352 rbsize_results[15] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
355 rbsize_add_band(&rbsize_results[15], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
356 rbsize_add_band(&rbsize_results[15], 87 + string_width("ABC"), 0, 140 + string_width("ABC"), 4 + system_font_height, 0x00, 53);
357 rbsize_add_band(&rbsize_results[15], 140 + string_width("ABC"), 0, 595 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 455 - string_width("MMMMMMM") - string_width("ABC"));
358 rbsize_add_band(&rbsize_results[15], 595 - string_width("MMMMMMM"), 0, 672, 4 + system_font_height, 0x00, 77 + string_width("MMMMMMM"));
359 rbsize_add_band(&rbsize_results[15], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
360
361 rbsize_results[16] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
364 rbsize_add_band(&rbsize_results[16], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
365 rbsize_add_band(&rbsize_results[16], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
366 rbsize_add_band(&rbsize_results[16], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 183);
367 rbsize_add_band(&rbsize_results[16], 595 - string_width("MMMMMMM"), 0, 672, 4 + system_font_height, 0x00, 77 + string_width("MMMMMMM"));
368 rbsize_add_band(&rbsize_results[16], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
369
370 rbsize_results[17] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
373 rbsize_add_band(&rbsize_results[17], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
374 rbsize_add_band(&rbsize_results[17], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
375 rbsize_add_band(&rbsize_results[17], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 183);
376 rbsize_add_band(&rbsize_results[17], 595 - string_width("MMMMMMM"), 0, 672, 4 + system_font_height, 0x00, 77 + string_width("MMMMMMM"));
377 rbsize_add_band(&rbsize_results[17], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
378
379 rbsize_results[18] = rbsize_init(0, 0, 672, 56, 56, 2, 5);
382 rbsize_add_band(&rbsize_results[18], 0, 0, 87 + string_width("ABC"), 28, 0x00, 40);
383 rbsize_add_band(&rbsize_results[18], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 28, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
384 rbsize_add_band(&rbsize_results[18], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 28, 0x00, 183);
385 rbsize_add_band(&rbsize_results[18], 595 - string_width("MMMMMMM"), 0, 672, 28, 0x00, 77 + string_width("MMMMMMM"));
386 rbsize_add_band(&rbsize_results[18], 0, 28, 672, 56, 0x00, 200);
387
388 rbsize_results[19] = rbsize_init(0, 0, 672, 8 + 2*system_font_height, 40, 2, 5);
391 rbsize_add_band(&rbsize_results[19], 0, 0, 87 + string_width("ABC"), 4 + system_font_height, 0x00, 40);
392 rbsize_add_band(&rbsize_results[19], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
393 rbsize_add_band(&rbsize_results[19], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 4 + system_font_height, 0x00, 183);
394 rbsize_add_band(&rbsize_results[19], 595 - string_width("MMMMMMM"), 0, 672, 4 + system_font_height, 0x00, 77 + string_width("MMMMMMM"));
395 rbsize_add_band(&rbsize_results[19], 0, 4 + system_font_height, 672, 8 + 2*system_font_height, 0x00, 200);
396
397 rbsize_results[20] = rbsize_init(0, 0, 672, 56, 56, 2, 5);
400 rbsize_add_band(&rbsize_results[20], 0, 0, 87 + string_width("ABC"), 28, 0x00, 40);
401 rbsize_add_band(&rbsize_results[20], 87 + string_width("ABC"), 0, 412 - string_width("MMMMMMM"), 28, 0x00, 325 - string_width("ABC") - string_width("MMMMMMM"));
402 rbsize_add_band(&rbsize_results[20], 412 - string_width("MMMMMMM"), 0, 595 - string_width("MMMMMMM"), 28, 0x00, 183);
403 rbsize_add_band(&rbsize_results[20], 595 - string_width("MMMMMMM"), 0, 672, 28, 0x00, 77 + string_width("MMMMMMM"));
404 rbsize_add_band(&rbsize_results[20], 0, 28, 672, 56, 0x00, 200);
405
406 rbsize_results[21] = rbsize_init(0, 0, 672, 0, 0, 0, 0);
407
408 rbsize_results[22] = rbsize_init(0, 0, 672, 65, 56, 1, 3);
410 rbsize_add_band(&rbsize_results[22], 0, 0, 90, 65, 0x40, 90);
411 rbsize_add_band(&rbsize_results[22], 90, 0, 180, 65, 0x40, 90);
412 rbsize_add_band(&rbsize_results[22], 180, 0, 672, 65, 0x40, 90);
413
414 rbsize_results[23] = rbsize_init(0, 0, 0, 226, 0, 0, 0);
415
416 rbsize_results[24] = rbsize_init(0, 0, 65, 226, 65, 1, 1);
418 rbsize_add_band(&rbsize_results[24], 0, 0, 226, 65, 0x40, 90);
419
420 rbsize_results[25] = rbsize_init(0, 0, 65, 226, 65, 1, 2);
422 rbsize_add_band(&rbsize_results[25], 0, 0, 90, 65, 0x40, 90);
423 rbsize_add_band(&rbsize_results[25], 90, 0, 226, 65, 0x40, 90);
424
425 rbsize_results[26] = rbsize_init(0, 0, 65, 226, 65, 1, 3);
427 rbsize_add_band(&rbsize_results[26], 0, 0, 90, 65, 0x40, 90);
428 rbsize_add_band(&rbsize_results[26], 90, 0, 163, 65, 0x40, 90);
429 rbsize_add_band(&rbsize_results[26], 163, 0, 226, 65, 0x40, 90);
430}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static rbsize_result_t rbsize_init(int cleft, int ctop, int cright, int cbottom, int cyBarHeight, int nRows, int nBands)
Definition: rebar.c:217
static void rbsize_add_band(rbsize_result_t *rbsr, int left, int top, int right, int bottom, DWORD fStyle, UINT cx)
Definition: rebar.c:236
static int string_width(const CHAR *s)
Definition: rebar.c:191
static void rbsize_add_row(rbsize_result_t *rbsr, int rowHeight)
Definition: rebar.c:231

Referenced by test_layout().

◆ register_parent_wnd_class()

static BOOL register_parent_wnd_class ( void  )
static

Definition at line 1074 of file rebar.c.

1075{
1076 WNDCLASSA wc;
1077
1079 wc.cbClsExtra = 0;
1080 wc.cbWndExtra = 0;
1082 wc.hIcon = NULL;
1085 wc.lpszMenuName = NULL;
1086 wc.lpszClassName = "MyTestWnd";
1088
1089 return RegisterClassA(&wc);
1090}
static LRESULT CALLBACK parent_wndproc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: rebar.c:132
HBRUSH hbrBackground
Definition: winuser.h:3173
HICON hIcon
Definition: winuser.h:3171
HINSTANCE hInstance
Definition: winuser.h:3170
HCURSOR hCursor
Definition: winuser.h:3172
int cbWndExtra
Definition: winuser.h:3169
UINT style
Definition: winuser.h:3166
LPCSTR lpszMenuName
Definition: winuser.h:3174
LPCSTR lpszClassName
Definition: winuser.h:3175
WNDPROC lpfnWndProc
Definition: winuser.h:3167
int cbClsExtra
Definition: winuser.h:3168
#define CS_VREDRAW
Definition: winuser.h:658
#define COLOR_WINDOW
Definition: winuser.h:921
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define CS_HREDRAW
Definition: winuser.h:653
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define IDC_IBEAM
Definition: winuser.h:688
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2142
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by create_parent_window().

◆ START_TEST()

START_TEST ( rebar  )

Definition at line 1161 of file rebar.c.

1162{
1163 MSG msg;
1164
1167
1169
1170 test_bandinfo();
1171 test_colors();
1172 test_showband();
1174
1175 if(!is_font_installed("System") || !is_font_installed("Tahoma"))
1176 {
1177 skip("Missing System or Tahoma font\n");
1178 goto out;
1179 }
1180
1181 test_layout();
1182 test_resize();
1183
1184out:
1185 PostQuitMessage(0);
1186 while(GetMessageA(&msg,0,0,0)) {
1189 }
1191}
#define skip(...)
Definition: atltest.h:64
static HWND create_parent_window(void)
Definition: rebar.c:1092
static void test_bandinfo(void)
Definition: rebar.c:966
static void test_layout(void)
Definition: rebar.c:496
static void test_showband(void)
Definition: rebar.c:1107
static void test_colors(void)
Definition: rebar.c:1026
static void init_system_font_height(void)
Definition: rebar.c:73
static void test_notification(void)
Definition: rebar.c:1137
static void test_resize(void)
Definition: rebar.c:868
static void init_functions(void)
Definition: rebar.c:1151
static BOOL is_font_installed(const char *name)
Definition: rebar.c:61
static FILE * out
Definition: regtests2xml.c:44
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)

◆ string_width()

static int string_width ( const CHAR s)
static

Definition at line 191 of file rebar.c.

191 {
192 SIZE sz;
193 HDC hdc;
194
197 DeleteDC(hdc);
198
199 return sz.cx;
200}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
GLdouble s
Definition: gl.h:2039
LONG cx
Definition: kdterminal.h:27
BOOL WINAPI GetTextExtentPoint32A(_In_ HDC hdc, _In_reads_(c) LPCSTR lpString, _In_ int c, _Out_ LPSIZE psizl)

Referenced by rbsize_results_init().

◆ test_bandinfo()

static void test_bandinfo ( void  )
static

Definition at line 966 of file rebar.c.

967{
969 CHAR szABC[] = "ABC";
970 CHAR szABCD[] = "ABCD";
971 HWND hRebar;
972
973 hRebar = create_rebar_control();
975 rb.fMask = 0;
976 if (!SendMessageA(hRebar, RB_INSERTBANDA, 0, (LPARAM)&rb))
977 {
978 win_skip( "V6 info not supported\n" );
979 DestroyWindow(hRebar);
980 return;
981 }
982 expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 0, 0, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 0, -1);
983
984 rb.fMask = RBBIM_CHILDSIZE;
985 rb.cxMinChild = 15;
986 rb.cyMinChild = 20;
987 rb.cyChild = 30;
988 rb.cyMaxChild = 20;
989 rb.cyIntegral = 10;
990 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
991 expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 0, -1);
992
993 rb.fMask = RBBIM_TEXT;
994 rb.lpText = szABC;
995 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
996 expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 3 + 2*system_font_height, -1);
997
998 rb.cbSize = REBARBANDINFOA_V6_SIZE;
999 rb.fMask = 0;
1000 ok(SendMessageA(hRebar, RB_INSERTBANDA, 1, (LPARAM)&rb), "RB_INSERTBANDA failed\n");
1001 expect_band_content(hRebar, 1, 0, 0, GetSysColor(COLOR_3DFACE), "", -1, NULL, 0, 0, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 9, -1);
1002 expect_band_content(hRebar, 0, 0, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 8 + 2*system_font_height, -1);
1003
1004 rb.fMask = RBBIM_HEADERSIZE;
1005 rb.cxHeader = 50;
1006 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
1007 expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 50, -1);
1008
1009 rb.cxHeader = 5;
1010 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
1011 expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 5, -1);
1012
1013 rb.fMask = RBBIM_TEXT;
1014 rb.lpText = szABCD;
1015 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
1016 expect_band_content(hRebar, 0, 0x40000000, 0, GetSysColor(COLOR_3DFACE), "ABCD", -1, NULL, 15, 20, 0, NULL, 0, 0xdddddddd, 0xdddddddd, 0xdddddddd, 0, 0, 5, -1);
1017 rb.fMask = RBBIM_STYLE | RBBIM_TEXT;
1018 rb.fStyle = RBBS_VARIABLEHEIGHT;
1019 rb.lpText = szABC;
1020 ok(SendMessageA(hRebar, RB_SETBANDINFOA, 0, (LPARAM)&rb), "RB_SETBANDINFOA failed\n");
1021 expect_band_content(hRebar, 0, RBBS_VARIABLEHEIGHT, 0, GetSysColor(COLOR_3DFACE), "ABC", -1, NULL, 15, 20, 0, NULL, 0, 20, 0x7fffffff, 0, 0, 0, 8 + 2*system_font_height, 5);
1022
1023 DestroyWindow(hRebar);
1024}
static HWND create_rebar_control(void)
Definition: rebar.c:84
#define expect_band_content(hRebar, uBand, fStyle, clrFore, clrBack, lpText, iImage, hwndChild, cxMinChild, cyMinChild, cx, hbmBack, wID, cyChild, cyMaxChild, cyIntegral, cxIdeal, lParam, cxHeader, cxHeader_broken)
Definition: rebar.c:959
#define RB_SETBANDINFOA
Definition: commctrl.h:1579
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1495
#define win_skip
Definition: test.h:163
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_3DFACE
Definition: winuser.h:932

Referenced by START_TEST().

◆ test_colors()

static void test_colors ( void  )
static

Definition at line 1026 of file rebar.c.

1027{
1029 COLORREF clr;
1030 BOOL ret;
1031 HWND hRebar;
1032 REBARBANDINFOA bi;
1033
1034 hRebar = create_rebar_control();
1035
1036 /* test default colors */
1037 clr = SendMessageA(hRebar, RB_GETTEXTCOLOR, 0, 0);
1038 compare(clr, CLR_NONE, "%x");
1039 clr = SendMessageA(hRebar, RB_GETBKCOLOR, 0, 0);
1040 compare(clr, CLR_NONE, "%x");
1041
1042 scheme.dwSize = sizeof(scheme);
1043 scheme.clrBtnHighlight = 0;
1044 scheme.clrBtnShadow = 0;
1046 if (ret)
1047 {
1048 compare(scheme.clrBtnHighlight, CLR_DEFAULT, "%x");
1049 compare(scheme.clrBtnShadow, CLR_DEFAULT, "%x");
1050 }
1051 else
1052 skip("RB_GETCOLORSCHEME not supported\n");
1053
1054 /* check default band colors */
1055 add_band_w(hRebar, "", 0, 10, 10);
1057 bi.fMask = RBBIM_COLORS;
1058 bi.clrFore = bi.clrBack = 0xc0ffe;
1059 ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi);
1060 ok(ret, "RB_GETBANDINFOA failed\n");
1061 compare(bi.clrFore, RGB(0, 0, 0), "%x");
1063
1064 SendMessageA(hRebar, RB_SETTEXTCOLOR, 0, RGB(255, 0, 0));
1065 bi.clrFore = bi.clrBack = 0xc0ffe;
1066 ret = SendMessageA(hRebar, RB_GETBANDINFOA, 0, (LPARAM)&bi);
1067 ok(ret, "RB_GETBANDINFOA failed\n");
1068 compare(bi.clrFore, RGB(0, 0, 0), "%x");
1069
1070 DestroyWindow(hRebar);
1071}
#define RGB(r, g, b)
Definition: precomp.h:71
#define compare(val, exp, format)
Definition: rebar.c:51
static void add_band_w(HWND hRebar, LPCSTR lpszText, int cxMinChild, int cx, int cxIdeal)
Definition: rebar.c:478
#define RB_SETTEXTCOLOR
Definition: commctrl.h:1593
#define RB_GETTEXTCOLOR
Definition: commctrl.h:1594
#define CLR_NONE
Definition: commctrl.h:319
#define RB_GETCOLORSCHEME
Definition: commctrl.h:1600
#define CLR_DEFAULT
Definition: commctrl.h:320
#define RB_GETBKCOLOR
Definition: commctrl.h:1592
DWORD scheme

Referenced by START_TEST().

◆ test_layout()

static void test_layout ( void  )
static

Definition at line 496 of file rebar.c.

497{
498 HWND hRebar;
499 REBARBANDINFOA rbi;
501 REBARINFO ri;
502 int count;
503
505
506 hRebar = create_rebar_control();
507 check_sizes();
510 rbi.cx = 200;
511 rbi.cxMinChild = 100;
512 rbi.cyMinChild = 30;
513 rbi.hwndChild = NULL;
514 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
515 check_sizes();
516
517 rbi.fMask |= RBBIM_STYLE;
519 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
520 check_sizes();
521
522 rbi.fStyle = 0;
523 rbi.cx = 200;
524 rbi.cxMinChild = 30;
525 rbi.cyMinChild = 30;
526 rbi.hwndChild = build_toolbar(0, hRebar);
527 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
528 check_sizes();
529
531 rbi.cx = 68;
532 rbi.hwndChild = build_toolbar(0, hRebar);
533 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
534 check_sizes();
535
537 check_sizes(); /* a style change won't start a relayout */
538 rbi.fMask = RBBIM_SIZE;
539 rbi.cx = 66;
540 SendMessageA(hRebar, RB_SETBANDINFOA, 3, (LPARAM)&rbi);
541 check_sizes(); /* here it will be relayouted */
542
543 /* this will force a new row */
545 rbi.cx = 200;
546 rbi.cxMinChild = 400;
547 rbi.cyMinChild = 30;
548 rbi.hwndChild = build_toolbar(0, hRebar);
549 SendMessageA(hRebar, RB_INSERTBANDA, 1, (LPARAM)&rbi);
550 check_sizes();
551
552 rbi.fMask = RBBIM_STYLE;
553 rbi.fStyle = RBBS_HIDDEN;
554 SendMessageA(hRebar, RB_SETBANDINFOA, 2, (LPARAM)&rbi);
555 check_sizes();
556
557 SendMessageA(hRebar, RB_DELETEBAND, 2, 0);
558 check_sizes();
559 SendMessageA(hRebar, RB_DELETEBAND, 0, 0);
560 check_sizes();
561 SendMessageA(hRebar, RB_DELETEBAND, 1, 0);
562 check_sizes();
563
564 DestroyWindow(hRebar);
565
566 hRebar = create_rebar_control();
567 add_band_w(hRebar, "ABC", 70, 40, 100);
568 add_band_w(hRebar, NULL, 40, 70, 100);
569 add_band_w(hRebar, NULL, 170, 240, 100);
570 add_band_w(hRebar, "MMMMMMM", 60, 60, 100);
571 add_band_w(hRebar, NULL, 200, 200, 100);
572 check_sizes();
573 SendMessageA(hRebar, RB_MAXIMIZEBAND, 1, TRUE);
574 check_sizes();
575 SendMessageA(hRebar, RB_MAXIMIZEBAND, 1, TRUE);
576 check_sizes();
578 check_sizes();
579 SendMessageA(hRebar, RB_MINIMIZEBAND, 2, 0);
580 check_sizes();
581 SendMessageA(hRebar, RB_MINIMIZEBAND, 0, 0);
582 check_sizes();
583
584 /* an image will increase the band height */
585 himl = pImageList_LoadImageA(GetModuleHandleA("comctl32"), MAKEINTRESOURCEA(121), 24, 2,
587 ri.cbSize = sizeof(ri);
589 ri.himl = himl;
590 ok(SendMessageA(hRebar, RB_SETBARINFO, 0, (LPARAM)&ri), "RB_SETBARINFO failed\n");
591 rbi.fMask = RBBIM_IMAGE;
592 rbi.iImage = 1;
593 SendMessageA(hRebar, RB_SETBANDINFOA, 1, (LPARAM)&rbi);
594 check_sizes();
595
596 /* after removing it everything is back to normal*/
597 rbi.iImage = -1;
598 SendMessageA(hRebar, RB_SETBANDINFOA, 1, (LPARAM)&rbi);
599 check_sizes();
600
601 /* Only -1 means that the image is not present. Other invalid values increase the height */
602 rbi.iImage = -2;
603 SendMessageA(hRebar, RB_SETBANDINFOA, 1, (LPARAM)&rbi);
604 check_sizes();
605
606 DestroyWindow(hRebar);
607
608 /* VARHEIGHT resizing test on a horizontal rebar */
609 hRebar = create_rebar_control();
611 check_sizes();
614 rbi.cxMinChild = 50;
615 rbi.cyMinChild = 10;
616 rbi.cyIntegral = 11;
617 rbi.cyChild = 70;
618 rbi.cyMaxChild = 200;
619 rbi.cx = 90;
620 rbi.hwndChild = build_toolbar(0, hRebar);
621 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
622
623 rbi.cyChild = 50;
624 rbi.hwndChild = build_toolbar(0, hRebar);
625 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
626
627 rbi.cyMinChild = 40;
628 rbi.cyChild = 50;
629 rbi.cyIntegral = 5;
630 rbi.hwndChild = build_toolbar(0, hRebar);
631 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
632 check_sizes();
633
634 DestroyWindow(hRebar);
635
636 /* VARHEIGHT resizing on a vertical rebar */
637 hRebar = create_rebar_control();
639 check_sizes();
642 rbi.cxMinChild = 50;
643 rbi.cyMinChild = 10;
644 rbi.cyIntegral = 11;
645 rbi.cyChild = 70;
646 rbi.cyMaxChild = 90;
647 rbi.cx = 90;
648 rbi.hwndChild = build_toolbar(0, hRebar);
649 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
650 check_sizes();
651
652 rbi.cyChild = 50;
653 rbi.hwndChild = build_toolbar(0, hRebar);
654 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
655 check_sizes();
656
657 rbi.cyMinChild = 40;
658 rbi.cyChild = 50;
659 rbi.cyIntegral = 5;
660 rbi.hwndChild = build_toolbar(0, hRebar);
661 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
662 check_sizes();
663
664 DestroyWindow(hRebar);
665 pImageList_Destroy(himl);
666
667 /* One hidden band. */
668 hRebar = create_rebar_control();
669
672 rbi.fStyle = RBBS_HIDDEN;
673 rbi.cx = 200;
674 rbi.cxMinChild = 100;
675 rbi.cyMinChild = 30;
676 rbi.hwndChild = NULL;
677
678 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
679 count = SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0);
680 ok(!count, "Unexpected row count %d.\n", count);
681
682 DestroyWindow(hRebar);
683
685}
HIMAGELIST himl
#define check_sizes()
Definition: rebar.c:474
static void rbsize_results_init(void)
Definition: rebar.c:248
static void rbsize_results_free(void)
Definition: rebar.c:432
#define RB_DELETEBAND
Definition: commctrl.h:1576
#define RBS_BANDBORDERS
Definition: commctrl.h:1472
#define RB_MINIMIZEBAND
Definition: commctrl.h:1614
#define RB_MAXIMIZEBAND
Definition: commctrl.h:1615
#define RBIM_IMAGELIST
Definition: commctrl.h:1468
#define RBS_AUTOSIZE
Definition: commctrl.h:1475
#define CCS_VERT
Definition: commctrl.h:2254
#define RBBS_CHILDEDGE
Definition: commctrl.h:1491
#define RB_SETBARINFO
Definition: commctrl.h:1578
HIMAGELIST himl
Definition: commctrl.h:1483
#define IMAGE_BITMAP
Definition: winuser.h:211
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define LR_DEFAULTCOLOR
Definition: winuser.h:1090
#define GWL_STYLE
Definition: winuser.h:855

Referenced by START_TEST().

◆ test_notification()

static void test_notification ( void  )
static

Definition at line 1137 of file rebar.c.

1138{
1140 HWND rebar;
1141
1142 rebar = create_rebar_control();
1143
1145 SendMessageA(rebar, WM_MEASUREITEM, 0, (LPARAM)&mis);
1146 ok(g_parent_measureitem == 1, "got %d\n", g_parent_measureitem);
1147
1148 DestroyWindow(rebar);
1149}

Referenced by START_TEST().

◆ test_resize()

static void test_resize ( void  )
static

Definition at line 868 of file rebar.c.

869{
874
875 const int styles_count = ARRAY_SIZE(dwStyles);
876 int i;
877
878 for (i = 0; i < styles_count; i++)
879 {
880 HWND hRebar;
881
882 comment("style %08x", dwStyles[i]);
883 SetRect(&height_change_notify_rect, -1, -1, -1, -1);
884 hRebar = CreateWindowA(REBARCLASSNAMEA, "A", dwStyles[i] | WS_CHILD | WS_VISIBLE, 10, 5, 500, 15, hMainWnd, NULL, GetModuleHandleA(NULL), 0);
885 check_client();
886 add_band_w(hRebar, NULL, 70, 100, 0);
887 if (dwStyles[i] & CCS_NOPARENTALIGN) /* the window drifts downward for CCS_NOPARENTALIGN without CCS_NODIVIDER */
888 check_client();
889 add_band_w(hRebar, NULL, 70, 100, 0);
890 check_client();
891 MoveWindow(hRebar, 10, 10, 100, 100, TRUE);
892 check_client();
893 MoveWindow(hRebar, 0, 0, 0, 0, TRUE);
894 check_client();
895 /* try to fool the rebar by sending invalid width/height - won't work */
896 if (dwStyles[i] & (CCS_NORESIZE | CCS_NOPARENTALIGN))
897 {
899 pos.hwnd = hRebar;
900 pos.hwndInsertAfter = NULL;
901 pos.cx = 500;
902 pos.cy = 500;
903 pos.x = 10;
904 pos.y = 10;
905 pos.flags = 0;
908 check_client();
909 SendMessageA(hRebar, WM_SIZE, SIZE_RESTORED, MAKELONG(500, 500));
910 check_client();
911 }
912 SendMessageA(hRebar, RB_DELETEBAND, 0, 0);
913 check_client();
914 SendMessageA(hRebar, RB_DELETEBAND, 0, 0);
915 MoveWindow(hRebar, 0, 0, 100, 100, TRUE);
916 check_client();
917 DestroyWindow(hRebar);
918 }
919}
unsigned long DWORD
Definition: ntddk_ex.h:95
#define comment(fmt, arg1)
Definition: rebar.c:843
#define check_client()
Definition: rebar.c:844
#define WS_BORDER
Definition: pedump.c:625
#define CCS_BOTTOM
Definition: commctrl.h:2249
#define CCS_RIGHT
Definition: commctrl.h:2256
#define CCS_TOP
Definition: commctrl.h:2247
#define CCS_NOMOVEY
Definition: commctrl.h:2248
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1664
#define WM_SIZE
Definition: winuser.h:1614
#define SIZE_RESTORED
Definition: winuser.h:2508
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1665
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)

Referenced by START_TEST().

◆ test_showband()

static void test_showband ( void  )
static

Definition at line 1107 of file rebar.c.

1108{
1109 HWND hRebar;
1110 REBARBANDINFOA rbi;
1111 BOOL ret;
1112
1113 hRebar = create_rebar_control();
1114
1115 /* no bands */
1116 ret = SendMessageA(hRebar, RB_SHOWBAND, 0, TRUE);
1117 ok(ret == FALSE, "got %d\n", ret);
1118
1121 rbi.cx = 200;
1122 rbi.cxMinChild = 100;
1123 rbi.cyMinChild = 30;
1124 rbi.hwndChild = NULL;
1125 SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
1126
1127 /* index out of range */
1128 ret = SendMessageA(hRebar, RB_SHOWBAND, 1, TRUE);
1129 ok(ret == FALSE, "got %d\n", ret);
1130
1131 ret = SendMessageA(hRebar, RB_SHOWBAND, 0, TRUE);
1132 ok(ret == TRUE, "got %d\n", ret);
1133
1134 DestroyWindow(hRebar);
1135}
#define RB_SHOWBAND
Definition: commctrl.h:1618

Referenced by START_TEST().

Variable Documentation

◆ COLORREF

Definition at line 35 of file rebar.c.

◆ g_parent_measureitem

int g_parent_measureitem
static

Definition at line 130 of file rebar.c.

Referenced by parent_wndproc(), and test_notification().

◆ height_change_notify_rect

RECT height_change_notify_rect
static

Definition at line 37 of file rebar.c.

Referenced by parent_wndproc(), and test_resize().

◆ hMainWnd

HWND hMainWnd
static

Definition at line 38 of file rebar.c.

Referenced by create_rebar_control(), START_TEST(), and test_resize().

◆ int

int

Definition at line 35 of file rebar.c.

◆ LPCSTR

Definition at line 35 of file rebar.c.

◆ rbsize_numtests

int rbsize_numtests = 0
static

Definition at line 444 of file rebar.c.

◆ rbsize_results

rbsize_result_t* rbsize_results
static

Definition at line 244 of file rebar.c.

Referenced by rbsize_results_free(), and rbsize_results_init().

◆ resize_numtests

DWORD resize_numtests = 0
static

Definition at line 841 of file rebar.c.

◆ resize_results

const rbresize_test_result_t resize_results[]
static

Definition at line 720 of file rebar.c.

◆ system_font_height

int system_font_height ( void  )
static

Definition at line 39 of file rebar.c.

Referenced by init_system_font_height(), rbsize_results_init(), and test_bandinfo().

◆ UINT

Definition at line 35 of file rebar.c.