ReactOS  0.4.14-dev-52-g6116262
buttonvistest.cpp File Reference
#include <windows.h>
#include <uxtheme.h>
#include <stdlib.h>
#include <tchar.h>
#include "resource.h"
Include dependency graph for buttonvistest.cpp:

Go to the source code of this file.

Macros

#define TOP_MARGIN   50
 
#define LEFT_MARGIN   160
 
#define X_GAP   10
 
#define Y_GAP   10
 
#define Y_HEIGHT   40
 
#define X_WIDTH   150
 

Functions

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
 
static void RegisterMyClass (HINSTANCE hInst)
 
static HWND CreateWnd (HWND hWnd, LPCWSTR Class, LPCWSTR Text, LONG style, int i, int j)
 
static HWND CreateBtn (HWND hWnd, LPCWSTR Text, LONG style, int i, int j)
 
static void CreateButtonSet (HWND hwndParent, HWND *ahwnd, int i, int j, DWORD style)
 
int WINAPI wWinMain (_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
 
static VOID OnScroll (HWND hwnd, INT nBar, WORD sbCode)
 

Variables

HICON hico
 
HBITMAP hbmp
 
HIMAGELIST himl
 
POINT scPos
 
HBRUSH hbrNULL
 
HBRUSH hbrRed
 
HBRUSH hbrGreen
 
HBRUSH hbrBlue
 
HBRUSH hbrCyan
 
HBRUSH hbrYellow
 
HBRUSH hbrCtlColorStatic
 
HBRUSH hbrCtlColorBtn
 
HBRUSH hbrPrintClientClear
 
HBRUSH hbrErase
 
BOOL bSkipErase
 
BOOL bSkipPaint
 

Macro Definition Documentation

◆ LEFT_MARGIN

#define LEFT_MARGIN   160

Definition at line 51 of file buttonvistest.cpp.

◆ TOP_MARGIN

#define TOP_MARGIN   50

Definition at line 50 of file buttonvistest.cpp.

◆ X_GAP

#define X_GAP   10

Definition at line 52 of file buttonvistest.cpp.

◆ X_WIDTH

#define X_WIDTH   150

Definition at line 55 of file buttonvistest.cpp.

◆ Y_GAP

#define Y_GAP   10

Definition at line 53 of file buttonvistest.cpp.

◆ Y_HEIGHT

#define Y_HEIGHT   40

Definition at line 54 of file buttonvistest.cpp.

Function Documentation

◆ CreateBtn()

static HWND CreateBtn ( HWND  hWnd,
LPCWSTR  Text,
LONG  style,
int  i,
int  j 
)
static

Definition at line 69 of file buttonvistest.cpp.

70 {
71  WCHAR buffer[100];
72  SIZE s;
73 
74  HWND ret = CreateWnd(hWnd, L"Button", Text, style, i, j);
76  {
77  swprintf(buffer, L"expected 0x%x got 0x%x", (style | WS_CHILD | WS_VISIBLE), GetWindowLongW(ret, GWL_STYLE));
78  MessageBox(0, buffer, L"error", MB_OK);
79  }
80 
82  {
83  swprintf(buffer, L"%s (%d, %d)", Text, s.cx, s.cy);
85  }
86  return ret;
87 }
HWND hWnd
Definition: settings.c:17
GLuint buffer
Definition: glext.h:5915
#define WS_CHILD
Definition: pedump.c:617
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
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_SETTEXT
Definition: winuser.h:1599
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 GLint GLint j
Definition: glfuncs.h:250
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
int ret
static const WCHAR L[]
Definition: oid.c:1250
GLdouble s
Definition: gl.h:2039
#define MessageBox
Definition: winuser.h:5723
#define GWL_STYLE
Definition: winuser.h:846
static HWND CreateWnd(HWND hWnd, LPCWSTR Class, LPCWSTR Text, LONG style, int i, int j)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define MB_OK
Definition: winuser.h:784
#define BCM_GETIDEALSIZE
Definition: commctrl.h:4611
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
char * Text
Definition: combotst.c:136

Referenced by CreateButtonSet().

◆ CreateButtonSet()

static void CreateButtonSet ( HWND  hwndParent,
HWND ahwnd,
int  i,
int  j,
DWORD  style 
)
static

Definition at line 89 of file buttonvistest.cpp.

90 {
91  ahwnd[0] = CreateBtn(hwndParent, L"TestButton", style, i, j + 0);
92  ahwnd[1] = CreateBtn(hwndParent, L"TestButton1", style, i, j + 1);
93  ahwnd[2] = CreateBtn(hwndParent, L"TestButton2", style, i, j + 2);
94  ahwnd[3] = CreateBtn(hwndParent, L"TestButton3", style | BS_BITMAP, i, j + 3);
95  ahwnd[4] = CreateBtn(hwndParent, L"TestButton4", style | BS_ICON, i, j + 4);
96 
99 
102 }
static HWND CreateBtn(HWND hWnd, LPCWSTR Text, LONG style, int i, int j)
#define IMAGE_ICON
Definition: winuser.h:212
#define BM_SETIMAGE
Definition: winuser.h:1904
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 HWND hwndParent
Definition: cryptui.c:300
LONG_PTR LPARAM
Definition: windef.h:208
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 GLint GLint j
Definition: glfuncs.h:250
HBITMAP hbmp
HICON hico
#define BS_ICON
Definition: winuser.h:264
static const WCHAR L[]
Definition: oid.c:1250
#define BS_BITMAP
Definition: winuser.h:258
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IMAGE_BITMAP
Definition: winuser.h:211
Arabic default style
Definition: afstyles.h:93

Referenced by wWinMain().

◆ CreateWnd()

static HWND CreateWnd ( HWND  hWnd,
LPCWSTR  Class,
LPCWSTR  Text,
LONG  style,
int  i,
int  j 
)
static

Definition at line 57 of file buttonvistest.cpp.

58 {
59  return CreateWindowW(Class,
60  Text,
62  LEFT_MARGIN + (X_GAP + X_WIDTH) * i,
63  TOP_MARGIN + ((Y_GAP + Y_HEIGHT) *j),
64  X_WIDTH,
65  Y_HEIGHT,
66  hWnd, NULL, NULL, NULL);
67 }
#define Y_GAP
#define TOP_MARGIN
HWND hWnd
Definition: settings.c:17
#define WS_CHILD
Definition: pedump.c:617
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
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
#define X_WIDTH
smooth NULL
Definition: ftsmooth.c:416
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 GLint GLint j
Definition: glfuncs.h:250
#define Y_HEIGHT
#define LEFT_MARGIN
#define X_GAP
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
char * Text
Definition: combotst.c:136

Referenced by CreateBtn(), and wWinMain().

◆ OnScroll()

static VOID OnScroll ( HWND  hwnd,
INT  nBar,
WORD  sbCode 
)
static

Definition at line 232 of file buttonvistest.cpp.

233 {
234  RECT rect;
235 
236  SCROLLINFO sInfo;
237  INT oldPos, Maximum;
238  PLONG pOriginXY;
239 
240  //ASSERT(nBar == SB_HORZ || nBar == SB_VERT);
241 
243 
244  if (nBar == SB_HORZ)
245  {
246  Maximum =1000;//pData->cxMin - (rect.right-rect.left) /* pData->cxOld */;
247  pOriginXY = &scPos.x;
248  }
249  else // if (nBar == SB_VERT)
250  {
251  Maximum = 1000;//pData->cyMin - (rect.bottom-rect.top) /* pData->cyOld */;
252  pOriginXY = &scPos.y;
253  }
254 
255  /* Set scrollbar sizes */
256  sInfo.cbSize = sizeof(sInfo);
258 
259  if (!GetScrollInfo(hwnd, nBar, &sInfo))
260  return;
261 
262  oldPos = sInfo.nPos;
263 
264  switch (sbCode)
265  {
266  case SB_LINEUP: // SB_LINELEFT:
267  sInfo.nPos--;
268  break;
269 
270  case SB_LINEDOWN: // SB_LINERIGHT:
271  sInfo.nPos++;
272  break;
273 
274  case SB_PAGEUP: // SB_PAGELEFT:
275  sInfo.nPos -= sInfo.nPage;
276  break;
277 
278  case SB_PAGEDOWN: // SB_PAGERIGHT:
279  sInfo.nPos += sInfo.nPage;
280  break;
281 
282  case SB_THUMBTRACK:
283  sInfo.nPos = sInfo.nTrackPos;
284  break;
285 
286  case SB_THUMBPOSITION:
287  sInfo.nPos = sInfo.nTrackPos;
288  break;
289 
290  case SB_TOP: // SB_LEFT:
291  sInfo.nPos = sInfo.nMin;
292  break;
293 
294  case SB_BOTTOM: // SB_RIGHT:
295  sInfo.nPos = sInfo.nMax;
296  break;
297 
298  default:
299  break;
300  }
301 
302  sInfo.nPos = min(max(sInfo.nPos, 0), Maximum);
303 
304  if (oldPos != sInfo.nPos)
305  {
306  POINT scOldPos = scPos;
307 
308  /* We now modify scPos */
309  *pOriginXY = sInfo.nPos;
310 
312  (scOldPos.x - scPos.x),
313  (scOldPos.y - scPos.y),
314  NULL,
315  NULL,
316  NULL,
317  NULL,
319 
320  sInfo.fMask = SIF_POS;
321  SetScrollInfo(hwnd, nBar, &sInfo, TRUE);
322  }
323 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define SB_PAGEDOWN
Definition: winuser.h:569
#define SB_PAGEUP
Definition: winuser.h:568
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
#define SIF_RANGE
Definition: winuser.h:1221
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define SB_HORZ
Definition: winuser.h:552
int32_t INT
Definition: typedefs.h:56
#define SIF_PAGE
Definition: winuser.h:1219
& rect
Definition: startmenu.cpp:1413
POINT scPos
#define SW_ERASE
Definition: winuser.h:2555
smooth NULL
Definition: ftsmooth.c:416
#define SB_THUMBPOSITION
Definition: winuser.h:572
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
#define SB_THUMBTRACK
Definition: winuser.h:573
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
#define SW_INVALIDATE
Definition: winuser.h:2554
#define SIF_POS
Definition: winuser.h:1220
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SB_TOP
Definition: winuser.h:578
#define SIF_TRACKPOS
Definition: winuser.h:1223
#define min(a, b)
Definition: monoChain.cc:55
#define SB_LINEDOWN
Definition: winuser.h:565
#define SB_LINEUP
Definition: winuser.h:564
#define SB_BOTTOM
Definition: winuser.h:577
#define SW_SCROLLCHILDREN
Definition: winuser.h:2553
signed int * PLONG
Definition: retypes.h:5
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)

Referenced by WndProc().

◆ RegisterMyClass()

static void RegisterMyClass ( HINSTANCE  hInst)
static

Definition at line 29 of file buttonvistest.cpp.

30 {
31  WNDCLASSEXW wcex;
32 
33  wcex.cbSize = sizeof(WNDCLASSEX);
34 
35  wcex.style = CS_HREDRAW | CS_VREDRAW;
36  wcex.lpfnWndProc = WndProc;
37  wcex.cbClsExtra = 0;
38  wcex.cbWndExtra = 0;
39  wcex.hInstance = hInst;
42  wcex.hbrBackground = NULL;
44  wcex.lpszClassName = L"ButtonTests";
46 
47  RegisterClassExW(&wcex);
48 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDI_SMALL
Definition: resource.h:37
int cbWndExtra
Definition: winuser.h:3194
#define IDI_WIN32PROJECT1
Definition: resource.h:1
#define CS_HREDRAW
Definition: winuser.h:648
HICON hIcon
Definition: winuser.h:3196
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
LPCWSTR lpszMenuName
Definition: winuser.h:3199
smooth NULL
Definition: ftsmooth.c:416
int cbClsExtra
Definition: winuser.h:3193
LPCWSTR lpszClassName
Definition: winuser.h:3200
#define CS_VREDRAW
Definition: winuser.h:653
HBRUSH hbrBackground
Definition: winuser.h:3198
UINT cbSize
Definition: winuser.h:3190
HINSTANCE hInstance
Definition: winuser.h:3195
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
#define IDC_MENU
Definition: resource.h:7
static const WCHAR L[]
Definition: oid.c:1250
HCURSOR hCursor
Definition: winuser.h:3197
UINT style
Definition: winuser.h:3191
#define LoadCursor
Definition: winuser.h:5713
WNDPROC lpfnWndProc
Definition: winuser.h:3192
HINSTANCE hInst
Definition: dxdiag.c:13
HICON hIconSm
Definition: winuser.h:3201
#define IDC_ARROW
Definition: winuser.h:682
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
#define LoadIcon
Definition: winuser.h:5714

Referenced by wWinMain().

◆ WndProc()

LRESULT CALLBACK WndProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 325 of file buttonvistest.cpp.

326 {
327  RECT rc = {0,0,5000,5000};
328  switch (message)
329  {
330  case WM_DESTROY:
331  PostQuitMessage(0);
332  break;
333  case WM_CTLCOLORSTATIC:
334  return (LRESULT)hbrCtlColorStatic;
335  case WM_CTLCOLORBTN:
336  return (LRESULT)hbrCtlColorBtn;
337  case WM_ERASEBKGND:
338  FillRect((HDC)wParam, &rc, hbrErase);
339  return TRUE;
340  case WM_PRINTCLIENT:
342  break;
343  case WM_HSCROLL:
345  break;
346  case WM_VSCROLL:
348  break;
349  case WM_DRAWITEM :
350  {
352  INT oldBkMode;
354  DrawFrameControl( di->hDC, &di->rcItem, DFC_BUTTON, state );
355  oldBkMode = SetBkMode(di->hDC, TRANSPARENT);
356  DrawTextW(di->hDC, L"Ownder drawn text", -1, &di->rcItem, DT_VCENTER | DT_CENTER);
357  SetBkMode(di->hDC, oldBkMode);
358  break;
359  }
360  case WM_NOTIFY:
361  {
362  NMHDR* phdr = (NMHDR*)lParam;
363  if (phdr->code == NM_CUSTOMDRAW)
364  {
365  LPNMCUSTOMDRAW lpNMCustomDraw = (LPNMCUSTOMDRAW) lParam;
366  if (lpNMCustomDraw->dwDrawStage == CDDS_PREERASE && bSkipErase)
367  return CDRF_SKIPDEFAULT;
368  else if (lpNMCustomDraw->dwDrawStage == CDDS_PREPAINT && bSkipPaint)
369  return CDRF_SKIPDEFAULT;
370  return CDRF_DODEFAULT;
371  }
372  }
373  case WM_COMMAND:
374  {
375  UINT id = LOWORD(wParam);
376  switch(id)
377  {
378  case IDM_NULL_WIN: hbrErase = hbrNULL; break;
379  case IDM_RED_WIN: hbrErase = hbrRed; break;
380  case IDM_GREEN_WIN: hbrErase = hbrGreen; break;
381  case IDM_BLUE_WIN: hbrErase = hbrBlue; break;
382  case IDM_YELLOW_WIN: hbrErase = hbrYellow; break;
383  case IDM_CYAN_WIN: hbrErase = hbrCyan; break;
384 
386  case IDM_RED_STATIC: hbrCtlColorStatic = hbrRed; break;
391 
392  case IDM_NULL_BTN: hbrCtlColorBtn = hbrNULL; break;
393  case IDM_RED_BTN: hbrCtlColorBtn = hbrRed; break;
394  case IDM_GREEN_BTN: hbrCtlColorBtn = hbrGreen; break;
395  case IDM_BLUE_BTN: hbrCtlColorBtn = hbrBlue; break;
396  case IDM_YELLOW_BTN: hbrCtlColorBtn = hbrYellow; break;
397  case IDM_CYAN_BTN: hbrCtlColorBtn = hbrCyan; break;
398 
405 
406  case IDM_SKIP_ERASE: bSkipErase = !bSkipErase; break;
407  case IDM_SKIP_PAINT: bSkipPaint = !bSkipPaint; break;
408  default:
409  return 0;
410  }
411 
413  break;
414  }
415  default:
417  }
418  return 0;
419 }
#define IDM_SKIP_ERASE
Definition: resource.h:37
#define IDM_CYAN_BTN
Definition: resource.h:28
#define IDM_YELLOW_STATIC
Definition: resource.h:20
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define DFC_BUTTON
Definition: winuser.h:476
#define IDM_BLUE_STATIC
Definition: resource.h:19
#define IDM_RED_BTN
Definition: resource.h:24
#define IDM_YELLOW_WIN
Definition: resource.h:13
#define SB_VERT
Definition: winuser.h:553
#define IDM_RED_PRINTCLNT
Definition: resource.h:31
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1754
#define SB_HORZ
Definition: winuser.h:552
#define IDM_YELLOW_PRINTCLNT
Definition: resource.h:34
static HDC
Definition: imagelist.c:92
HWND hWnd
Definition: settings.c:17
BOOL bSkipErase
HBRUSH hbrCtlColorBtn
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define CDRF_SKIPDEFAULT
Definition: commctrl.h:255
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
#define WM_PRINTCLIENT
Definition: richedit.h:70
UINT code
Definition: winuser.h:3133
#define IDM_CYAN_WIN
Definition: resource.h:14
#define DFCS_PUSHED
Definition: winuser.h:503
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
#define WM_CTLCOLORBTN
Definition: winuser.h:1751
#define IDM_CYAN_PRINTCLNT
Definition: resource.h:35
#define TRANSPARENT
Definition: wingdi.h:949
#define IDM_SKIP_PAINT
Definition: resource.h:38
BOOL bSkipPaint
smooth NULL
Definition: ftsmooth.c:416
#define IDM_NULL_BTN
Definition: resource.h:23
#define IDM_BLUE_WIN
Definition: resource.h:12
#define DT_VCENTER
Definition: winuser.h:543
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define IDM_BLUE_BTN
Definition: resource.h:26
HBRUSH hbrCyan
HBRUSH hbrBlue
HBRUSH hbrErase
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HBRUSH hbrRed
#define CDRF_DODEFAULT
Definition: commctrl.h:253
#define IDM_NULL_STATIC
Definition: resource.h:16
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define CDDS_PREPAINT
Definition: commctrl.h:265
static const WCHAR L[]
Definition: oid.c:1250
static int state
Definition: maze.c:121
#define IDM_GREEN_PRINTCLNT
Definition: resource.h:32
#define WM_COMMAND
Definition: winuser.h:1722
HBRUSH hbrPrintClientClear
#define IDM_CYAN_STATIC
Definition: resource.h:21
#define IDM_YELLOW_BTN
Definition: resource.h:27
static VOID OnScroll(HWND hwnd, INT nBar, WORD sbCode)
#define IDM_BLUE_PRINTCLNT
Definition: resource.h:33
#define IDM_GREEN_WIN
Definition: resource.h:11
#define DFCS_BUTTONPUSH
Definition: winuser.h:501
struct tagNMCUSTOMDRAWINFO * LPNMCUSTOMDRAW
HBRUSH hbrCtlColorStatic
unsigned int UINT
Definition: ndis.h:50
#define WM_HSCROLL
Definition: winuser.h:1725
#define IDM_RED_WIN
Definition: resource.h:10
#define WM_DRAWITEM
Definition: winuser.h:1627
#define ODS_SELECTED
Definition: winuser.h:2520
HBRUSH hbrNULL
#define DT_CENTER
Definition: winuser.h:527
HBRUSH hbrGreen
#define WM_ERASEBKGND
Definition: winuser.h:1607
#define IDM_GREEN_BTN
Definition: resource.h:25
HBRUSH hbrYellow
LONG_PTR LRESULT
Definition: windef.h:209
#define IDM_NULL_PRINTCLNT
Definition: resource.h:30
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define IDM_RED_STATIC
Definition: resource.h:17
#define WM_NOTIFY
Definition: richedit.h:61
#define WM_VSCROLL
Definition: winuser.h:1726
#define CDDS_PREERASE
Definition: commctrl.h:267
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17
#define IDM_GREEN_STATIC
Definition: resource.h:18
#define IDM_NULL_WIN
Definition: resource.h:9

Referenced by RegisterMyClass().

◆ wWinMain()

int WINAPI wWinMain ( _In_ HINSTANCE  hInstance,
_In_opt_ HINSTANCE  hPrevInstance,
_In_ LPWSTR  lpCmdLine,
_In_ int  nCmdShow 
)

Definition at line 104 of file buttonvistest.cpp.

108 {
109  HWND hwnd[200];
110  HANDLE hActCtx;
111  ULONG_PTR cookie;
112  BOOL bActivated;
113 
114  ACTCTXW actctx = { sizeof(actctx) };
115  actctx.hModule = hInstance;
116  actctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID| ACTCTX_FLAG_HMODULE_VALID;
117  actctx.lpResourceName = MAKEINTRESOURCEW(500);
118  hActCtx = CreateActCtxW(&actctx);
119 
122 
123  scPos.x = 0;
124  scPos.y = 0;
125 
126  hbrNULL = (HBRUSH)GetStockObject (NULL_BRUSH);
127  hbrRed = CreateSolidBrush(0x00000FF);
128  hbrGreen = CreateSolidBrush(0x0000FF00);
129  hbrBlue = CreateSolidBrush(0x00FF0000);
130  hbrCyan = CreateSolidBrush(0x00FFFF00);
131  hbrYellow = CreateSolidBrush(0x0000FFFF);
132 
136  hbrErase = hbrGreen;
137 
138  bSkipErase = FALSE;
139  bSkipPaint = FALSE;
140 
142 
145 
146  CreateWnd(hWnd, L"Static", L"no images", 0, -1, 0);
147  CreateWnd(hWnd, L"Static", L"with BM_SETIMAGE", 0, -1, 1);
148  CreateWnd(hWnd, L"Static", L"with BM_SETIMAGE", 0, -1, 2);
149  CreateWnd(hWnd, L"Static", L"with BM_SETIMAGE and BS_BITMAP", 0, -1, 3);
150  CreateWnd(hWnd, L"Static", L"with BM_SETIMAGE and BS_ICON", 0, -1, 4);
151 
152  CreateWnd(hWnd, L"Static", L"Button V5", 0, 0, -1);
153  CreateButtonSet(hWnd, &hwnd[0], 0, 0, BS_PUSHBUTTON);
156  CreateButtonSet(hWnd, &hwnd[15], 1, 5, BS_GROUPBOX);
157  CreateButtonSet(hWnd, &hwnd[20], 0, 10, BS_CHECKBOX);
158  CreateButtonSet(hWnd, &hwnd[25], 1, 10, BS_RADIOBUTTON);
159 
160  bActivated = ActivateActCtx(hActCtx, &cookie);
161  LoadLibraryW(L"comctl32.dll");
162 
164  BUTTON_IMAGELIST btniml = {himl, {1,1,1,1}, BUTTON_IMAGELIST_ALIGN_LEFT};
165 
166  CreateWnd(hWnd, L"Static", L"Button V6 without themes", 0, 2, -1);
167  CreateButtonSet(hWnd, &hwnd[30], 2, 0, BS_PUSHBUTTON);
170  CreateButtonSet(hWnd, &hwnd[55], 3, 5, BS_GROUPBOX);
171  CreateButtonSet(hWnd, &hwnd[50], 2, 10, BS_CHECKBOX);
172  CreateButtonSet(hWnd, &hwnd[55], 3, 10, BS_RADIOBUTTON);
173 
174  CreateWnd(hWnd, L"Static", L"Button V6 with imagelist and no themes", 0, 4, -1);
175  CreateButtonSet(hWnd, &hwnd[60], 4, 0, BS_PUSHBUTTON);
178  CreateButtonSet(hWnd, &hwnd[75], 5, 5, BS_GROUPBOX);
179  CreateButtonSet(hWnd, &hwnd[80], 4, 10, BS_CHECKBOX);
180  CreateButtonSet(hWnd, &hwnd[85], 5, 10, BS_RADIOBUTTON);
181 
182  for (int i = 30; i < 90; i++)
183  SetWindowTheme(hwnd[i], L"", L"");
184 
185  for (int i = 60; i< 90; i++)
186  SendMessageW(hwnd[i], BCM_SETIMAGELIST, 0, (LPARAM)&btniml);
187 
188  CreateWnd(hWnd, L"Static", L"Button V6 with themes and imagelist", 0, 6, -1);
189  CreateButtonSet(hWnd, &hwnd[120], 6, 0, BS_PUSHBUTTON);
190  CreateButtonSet(hWnd, &hwnd[125], 7, 0, BS_DEFPUSHBUTTON);
192  CreateButtonSet(hWnd, &hwnd[135], 7, 5, BS_GROUPBOX);
193  CreateButtonSet(hWnd, &hwnd[140], 6, 10, BS_CHECKBOX);
194  CreateButtonSet(hWnd, &hwnd[145], 7, 10, BS_RADIOBUTTON);
195 
196  CreateWnd(hWnd, L"Static", L"Button V6 with themes", 0, 8, -1);
197  CreateButtonSet(hWnd, &hwnd[90], 8, 0, BS_PUSHBUTTON);
200  CreateButtonSet(hWnd, &hwnd[105], 9, 5, BS_GROUPBOX);
201  CreateButtonSet(hWnd, &hwnd[110], 8, 10, BS_CHECKBOX);
202  CreateButtonSet(hWnd, &hwnd[115], 9, 10, BS_RADIOBUTTON);
203 
204  for (int i = 120; i< 150; i++)
205  SendMessageW(hwnd[i], BCM_SETIMAGELIST, 0, (LPARAM)&btniml);
206 
207  if (bActivated) DeactivateActCtx(0, cookie);
208 
209  SCROLLINFO vsi = {sizeof(SCROLLINFO), SIF_ALL, 0, 2 * TOP_MARGIN + 10 * (Y_GAP + Y_HEIGHT), Y_HEIGHT, 0, 0};
210  SCROLLINFO hsi = {sizeof(SCROLLINFO), SIF_ALL, 0, 2 * LEFT_MARGIN + 13 * (X_GAP + X_WIDTH), X_WIDTH, 0, 0};
211 
212  SetScrollInfo(hWnd, SB_HORZ, &hsi, FALSE);
213  SetScrollInfo(hWnd, SB_VERT, &vsi, FALSE);
214 
217 
218  ShowWindow(hWnd, nCmdShow);
220 
221  MSG msg;
222  while (GetMessage(&msg, NULL, 0, 0))
223  {
226  }
227 
228  return (int) msg.wParam;
229 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
#define WS_DISABLED
Definition: pedump.c:621
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
#define IDI_WIN32PROJECT1
Definition: resource.h:1
long x
Definition: polytest.cpp:48
#define SB_VERT
Definition: winuser.h:553
#define BS_RADIOBUTTON
Definition: pedump.c:655
#define Y_GAP
#define TOP_MARGIN
#define NULL_BRUSH
Definition: wingdi.h:900
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SB_HORZ
Definition: winuser.h:552
BOOL WINAPI ShowScrollBar(_In_ HWND, _In_ int, _In_ BOOL)
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND hWnd
Definition: settings.c:17
BOOL bSkipErase
HBRUSH hbrCtlColorBtn
#define IDB_BITMAP1
Definition: resource.h:17
#define IDB_BITMAP2
Definition: resource.h:6
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HIMAGELIST himl
#define BS_GROUPBOX
Definition: pedump.c:658
POINT scPos
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
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
HINSTANCE hInstance
Definition: charmap.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
#define X_WIDTH
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
#define CW_USEDEFAULT
Definition: winuser.h:225
BOOL bSkipPaint
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
#define BS_CHECKBOX
Definition: pedump.c:653
LONG_PTR LPARAM
Definition: windef.h:208
#define actctx
Definition: kernel32.h:8
HBITMAP hbmp
struct tagSCROLLINFO SCROLLINFO
HBRUSH hbrCyan
HBRUSH hbrBlue
#define Y_HEIGHT
HBRUSH hbrErase
HBRUSH hbrRed
HICON hico
#define WS_HSCROLL
Definition: pedump.c:628
#define LEFT_MARGIN
#define BUTTON_IMAGELIST_ALIGN_LEFT
Definition: commctrl.h:4599
static const WCHAR L[]
Definition: oid.c:1250
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR 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)
HBRUSH hbrPrintClientClear
static void RegisterMyClass(HINSTANCE hInst)
#define BS_PUSHBUTTON
Definition: pedump.c:651
static HWND CreateWnd(HWND hWnd, LPCWSTR Class, LPCWSTR Text, LONG style, int i, int j)
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2132
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
HBRUSH hbrCtlColorStatic
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
static void CreateButtonSet(HWND hwndParent, HWND *ahwnd, int i, int j, DWORD style)
#define WS_VSCROLL
Definition: pedump.c:627
#define IMAGE_BITMAP
Definition: winuser.h:211
#define GetMessage
Definition: winuser.h:5691
#define CLR_DEFAULT
Definition: commctrl.h:305
#define X_GAP
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
#define msg(x)
Definition: auth_time.c:54
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx)
Definition: actctx.c:104
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
HBRUSH hbrNULL
HBRUSH hbrGreen
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HBRUSH hbrYellow
#define BCM_SETIMAGELIST
Definition: commctrl.h:4614
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
#define SIF_ALL
Definition: winuser.h:1218

Variable Documentation

◆ bSkipErase

BOOL bSkipErase

Definition at line 26 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ bSkipPaint

BOOL bSkipPaint

Definition at line 27 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbmp

HBITMAP hbmp

Definition at line 10 of file buttonvistest.cpp.

Referenced by Icon::add_to_imagelist(), QuickLaunchBar::AddButton(), QuickLaunchBar::AddShortcuts(), Icon::create_bitmap(), create_bitmap(), create_bitmap_from_icon(), create_gdi_logbrush(), create_hatch_bitmap(), create_small_bitmap_from_icon(), CreateButtonSet(), CreatePatternBrush(), DECLARE_INTERFACE_(), DrawCheckedRect(), EngCreateBitmap(), EngCreateDeviceBitmap(), TaskBar::EnumWndProc(), GdiSelectBitmap(), get_brush_bitmap_info(), get_graphics_device_bounds(), get_stgmed_for_bitmap(), GetBitmapPixelBuffer(), GetDiaogTextureBrush(), GetDIBits(), GetRealColorDepth(), GreCreateBitmapEx(), GreSetBitmapOwner(), HEXEDIT_WM_PAINT(), ImageList_AddAlphaIcon(), insert_static_object(), ITextHostImpl_TxCreateCaret(), LISTVIEW_CreateDragImage(), LISTVIEW_Refresh(), ME_RTFReadPictGroup(), msi_seltree_create_imagelist(), NtGdiCreateBitmap(), NtGdiSelectBitmap(), PROPSHEET_Paint(), TaskBar::Refresh(), SetBitmap(), SpiSetWallpaper(), START_TEST(), sw_SetContext(), test_AppendMenu(), test_approximate_viewrect(), test_bcm_get_ideal_size(), Test_Bitmap(), test_bitmap(), test_bm_get_set_image(), test_bmBits(), Test_BrushOrigin(), Test_CreateBitmap(), Test_CreateBitmap_Params(), test_CreateBitmapFromHBITMAP(), Test_CreateDIBitmap1(), Test_CreateDIBitmap_CBM_CREATDIB(), Test_CreateDIBitmap_DIB_PAL_COLORS(), Test_CreateDIBitmap_Params(), Test_CreateDIBitmap_RLE8(), Test_CreateDIBPatternBrushPt_RLE8(), test_DC_bitmap(), test_dib_formats(), test_DIB_PAL_COLORS(), test_FillRect(), test_get16dibits(), test_get_set_imagelist(), test_GetCurrentObject(), Test_GetDIBColorTable(), Test_GetDIBits(), test_GetDIBits(), Test_GetDIBits_xBpp(), Test_GetIdealSizeNoThemes(), Test_GetPixel_1bpp(), Test_GetRandomRgn_RGN5(), Test_GetRandomRgn_SYSRGN(), test_hittest(), test_images(), test_mbs_help(), test_memory_dc_clipping(), test_mono_1x1_bmp_dbg(), test_mono_bitmap(), Test_NtGdiDoPalette_SetDIBColorTable(), Test_SelectDIBSection(), Test_SetDCPenColor(), Test_SetDIBits(), Test_SetDIBits_1bpp(), Test_SetPixel_PAL(), Test_SrcMono(), ThemeEndBufferedPaint(), ThemeStartBufferedPaint(), TREEVIEW_CreateDragImage(), UserLoadImage(), UXTHEME_DrawThemePartToDib(), UXTHEME_GetImageBackBackgroundRegion(), WDML_DataHandle2Global(), WDML_Global2DataHandle(), WinGGetDIBPointer(), WinMain(), and wWinMain().

◆ hbrBlue

HBRUSH hbrBlue

Definition at line 17 of file buttonvistest.cpp.

Referenced by MainWndProc(), WndProc(), and wWinMain().

◆ hbrCtlColorBtn

HBRUSH hbrCtlColorBtn

Definition at line 22 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrCtlColorStatic

HBRUSH hbrCtlColorStatic

Definition at line 21 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrCyan

HBRUSH hbrCyan

Definition at line 18 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrErase

HBRUSH hbrErase

Definition at line 24 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrGreen

HBRUSH hbrGreen

Definition at line 16 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrNULL

HBRUSH hbrNULL

Definition at line 14 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrPrintClientClear

HBRUSH hbrPrintClientClear

Definition at line 23 of file buttonvistest.cpp.

Referenced by WndProc(), and wWinMain().

◆ hbrRed

HBRUSH hbrRed

Definition at line 15 of file buttonvistest.cpp.

Referenced by MainWndProc(), WndProc(), and wWinMain().

◆ hbrYellow

HBRUSH hbrYellow

Definition at line 19 of file buttonvistest.cpp.

Referenced by MainWndProc(), WndProc(), and wWinMain().

◆ hico

◆ himl

HIMAGELIST himl

Definition at line 11 of file buttonvistest.cpp.

Referenced by add_dib_bits(), Icon::add_to_imagelist(), add_with_alpha(), AddListViewItems(), AddWallpapersFromDirectory(), alpha_blend_image(), check_bits(), check_color_table(), check_ImageList_DrawIndirect_broken(), check_ImageList_DrawIndirect_fState(), check_ImageList_DrawIndirect_fStyle(), check_ImageList_DrawIndirect_ILD_ROP(), check_iml_data(), COMBOEX_SetImageList(), Icon::create_bitmap(), createImageList(), CShellLink::CreateShortcutIcon(), DestroyTreeView(), FILEDLG95_InitControls(), FileOpenDlgProc95(), HEADER_CreateDragImage(), HEADER_SetImageList(), HIMAGELIST_QueryInterface(), image_list_add_bitmap(), image_list_init(), ImageList_Add(), ImageList_AddAlphaIcon(), ImageList_AddIcon(), ImageList_AddMasked(), imagelist_copy_images(), ImageList_Create(), ImageList_CreateImage(), ImageList_Destroy(), ImageList_Draw(), ImageList_DrawEx(), ImageList_DrawIndirect(), imagelist_get_bitmap_size(), ImageList_GetBkColor(), ImageList_GetFlags(), ImageList_GetIcon(), ImageList_GetIconSize(), ImageList_GetImageCount(), ImageList_GetImageInfo(), ImageList_GetImageRect(), IMAGELIST_InternalExpandBitmaps(), ImageList_LoadImageA(), ImageList_LoadImageW(), imagelist_point_from_index(), ImageList_Read(), ImageList_Remove(), ImageList_Replace(), ImageList_ReplaceIcon(), ImageList_SetBkColor(), ImageList_SetColorTable(), ImageList_SetFilter(), ImageList_SetFlags(), ImageList_SetIconSize(), ImageList_SetImageCount(), ImageList_SetOverlayImage(), ImageList_Write(), InitImageList(), InitListViewImageLists(), InitTreeViewImageLists(), is_valid(), LISTVIEW_CreateCheckBoxIL(), LISTVIEW_DrawItemPart(), LISTVIEW_SetColumnWidth(), LISTVIEW_SetExtendedListViewStyle(), LISTVIEW_SetImageList(), LISTVIEW_SetView(), LISTVIEW_StyleChanged(), MD_ListView_OnSetImageList(), MD_TreeView_OnSetImageList(), msi_seltree_create_imagelist(), set_icon_size(), CListView::SetImageList(), CToolbar<>::SetImageList(), CTreeView::SetImageList(), show_image(), test_add_bitmap(), test_add_remove(), test_approximate_viewrect(), test_bcm_get_ideal_size(), test_begindrag(), test_color_table(), test_create_destroy(), test_createdragimage(), test_DrawIndirect(), test_get_set_imagelist(), Test_GetIdealSizeNoThemes(), test_getitemrect(), test_hittest(), test_iconsize(), test_iimagelist(), test_IImageList_Add_Remove(), test_IImageList_Clone(), test_IImageList_Draw(), test_IImageList_Get_SetImageCount(), test_IImageList_GetBkColor(), test_IImageList_GetIconSize(), test_IImageList_GetImageCount(), test_IImageList_SetBkColor(), test_imagecount(), test_ImageList_DrawIndirect(), test_imagelist_storage(), test_images(), test_layout(), test_merge_colors(), test_removeimage(), test_sizes(), test_tab(), test_TVS_CHECKBOXES(), ThemePageDlgProc(), TOOLBAR_CustomizeDialogProc(), TOOLBAR_DrawImage(), TOOLBAR_DrawMasked(), TOOLBAR_GetImageListForDrawing(), TOOLBAR_InsertImageList(), TOOLBAR_IsValidBitmapIndex(), TOOLBAR_IsValidImageList(), TOOLBAR_SetDisabledImageList(), TOOLBAR_SetHotImageList(), TOOLBAR_SetImageList(), and wWinMain().

◆ scPos

POINT scPos

Definition at line 12 of file buttonvistest.cpp.

Referenced by OnScroll(), and wWinMain().