ReactOS  0.4.14-dev-77-gd9e7c48
buttonvistest.cpp
Go to the documentation of this file.
1 #include <windows.h>
2 #include <uxtheme.h>
3 #include <stdlib.h>
4 #include <tchar.h>
5 #include "resource.h"
6 
8 
13 
14 HBRUSH hbrNULL;
15 HBRUSH hbrRed;
16 HBRUSH hbrGreen;
17 HBRUSH hbrBlue;
18 HBRUSH hbrCyan;
19 HBRUSH hbrYellow;
20 
24 HBRUSH hbrErase;
25 
28 
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 }
49 
50 #define TOP_MARGIN 50
51 #define LEFT_MARGIN 160
52 #define X_GAP 10
53 #define Y_GAP 10
54 #define Y_HEIGHT 40
55 #define X_WIDTH 150
56 
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 }
68 
69 static HWND CreateBtn(HWND hWnd, LPCWSTR Text, LONG style, int i, int j)
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 }
88 
89 static void CreateButtonSet(HWND hwndParent, HWND *ahwnd, int i, int j, DWORD style)
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 }
103 
105  _In_opt_ HINSTANCE hPrevInstance,
106  _In_ LPWSTR lpCmdLine,
107  _In_ int nCmdShow)
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 }
230 
231 static VOID
232 OnScroll(HWND hwnd, INT nBar, WORD sbCode)
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 }
324 
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 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
static HWND CreateBtn(HWND hWnd, LPCWSTR Text, LONG style, int i, int j)
#define WS_DISABLED
Definition: pedump.c:621
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define SB_PAGEDOWN
Definition: winuser.h:569
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDI_SMALL
Definition: resource.h:37
#define IDM_SKIP_ERASE
Definition: resource.h:37
#define IDM_CYAN_BTN
Definition: resource.h:28
#define DispatchMessage
Definition: winuser.h:5666
#define SB_PAGEUP
Definition: winuser.h:568
#define IDM_YELLOW_STATIC
Definition: resource.h:20
#define max(a, b)
Definition: svc.c:63
BOOL WINAPI TranslateMessage(_In_ const MSG *)
Definition: tftpd.h:59
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define DFC_BUTTON
Definition: winuser.h:476
#define IDM_BLUE_STATIC
Definition: resource.h:19
#define IMAGE_ICON
Definition: winuser.h:212
#define SIF_RANGE
Definition: winuser.h:1221
long y
Definition: polytest.cpp:48
int cbWndExtra
Definition: winuser.h:3194
#define IDI_WIN32PROJECT1
Definition: resource.h:1
#define IDM_RED_BTN
Definition: resource.h:24
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define IDM_YELLOW_WIN
Definition: resource.h:13
long x
Definition: polytest.cpp:48
#define SB_VERT
Definition: winuser.h:553
#define BS_RADIOBUTTON
Definition: pedump.c:655
#define IDM_RED_PRINTCLNT
Definition: resource.h:31
#define Y_GAP
#define TOP_MARGIN
#define NULL_BRUSH
Definition: wingdi.h:900
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1754
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SB_HORZ
Definition: winuser.h:552
#define IDM_YELLOW_PRINTCLNT
Definition: resource.h:34
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
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 CS_HREDRAW
Definition: winuser.h:648
GLuint buffer
Definition: glext.h:5915
HICON hIcon
Definition: winuser.h:3196
#define IDB_BITMAP2
Definition: resource.h:6
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CDRF_SKIPDEFAULT
Definition: commctrl.h:255
HIMAGELIST himl
#define BM_SETIMAGE
Definition: winuser.h:1904
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4217
int32_t INT
Definition: typedefs.h:56
#define SIF_PAGE
Definition: winuser.h:1219
#define BS_GROUPBOX
Definition: pedump.c:658
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
POINT scPos
#define _In_opt_
Definition: no_sal2.h:213
#define WM_PRINTCLIENT
Definition: richedit.h:70
uint32_t ULONG_PTR
Definition: typedefs.h:63
UINT code
Definition: winuser.h:3133
#define IDM_CYAN_WIN
Definition: resource.h:14
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
#define DFCS_PUSHED
Definition: winuser.h:503
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
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
LPCWSTR lpszMenuName
Definition: winuser.h:3199
#define WM_CTLCOLORBTN
Definition: winuser.h:1751
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define IDM_CYAN_PRINTCLNT
Definition: resource.h:35
#define X_WIDTH
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
#define SW_ERASE
Definition: winuser.h:2555
#define TRANSPARENT
Definition: wingdi.h:949
#define CW_USEDEFAULT
Definition: winuser.h:225
#define IDM_SKIP_PAINT
Definition: resource.h:38
BOOL bSkipPaint
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define LoadLibraryW(x)
Definition: compat.h:404
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
#define IDM_NULL_BTN
Definition: resource.h:23
#define SB_THUMBPOSITION
Definition: winuser.h:572
#define BS_CHECKBOX
Definition: pedump.c:653
LONG_PTR LPARAM
Definition: windef.h:208
#define actctx
Definition: kernel32.h:8
int WINAPI ScrollWindowEx(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT, _In_opt_ HRGN, _Out_opt_ LPRECT, _In_ UINT)
int cbClsExtra
Definition: winuser.h:3193
#define IDM_BLUE_WIN
Definition: resource.h:12
#define DT_VCENTER
Definition: winuser.h:543
#define WM_SETTEXT
Definition: winuser.h:1599
LPCWSTR lpszClassName
Definition: winuser.h:3200
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define IDM_BLUE_BTN
Definition: resource.h:26
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
struct tagSCROLLINFO SCROLLINFO
#define CS_VREDRAW
Definition: winuser.h:653
HBRUSH hbrCyan
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SB_THUMBTRACK
Definition: winuser.h:573
HBRUSH hbrBackground
Definition: winuser.h:3198
UINT cbSize
Definition: winuser.h:3190
HBRUSH hbrBlue
#define Y_HEIGHT
HBRUSH hbrErase
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define WINAPI
Definition: msvc.h:8
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HBRUSH hbrRed
#define CDRF_DODEFAULT
Definition: commctrl.h:253
HICON hico
#define WS_HSCROLL
Definition: pedump.c:628
HINSTANCE hInstance
Definition: winuser.h:3195
#define IDM_NULL_STATIC
Definition: resource.h:16
#define LEFT_MARGIN
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
int ret
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define CDDS_PREPAINT
Definition: commctrl.h:265
#define BUTTON_IMAGELIST_ALIGN_LEFT
Definition: commctrl.h:4599
#define BS_ICON
Definition: winuser.h:264
#define IDC_MENU
Definition: resource.h:7
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)
#define BS_BITMAP
Definition: winuser.h:258
static int state
Definition: maze.c:121
#define IDM_GREEN_PRINTCLNT
Definition: resource.h:32
GLdouble s
Definition: gl.h:2039
HCURSOR hCursor
Definition: winuser.h:3197
#define MessageBox
Definition: winuser.h:5723
#define WM_COMMAND
Definition: winuser.h:1722
HBRUSH hbrPrintClientClear
UINT style
Definition: winuser.h:3191
static void RegisterMyClass(HINSTANCE hInst)
#define LoadCursor
Definition: winuser.h:5713
#define BS_PUSHBUTTON
Definition: pedump.c:651
#define SW_INVALIDATE
Definition: winuser.h:2554
WNDPROC lpfnWndProc
Definition: winuser.h:3192
#define IDM_CYAN_STATIC
Definition: resource.h:21
#define SIF_POS
Definition: winuser.h:1220
#define _In_
Definition: no_sal2.h:204
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define IDM_YELLOW_BTN
Definition: resource.h:27
static VOID OnScroll(HWND hwnd, INT nBar, WORD sbCode)
#define SB_TOP
Definition: winuser.h:578
HINSTANCE hInst
Definition: dxdiag.c:13
#define IDM_BLUE_PRINTCLNT
Definition: resource.h:33
static HWND CreateWnd(HWND hWnd, LPCWSTR Class, LPCWSTR Text, LONG style, int i, int j)
#define IDM_GREEN_WIN
Definition: resource.h:11
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
HBITMAP WINAPI LoadBitmapW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2132
#define DFCS_BUTTONPUSH
Definition: winuser.h:501
struct tagNMCUSTOMDRAWINFO * LPNMCUSTOMDRAW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SIF_TRACKPOS
Definition: winuser.h:1223
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
HBRUSH hbrCtlColorStatic
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
#define SB_LINEDOWN
Definition: winuser.h:565
#define WM_HSCROLL
Definition: winuser.h:1725
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define SB_LINEUP
Definition: winuser.h:564
static void CreateButtonSet(HWND hwndParent, HWND *ahwnd, int i, int j, DWORD style)
#define SB_BOTTOM
Definition: winuser.h:577
#define WS_VSCROLL
Definition: pedump.c:627
#define MB_OK
Definition: winuser.h:784
#define IMAGE_BITMAP
Definition: winuser.h:211
#define GetMessage
Definition: winuser.h:5691
#define SW_SCROLLCHILDREN
Definition: winuser.h:2553
#define IDM_RED_WIN
Definition: resource.h:10
HICON hIconSm
Definition: winuser.h:3201
#define CLR_DEFAULT
Definition: commctrl.h:305
#define X_GAP
#define WM_DRAWITEM
Definition: winuser.h:1627
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 IDC_ARROW
Definition: winuser.h:682
#define ODS_SELECTED
Definition: winuser.h:2520
#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
#define DT_CENTER
Definition: winuser.h:527
#define BCM_GETIDEALSIZE
Definition: commctrl.h:4611
HBRUSH hbrGreen
static HBITMAP
Definition: button.c:44
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
#define LoadIcon
Definition: winuser.h:5714
#define WM_ERASEBKGND
Definition: winuser.h:1607
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#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)
Arabic default style
Definition: afstyles.h:93
#define WS_VISIBLE
Definition: pedump.c:620
#define BCM_SETIMAGELIST
Definition: commctrl.h:4614
signed int * PLONG
Definition: retypes.h:5
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
int WINAPI SetScrollInfo(_In_ HWND, _In_ int, _In_ LPCSCROLLINFO, _In_ BOOL)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define IDM_RED_STATIC
Definition: resource.h:17
#define WM_NOTIFY
Definition: richedit.h:61
char * Text
Definition: combotst.c:136
#define WM_VSCROLL
Definition: winuser.h:1726
#define SIF_ALL
Definition: winuser.h:1218
#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