ReactOS  0.4.14-dev-55-g2da92ac
combotst.c
Go to the documentation of this file.
1 /* ComboBox Control Test for ReactOS.
2 
3 * This is a test program. Not made to be fast, small
4 * easy to mantain, or portable.
5 
6 * I'm not erasing text because I don't want to use other functions from the API
7 * or make this more complex. Also Fonts are not heavily used.
8 
9 * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
10 * by Waldo Alvarez Caņizares <wac at ghost.matcom.uh.cu>, started July 11, 2003. */
11 
12 //#define WIN32_LEAN_AND_MEAN
13 #include <windows.h>
14 #include "utils.h"
15 
16 #define CONTROLCLASS "COMBOBOX" /* the class name */
17 #define CONTROLCLASSW L"COMBOBOX" /* the class name in unicode*/
18 
19 #define WINDOWWIDTH 560
20 #define WINDOWHEIGHT 350
21 
22 /* --- Command IDs of some buttons --- */
23 #define CREATEWINDOW_ID 106
24 #define CREATEWINDOWEX_ID 107
25 #define CREATEWINDOWW_ID 108
26 #define INITPAGE_ID 400
27 #define SECONDPAGE_ID 401
28 #define BACKFIRSTPAGE_ID 402
29 
30 /* --- Position where the result text goes --- */
31 #define ResultX 0
32 #define ResultY 305
33 
34 /* --- Position where the notify text goes --- */
35 #define NOTIFYX 390
36 #define NOTIFYY 285
37 
38 /* --- The width of most buttons --- */
39 #define CHECKBUTWIDTH 190
40 #define SCROLLAMOUNT -15
41 
42 /* Size of buffer to hold resulting strings from conversion
43 and returned by messages */
44 #define BUFFERLEN 80
45 char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
46 
49 
50 int pos = 10;
51 int n = 0;
52 int yButPos = 10;
53 int xButPos = 0;
54 
56 
57 /* --- Control coordinates --- */
58 #define CONTROLPOSX 390
59 #define CONTROLPOSY 10
62 
64 
66 
69 HWND hwnd; /* main window handle */
70 
71 char AddString[] = "string added";
72 
75 
76 void PrintTextXY(char* Text,int x,int y,int len, RECT rect)
77  {
78  HDC hdc;
79  hdc = GetDC (g_hwnd);
81 
82  TextOut (hdc, x,y,Text,len);
83  ReleaseDC (g_hwnd, hdc);
84 
86  }
87 
88 static
89 VOID
91  {
92  LRESULT ret;
93  RECT rect;
95  htoa((unsigned int)ret,&TextBuffer[8]);
98  }
99 
100 
101 static
102 VOID
104  {
105  LRESULT ret;
106  RECT rect;
107 
108  TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
112  }
113 
114 static
115 VOID
117  {
118  RECT rect = *(RECT*)lParam;
119  TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
121 
122  htoa(rect.top,&TextBuffer[8]);
123  TextBuffer[8+8] = ' ';
124  htoa(rect.bottom,&TextBuffer[8+8+1]);
125  TextBuffer[8+8+8+1] = ' ';
126  htoa(rect.left,&TextBuffer[8+8+8+1+1]);
127  TextBuffer[8+8+8+8+1+1] = ' ';
128  htoa(rect.right,&TextBuffer[8+8+8+8+1+1+1]);
129 
132  }
133 
134 struct
135  {
136  char* Text; /* Text for the button */
137  DWORD MsgCode; /* Message Code */
138  WPARAM wParam; /* Well hope you can understand this */
139  LPARAM lParam; /* ditto */
140  LPFUNCTIONHANDLER Handler; /* Funtion called to handle the result of each message */
141  }
142 Msg[] =
143  {
144  {"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex},
145  {"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex},
146  {"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex}, /* remember to catch WM_DELETEITEM*/
147 
148  /* What a message, why M$ decided to implement his thing ? */
149  {"CB_DIR - drives",CB_DIR,DDL_DRIVES,
150  /* Hoping that most machines have this */
151  (LPARAM)"C:\\",
153 
154  {"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex},
155 
156  {"CB_DIR - files",CB_DIR,
158  (LPARAM)"C:\\*",&HandlePrintReturnHex},
159 
160  /* Do not forget WM_COMPAREITEM */
161 
162  {"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex},
163  {"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex},
164  {"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex},
165 
166  /* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */
167 
168  {"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex},
169 
170  {"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex},
171 
172  /* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */
173 
174  {"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex},
175  {"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex},
176 
177 
178 
179  {"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr},
180  {"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex},
181  {"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex},
182 
183  /* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */
184 
185  {"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex},
186 
187  {"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex},
188  {"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex},
189 
190  {"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex},
191  {"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex},
192  {"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex},
193  {"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex},
194 
195  {"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex},
196 
197  {"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex},
198  {"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex},
199 
200  /*
201  * win2k have a small bug with this ^ , if you press F4 while it is cleared,
202  * the combobox is using style cbs_dropdown
203  * and the pointer is over the edit box then the mouse pointer is not changed
204  * to an arrow
205  */
206 
207  {"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex},
208 
209  {"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex},
210  {"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex},
211 
212  {"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex},
213  {"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex},
214 
215  /* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */
216 
218  {"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex},
219  {"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex},
220 
221  {"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex},
222 
223  {"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex},
224  {"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex},
225 
226  {"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect},
227  {"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex},
228  {"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex},
229 
230  {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
231  };
232 
233 #define MAXMESSAGEBUTTONS 40
234 
235 struct
236  {
237  char* Name; /* Text for the button */
238  DWORD Code; /* Style Code */
239  }
240 Styles[] = {
241  {"WS_DISABLED",WS_DISABLED},
242  {"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL},
243  {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
244  {"CBS_DROPDOWN",CBS_DROPDOWN},
245  {"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST},
246  {"CBS_HASSTRINGS",CBS_HASSTRINGS},
247  {"CBS_LOWERCASE",CBS_LOWERCASE},
248  {"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT},
249  {"CBS_OEMCONVERT",CBS_OEMCONVERT},
250  {"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED},
251  {"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE},
252  {"CBS_SIMPLE",CBS_SIMPLE},
253  {"CBS_SORT",CBS_SORT},
254  {"CBS_UPPERCASE",CBS_UPPERCASE},
255  {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
256  {"WS_HSCROLL",WS_HSCROLL},
257  {"WS_VSCROLL",WS_VSCROLL}
258  };
259 
260 /* The number of check buttons we have.
261 * Maybe some calculations at compile time would be better
262 */
263 
264 #define NUMBERCHECKS 17
265 
266 #define NUMBERBUTTONS NUMBERCHECKS + 7
271 
272 HWND
273 CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id)
274  {
275  HWND h;
276  h = CreateWindowEx(0,
277  "BUTTON",
278  lpWindowName,
280  xButPos, /* x */
281  yButPos, /* y */
282  xSize, /* nWidth */
283  20, /* nHeight */
284  g_hwnd,
285  UlongToHandle(id),
286  g_hInst,
287  NULL
288  );
289  yButPos += 21;
290  return h;
291  }
292 
293 HWND
294 CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style)
295  {
296 
297  HWND h = CreateWindow("BUTTON",
298  lpWindowName,
300  xButPos, /* x */
301  yButPos, /* y */
302  xSize, /* nWidth */
303  20, /* nHeight */
304  g_hwnd,
305  LongToHandle(id),
306  g_hInst,
307  NULL
308  );
309 
310  yButPos += 21;
311  return h;
312  }
313 
314 VOID
316  {
317  int i;
318  ComboStyle = 0;
319  for (i=0 ; i< NUMBERCHECKS ; i++)
320  {
322  ComboStyle |= Styles[i].Code;
324  }
325 
326  for (; i< NUMBERBUTTONS ; i++)ShowWindow(Buttons[i],SW_HIDE);
327  for (i=0 ; i< 26 ; i++) ShowWindow(MessageButtons[i],SW_SHOW);
328 
331  }
332 
333 VOID
335  {
336  int i;
337  for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
340 
343  }
344 
345 VOID
347  {
348  int i;
349  for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_SHOW);
354  }
355 
356 VOID
358  {
359  int i;
361  for (i=0 ; i< NUMBERBUTTONS ; i++) {ShowWindow(Buttons[i],SW_SHOW);}
362 for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
365  }
366 
367 LRESULT
368 CALLBACK
370  {
371  int i;
372  switch ( msg )
373  {
374  case WM_CREATE:
375  g_hwnd = hwnd;
376 
377  /* ---- Initial page ---- */
378 
379  for (i = 0 ; i < 14 ; i++)
381 
382  xButPos += CHECKBUTWIDTH + 10;
383  yButPos = 10;
384 
385  for (; i < NUMBERCHECKS ; i++)
387 
388  Buttons[i++] = CreatePushButton("Width +",70,100,WS_VISIBLE);
389  Buttons[i++] = CreatePushButton("Width -",70,101,WS_VISIBLE);
390 
391  Buttons[i++] = CreatePushButton("Heigth +",70,102,WS_VISIBLE);
392  Buttons[i++] = CreatePushButton("Heigth -",70,103,WS_VISIBLE);
393 
397 
398 
399  /* ---- The 1st page of buttons ---- */
400 
401  xButPos = 0;
402  yButPos = 10;
403 
404  for (i = 0 ; i < 14 ; i++)
406 
407  xButPos += CHECKBUTWIDTH + 10;
408  yButPos = 10;
409 
410  for (; i < 26 ; i++)
412 
413  Back1But = CreatePushButton("Back - destroys ComboBox",CHECKBUTWIDTH,INITPAGE_ID,0);
415 
416  /* ---- The 2nd page of buttons ------*/
417 
418  xButPos = 0;
419  yButPos = 10;
420 
421  for (; i<40; i++)
423 
424  xButPos += CHECKBUTWIDTH + 10;
425  yButPos = 10;
426 
427  for (; i < MAXMESSAGEBUTTONS ; i++)
429 
431 
432  break;
433 
434  case WM_COMMAND:
435  if (LOWORD(wParam) >= 600)
436  {
437  Msg[LOWORD(wParam)-600].Handler(hwndEdit,
438  Msg[LOWORD(wParam)-600].MsgCode,
439  Msg[LOWORD(wParam)-600].wParam,
440  Msg[LOWORD(wParam)-600].lParam);
441  break;
442  }
443 
444  switch(LOWORD(wParam)){
445 
446  case 100:
447  ControlWidth += 10;
448  break;
449 
450  case 101:
451  ControlWidth -= 10;
452  break;
453 
454  case 102:
455  ControlHeight += 10;
456  break;
457 
458  case 103:
459  ControlHeight -= 10;
460  break;
461 
462  case INITPAGE_ID:
464  break;
465 
466  case SECONDPAGE_ID:
468  break;
469 
470  case BACKFIRSTPAGE_ID:
471  BackToFirstPage();
472  break;
473 
474  case CREATEWINDOW_ID:
475  ReadNHide();
478  NULL,
480  CONTROLPOSX,
481  CONTROLPOSY,
482  ControlWidth,
484  g_hwnd,
485  NULL,
486  g_hInst,
487  NULL);
488  break;
489 
490  case CREATEWINDOWEX_ID:
491  ReadNHide();
494  CONTROLCLASS,
495  NULL,
497  CONTROLPOSX,
498  CONTROLPOSY,
499  ControlWidth,
501  g_hwnd,
502  NULL,
503  g_hInst,
504  NULL);
505  break;
506 
507  case CREATEWINDOWW_ID:
508  ReadNHide();
512  NULL,
514  CONTROLPOSX,
515  CONTROLPOSY,
516  ControlWidth,
518  g_hwnd,
519  NULL,
520  g_hInst,
521  NULL);
522  break;
523  }
524 
525  if (lParam == (LPARAM)hwndEdit)
526  switch(HIWORD(wParam))
527  {
528  case CBN_DROPDOWN:
530  PrintTextXY("CBN_DROPDOWN notification",NOTIFYX,NOTIFYY,25,srect);
531  break;
532 
533  case CBN_CLOSEUP:
535  PrintTextXY("CBN_CLOSEUP notification",NOTIFYX,NOTIFYY,24,srect);
536  break;
537 
538  case CBN_DBLCLK:
540  PrintTextXY("CBN_DBLCLK notification",NOTIFYX,NOTIFYY,23,srect);
541  break;
542 
543  case CBN_EDITCHANGE:
545  PrintTextXY("CBN_EDITCHANGE notification",NOTIFYX,NOTIFYY,27,srect);
546  break;
547 
548  case (WORD)CBN_ERRSPACE:
550  PrintTextXY("CBN_ERRSPACE notification",NOTIFYX,NOTIFYY,25,srect);
551  break;
552 
553  case CBN_KILLFOCUS:
555  PrintTextXY("CBN_KILLFOCUS notification",NOTIFYX,NOTIFYY,26,srect);
556  break;
557 
558  case CBN_EDITUPDATE:
560  PrintTextXY("CBN_EDITUPDATE notification",NOTIFYX,NOTIFYY,27,srect);
561  break;
562 
563  case CBN_SELCHANGE:
565  PrintTextXY("CBN_SELCHANGE notification",NOTIFYX,NOTIFYY,26,srect);
566  break;
567 
568  case CBN_SELENDCANCEL:
570  PrintTextXY("CBN_SELENDCANCEL notification",NOTIFYX,NOTIFYY,29,srect);
571  break;
572 
573  case CBN_SETFOCUS:
575  PrintTextXY("CBN_SETFOCUS notification",NOTIFYX,NOTIFYY,25,srect);
576  break;
577 
578  case CBN_SELENDOK:
580  PrintTextXY("CBN_SELENDOK notification",NOTIFYX,NOTIFYY,25,srect);
581  break;
582  }
583 
584  return DefWindowProc ( hwnd, msg, wParam, lParam );
585 
586  case WM_MEASUREITEM:
588  PrintTextXY("WM_MEASUREITEM called",NOTIFYX,NOTIFYY,21,srect);
589  break;
590 
591  case WM_COMPAREITEM:
593  PrintTextXY("WM_COMPAREITEM called",NOTIFYX,NOTIFYY,21,srect);
594  break;
595 
596  case WM_DRAWITEM:
598  PrintTextXY("WM_DRAWITEM called",NOTIFYX,NOTIFYY,18,srect);
599  break;
600 
601  case WM_SIZE :
602  return 0;
603 
604  case WM_CLOSE:
606  return 0;
607 
608  case WM_QUERYENDSESSION:
609  return 0;
610 
611  case WM_DESTROY:
612  PostQuitMessage(0);
613  return 0;
614  }
615  return DefWindowProc ( hwnd, msg, wParam, lParam );
616  }
617 
618 
619 HWND
621  const char* className,
622  const char* title)
623  {
624  WNDCLASSEX wc;
625 
626 
627  g_hInst = hInst;
628 
629  wc.cbSize = sizeof (WNDCLASSEX);
630 
631  wc.lpfnWndProc = WndProc; /* window procedure */
632  wc.hInstance = hInst; /* owner of the class */
633 
634  wc.lpszClassName = className;
635  wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW );
636  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
637  wc.style = CS_HREDRAW | CS_VREDRAW;
638  wc.cbClsExtra = 0;
639  wc.cbWndExtra = 0;
640  wc.hIcon = 0;
641  wc.hIconSm = 0;
642  wc.lpszMenuName = 0;
643 
644  if ( !RegisterClassEx ( &wc ) )
645  return NULL;
646 
647  hwnd = CreateWindowEx (
648  0, /* dwStyleEx */
649  className, /* class name */
650  title, /* window title */
651 
652  WS_OVERLAPPEDWINDOW, /* dwStyle */
653 
654  1, /* x */
655  1, /* y */
656  WINDOWWIDTH, /* width */
657  WINDOWHEIGHT, /* height */
658  NULL, /* hwndParent */
659  NULL, /* hMenu */
660  hInst,
661  0
662  );
663 
664  if (!hwnd) return NULL;
665 
667  UpdateWindow (hwnd);
668 
669  return hwnd;
670  }
671 
672 int
673 WINAPI
674 WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow )
675  {
676  char className [] = "ComboBox Control Test";
677  MSG msg;
678 
679  RegisterAndCreateWindow ( hInst, className, "ComboBox Control Test" );
680 
681  while (GetMessage (&msg, NULL, 0, 0))
682  {
684  DispatchMessage (&msg);
685  }
686  return (int)msg.wParam;
687  }
#define CBS_OWNERDRAWFIXED
Definition: winuser.h:289
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define CB_GETTOPINDEX
Definition: winuser.h:1937
#define WS_DISABLED
Definition: pedump.c:621
#define DDL_READWRITE
Definition: winuser.h:418
#define CBS_SORT
Definition: winuser.h:292
#define CBN_SETFOCUS
Definition: winuser.h:1964
#define CB_SETITEMDATA
Definition: winuser.h:1948
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: winuser.h:3176
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define CB_GETLBTEXTLEN
Definition: winuser.h:1935
LPCSTR lpszMenuName
Definition: winuser.h:3184
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define CONTROLPOSX
Definition: combotst.c:58
#define RegisterClassEx
Definition: winuser.h:5738
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1927
#define MAXMESSAGEBUTTONS
Definition: combotst.c:233
static VOID HandlePrintReturnStr(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: combotst.c:103
HCURSOR hCursor
Definition: winuser.h:3182
WNDPROC lpfnWndProc
Definition: winuser.h:3177
#define CreateWindow
Definition: winuser.h:5655
HINSTANCE g_hInst
Definition: combotst.c:48
#define CREATEWINDOWW_ID
Definition: combotst.c:25
HDC WINAPI GetDC(_In_opt_ HWND)
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1944
LPCSTR lpszClassName
Definition: winuser.h:3185
#define CB_SETHORIZONTALEXTENT
Definition: winuser.h:1947
#define CB_GETLBTEXT
Definition: winuser.h:1934
#define SW_HIDE
Definition: winuser.h:762
#define CB_GETITEMDATA
Definition: winuser.h:1932
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
VOID ForwardToSecondPage()
Definition: combotst.c:334
#define WM_QUERYENDSESSION
Definition: winuser.h:1604
static HDC
Definition: imagelist.c:92
int yButPos
Definition: combotst.c:52
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI UpdateWindow(_In_ HWND)
GLdouble n
Definition: glext.h:7729
LONG top
Definition: windef.h:292
#define DDL_DIRECTORY
Definition: winuser.h:422
#define CONTROLPOSY
Definition: combotst.c:59
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define WM_PASTE
Definition: winuser.h:1845
#define CS_HREDRAW
Definition: winuser.h:648
HWND CreatePushButton(const char *lpWindowName, DWORD xSize, DWORD id, DWORD Style)
Definition: combotst.c:294
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define INITPAGE_ID
Definition: combotst.c:26
UINT_PTR WPARAM
Definition: windef.h:207
#define CBS_AUTOHSCROLL
Definition: winuser.h:281
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3186
LONG left
Definition: windef.h:291
#define DDL_ARCHIVE
Definition: winuser.h:423
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CREATEWINDOW_ID
Definition: combotst.c:23
#define CBS_OEMCONVERT
Definition: winuser.h:288
char * LPSTR
Definition: xmlstorage.h:182
LONG right
Definition: windef.h:293
BOOL WINAPI DestroyWindow(_In_ HWND)
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
#define CBS_OWNERDRAWVARIABLE
Definition: winuser.h:290
HWND g_hwnd
Definition: combotst.c:47
#define WINDOWHEIGHT
Definition: combotst.c:20
VOID htoa(unsigned int val, char *buf)
Definition: utils.c:10
#define DDL_HIDDEN
Definition: winuser.h:420
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define CB_SETITEMHEIGHT
Definition: winuser.h:1949
BOOL WINAPI ScrollWindow(_In_ HWND, _In_ int, _In_ int, _In_opt_ LPCRECT, _In_opt_ LPCRECT)
static VOID HandlePrintReturnHex(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: combotst.c:90
#define ResultX
Definition: combotst.c:31
#define CB_GETEDITSEL
Definition: winuser.h:1929
#define NOTIFYY
Definition: combotst.c:36
#define CB_INITSTORAGE
Definition: winuser.h:1938
#define WINDOWWIDTH
Definition: combotst.c:19
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 BACKFIRSTPAGE_ID
Definition: combotst.c:28
#define CB_GETDROPPEDWIDTH
Definition: winuser.h:1928
struct @1576 Msg[]
#define DDL_READONLY
Definition: winuser.h:419
HINSTANCE hInstance
Definition: winuser.h:3180
#define CBN_SELENDOK
Definition: winuser.h:1963
#define CB_SHOWDROPDOWN
Definition: winuser.h:1952
#define CBN_KILLFOCUS
Definition: winuser.h:1960
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD MsgCode
Definition: combotst.c:137
#define CBS_SIMPLE
Definition: winuser.h:291
#define CreateWindowEx
Definition: winuser.h:5656
#define CB_ADDSTRING
Definition: winuser.h:1918
#define CB_INSERTSTRING
Definition: winuser.h:1939
#define CBN_DBLCLK
Definition: winuser.h:1955
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: combotst.c:369
VOID ReadNHide()
Definition: combotst.c:315
smooth NULL
Definition: ftsmooth.c:416
unsigned char
Definition: typeof.h:29
#define BS_AUTOCHECKBOX
Definition: pedump.c:654
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3175
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
#define BM_GETCHECK
Definition: winuser.h:1900
#define CB_LIMITTEXT
Definition: winuser.h:1940
#define SW_SHOW
Definition: winuser.h:769
VOID BackToFirstPage()
Definition: combotst.c:346
#define CREATEWINDOWEX_ID
Definition: combotst.c:24
#define CB_RESETCONTENT
Definition: winuser.h:1941
int pos
Definition: combotst.c:50
#define CBS_HASSTRINGS
Definition: winuser.h:285
HBRUSH hbrBackground
Definition: winuser.h:3183
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define ResultY
Definition: combotst.c:32
static VOID HandlePrintRect(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: combotst.c:116
HWND RegisterAndCreateWindow(HINSTANCE hInst, const char *className, const char *title)
Definition: combotst.c:620
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow)
Definition: combotst.c:674
#define NUMBERBUTTONS
Definition: combotst.c:266
#define CS_VREDRAW
Definition: winuser.h:653
DWORD EndP
Definition: combotst.c:68
#define CB_GETDROPPEDCONTROLRECT
Definition: winuser.h:1926
struct @1577 Styles[]
#define CBN_EDITCHANGE
Definition: winuser.h:1957
const DWORD Style
Definition: appswitch.c:71
RECT rect
Definition: combotst.c:67
#define WM_SIZE
Definition: winuser.h:1593
#define NUMBERCHECKS
Definition: combotst.c:264
#define UlongToHandle(ul)
Definition: basetsd.h:97
DWORD ComboStyle
Definition: combotst.c:55
#define WM_CLOSE
Definition: winuser.h:1603
#define WINAPI
Definition: msvc.h:8
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
static RECT srect
Definition: combotst.c:63
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WM_MEASUREITEM
Definition: winuser.h:1628
int cbWndExtra
Definition: winuser.h:3179
#define SECONDPAGE_ID
Definition: combotst.c:27
#define CBN_SELENDCANCEL
Definition: winuser.h:1962
#define WS_HSCROLL
Definition: pedump.c:628
#define CB_GETHORIZONTALEXTENT
Definition: winuser.h:1931
int ret
HICON hIcon
Definition: winuser.h:3181
#define CBN_ERRSPACE
Definition: winuser.h:1959
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)
HDC hdc
Definition: main.c:9
#define DDL_DRIVES
Definition: winuser.h:425
#define CB_SELECTSTRING
Definition: winuser.h:1942
#define COLOR_BTNFACE
Definition: winuser.h:918
DWORD Code
Definition: combotst.c:238
#define LongToHandle(h)
Definition: basetsd.h:82
GLenum GLsizei len
Definition: glext.h:6722
#define CB_SETTOPINDEX
Definition: winuser.h:1951
#define CB_SETCURSEL
Definition: winuser.h:1943
#define WM_COMMAND
Definition: winuser.h:1722
HWND Buttons[NUMBERBUTTONS]
Definition: combotst.c:267
void PrintTextXY(char *Text, int x, int y, int len, RECT rect)
Definition: combotst.c:76
HWND MessageButtons[MAXMESSAGEBUTTONS]
Definition: combotst.c:268
int xButPos
Definition: combotst.c:53
#define LoadCursor
Definition: winuser.h:5713
#define BS_PUSHBUTTON
Definition: pedump.c:651
#define CBS_UPPERCASE
Definition: winuser.h:293
HWND NextBut
Definition: combotst.c:270
DWORD StartP
Definition: combotst.c:68
HWND hwndEdit
Definition: combotst.c:65
#define CBN_DROPDOWN
Definition: winuser.h:1956
int cbClsExtra
Definition: winuser.h:3178
#define WM_COMPAREITEM
Definition: winuser.h:1637
HINSTANCE hInst
Definition: dxdiag.c:13
HWND Back1But
Definition: combotst.c:269
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define CB_DIR
Definition: winuser.h:1920
#define DDL_SYSTEM
Definition: winuser.h:421
#define SCROLLAMOUNT
Definition: combotst.c:40
#define CB_SETEDITSEL
Definition: winuser.h:1945
#define CBS_LOWERCASE
Definition: winuser.h:286
HWND CreateCheckButton(const char *lpWindowName, DWORD xSize, DWORD id)
Definition: combotst.c:273
LPFUNCTIONHANDLER Handler
Definition: combotst.c:140
#define CHECKBUTWIDTH
Definition: combotst.c:39
#define CBS_DROPDOWN
Definition: winuser.h:283
HWND hwnd
Definition: combotst.c:69
#define CB_SETEXTENDEDUI
Definition: winuser.h:1946
#define CB_GETLOCALE
Definition: winuser.h:1936
unsigned int UINT
Definition: ndis.h:50
#define WS_VSCROLL
Definition: pedump.c:627
char * Name
Definition: combotst.c:237
VOID BackToInitialPage()
Definition: combotst.c:357
#define GetMessage
Definition: winuser.h:5691
#define CBN_SELCHANGE
Definition: winuser.h:1961
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define BST_CHECKED
Definition: winuser.h:197
char AddString[]
Definition: combotst.c:71
#define WM_DRAWITEM
Definition: winuser.h:1627
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
#define CONTROLCLASS
Definition: combotst.c:16
char TextBuffer[BUFFERLEN]
Definition: combotst.c:45
#define SendMessage
Definition: winuser.h:5744
#define WM_CREATE
Definition: winuser.h:1590
#define CB_GETITEMHEIGHT
Definition: winuser.h:1933
HWND Back2But
Definition: combotst.c:269
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define CBN_EDITUPDATE
Definition: winuser.h:1958
#define HIWORD(l)
Definition: typedefs.h:246
#define TextOut
Definition: wingdi.h:4478
LONG bottom
Definition: windef.h:294
#define BUFFERLEN
Definition: combotst.c:44
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define CB_GETCOUNT
Definition: winuser.h:1924
#define CB_GETEXTENDEDUI
Definition: winuser.h:1930
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
FunctionHandler * LPFUNCTIONHANDLER
Definition: combotst.c:74
#define CB_DELETESTRING
Definition: winuser.h:1919
LONG_PTR LRESULT
Definition: windef.h:209
#define WS_VISIBLE
Definition: pedump.c:620
#define CBN_CLOSEUP
Definition: winuser.h:1954
#define CBS_NOINTEGRALHEIGHT
Definition: winuser.h:287
DWORD ControlHeight
Definition: combotst.c:61
#define CB_FINDSTRING
Definition: winuser.h:1921
LPARAM lParam
Definition: combotst.c:139
static char title[]
Definition: ps.c:92
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define NOTIFYX
Definition: combotst.c:35
void FunctionHandler(HWND, DWORD, WPARAM, LPARAM)
Definition: combotst.c:73
#define DDL_EXCLUSIVE
Definition: winuser.h:426
char * Text
Definition: combotst.c:136
DWORD ControlWidth
Definition: combotst.c:60
#define CONTROLCLASSW
Definition: combotst.c:17
#define CBS_DISABLENOSCROLL
Definition: winuser.h:282
#define SYSTEM_FIXED_FONT
Definition: wingdi.h:911
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922