ReactOS  0.4.13-dev-544-gede3fdd
edittest.c
Go to the documentation of this file.
1 /* Edit Control Test for ReactOS, quick n' dirty. Very rigid too.
2  * There you go, is only a test program. Not made to be fast, small
3  * easy to mantain, or portable. Lots of duplicated code too.
4 
5  * I'm not erasing text because I don't want to use other functions from th API
6  * or make this more complex.
7 
8  * This source code is in the PUBLIC DOMAIN and has NO WARRANTY.
9  * by Waldo Alvarez Caņizares <wac at ghost.matcom.uh.cu>, June 22, 2003. */
10 
11 //#define WIN32_LEAN_AND_MEAN
12 #include <windows.h>
13 #include "utils.h"
14 
15 #define CREATEWINDOW 106
16 #define CREATEWINDOWEX 107
17 #define CREATEWINDOWW 108
18 
19 #define ResultX 0
20 #define ResultY 305
21 
22 #define NOTIFYX 350
23 #define NOTIFYY 285
24 
25 #define BUFFERLEN 80 /* Size of buffer to hold result strings */
26 
27 /* Edit is created with this text */
28 #define TestStr "The quick brown fox jumps over the lazy dog"
29 
30 #define TestStrW L"This is a WCHAR string" /* Wide to support unicode edits */
31 
32 #define MAXMESSAGEBUTTONS 42
33 
36 
37 int pos = 10;
38 int n = 0;
39 int yButPos = 10;
40 int xButPos = 10;
41 
45 
47 
49 
50 POINTL point={10,3};
51 RECT rect = {0,0,20,20},rect2;
53 
54 #define ReplaceTextStr "->> Replaced!! <<-"
55 
56 char* AllocatedText; /* Buffer in the heap to feed it to the edit control */
57 char* NewText = "New text for the edit control";
58 wchar_t* NewTextW = L"New text for the edit control in UNICODE"; // Wide
59 
60 char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
61 
64 
65 VOID
66 PrintTextXY(char* Text,int x,int y,int len)
67 {
68  HDC hdc;
69  hdc = GetDC (g_hwnd);
71 
72  TextOut (hdc, x,y,Text,len);
73  ReleaseDC (g_hwnd, hdc);
75 }
76 
77 static
78 VOID
80  {
81  int ret;
83  htoa(ret,&TextBuffer[8]);
85  }
86 
87 static
88 VOID
90  {
91  LPVOID pMem;
92  HANDLE hNewBuffer;
93  int ret;
94 
96  if (UnicodeUsed)
97  {
98  hNewBuffer = LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT, 100);
99  pMem = LocalLock(hNewBuffer);
100  strcpyw_((wchar_t*)pMem,NewTextW);
101  }
102  else
103  {
104  hNewBuffer = LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,50);
105  pMem = LocalLock(hNewBuffer);
106  strcpy_((char*)pMem,NewText);
107  }
108 
109  LocalUnlock(pMem);
110  hNewBuffer = LocalHandle(pMem);
111 
112  /* Updates the buffer and displays new buffer */
113  ret = SendMessage(handle, EM_SETHANDLE, (WPARAM)hNewBuffer, 0L);
114 
115  htoa(ret,&TextBuffer[8]);
117  }
118 
119 static
120 VOID
122  {
123  int ret;
124  TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
127  }
128 
129 static
130 VOID
132  {
133  TextBuffer[8] = (char)(BUFFERLEN - 8); /* Setting the max size to put chars in first byte */
135 
136  htoa(rect.top,&TextBuffer[8]);
137  TextBuffer[8+8] = ' ';
138  htoa(rect.bottom,&TextBuffer[8+8+1]);
139  TextBuffer[8+8+8+1] = ' ';
140  htoa(rect.left,&TextBuffer[8+8+8+1+1]);
141  TextBuffer[8+8+8+8+1+1] = ' ';
142  htoa(rect.right,&TextBuffer[8+8+8+8+1+1+1]);
143 
145  }
146 
147 static
148 VOID
150  {
151  HDC hdc;
153 
154  int s;
155 
156  if (ret)
157  {
158  s = 1;
159  TextBuffer[8] = (char)(ret);
160  }
161  else
162  {
163  TextBuffer[8] = 'N';
164  TextBuffer[9] = 'U';
165  TextBuffer[10] = 'L';
166  TextBuffer[11] = 'L';
167  s = 4;
168  }
169 
170  hdc = GetDC (g_hwnd);
172 
174  ReleaseDC (g_hwnd, hdc);
176  }
177 
178 
179 struct
180 {
181  char* Text; /* Text for the button */
182  DWORD MsgCode; /* Message Code */
183  WPARAM wParam; /* Well hope you can understand this */
184  LPARAM lParam; /* ditto */
185  LPFUNCTIONHANDLER Handler; /* Funtion called to handle the result of each message */
186 }
187 Msg[] =
188 {
189  {"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex},
190  {"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex},
191  {"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex},
192  {"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex},
193  {"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex},
194 
195  {"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex},
196  {"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr},
197  {"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex},
198  {"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex},
199  {"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex},
200 
201  {"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex},
202  {"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex},
203 
205 
206  {"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex},
207 
208  {"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex},
209  {"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex},
210  {"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex},
211  {"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex},
212  {"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex},
213 
214  {"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex},
216 
217  {"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex},
218  {"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex},
219  {"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex},
220 
221  {"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex},
222  {"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex},
223  {"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar},
224  {"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex},
225  {"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex},
226 
227  {"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex},
228  {"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex},
229 
230  {"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect},
231  {"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex},
232  {"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex},
233  {"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex},
234 
235  {"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex},
236  {"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex},
237  {"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex},
238  {"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex},
239  {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
240 
241  {"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex},
242  {"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex}
243 
244 };
245 
251  };
252 
253 char* StyleNames[] = {
254  "WS_THICKFRAME","WS_DISABLED","WS_BORDER","ES_LOWERCASE","ES_UPPERCASE","ES_NUMBER","ES_AUTOVSCROLL",
255  "ES_AUTOHSCROLL","ES_LEFT","ES_CENTER","ES_RIGHT","ES_MULTILINE",
256  "ES_NOHIDESEL","ES_OEMCONVERT","ES_PASSWORD","ES_READONLY","ES_WANTRETURN",
257  "WS_HSCROLL","WS_VSCROLL"
258  };
259 
260 #define NUMBERBUTTONS 26
265 
266 
267 HWND
268 CreateCheckButton(const char* lpWindowName, DWORD xSize, DWORD id)
269  {
270  HWND h;
271  h = CreateWindowEx(0,
272  "BUTTON",
273  lpWindowName,
275  xButPos, /* x */
276  yButPos, /* y */
277  xSize, /* nWidth */
278  20, /* nHeight */
279  g_hwnd,
280  UlongToHandle(id),
281  g_hInst,
282  NULL
283  );
284  yButPos += 21;
285  return h;
286  }
287 
288 HWND
289 CreatePushButton(const char* lpWindowName, DWORD xSize, DWORD id,DWORD Style)
290  {
291 
292  HWND h = CreateWindow("BUTTON",
293  lpWindowName,
295  xButPos, // x
296  yButPos, // y
297  xSize, // nWidth
298  20, // nHeight
299  g_hwnd,
300  (HMENU)(ULONG_PTR) id,
301  g_hInst,
302  NULL
303  );
304 
305  yButPos += 21;
306  return h;
307  }
308 
309 VOID
311  {
312  int i;
313  EditStyle = 0;
314  for (i=0 ; i< 19 ; i++)
315  {
317  EditStyle |= EditStyles[i];
319  }
320 
321  for (; i< NUMBERBUTTONS ; i++)ShowWindow(Buttons[i],SW_HIDE);
322  for (i=0 ; i< 26 ; i++) ShowWindow(MessageButtons[i],SW_SHOW);
323 
326  }
327 
328 VOID
330  {
331  int i;
332  for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
335 
338  }
339 
340 VOID
342  {
343  int i;
344  for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_SHOW);
349  }
350 
351 VOID
353  {
354  int i;
356  for (i=0 ; i< NUMBERBUTTONS ; i++) {ShowWindow(Buttons[i],SW_SHOW);}
357  for (i=0;i<26;i++)ShowWindow(MessageButtons[i],SW_HIDE);
360  }
361 
362 LRESULT
363 CALLBACK
365 {
366  int i;
367  switch ( msg )
368  {
369  case WM_CREATE:
370  g_hwnd = hwnd;
371 
372  /* ---- Initial page ---- */
373 
374  for (i = 0 ; i < 14 ; i++)
375  Buttons[i] = CreateCheckButton(StyleNames[i],150,500+i);
376 
377  xButPos += 160;
378  yButPos = 10;
379 
380  for (; i < 19 ; i++)
381  Buttons[i] = CreateCheckButton(StyleNames[i],140,500+i);
382 
383  Buttons[i++] = CreatePushButton("Width +",70,100,WS_VISIBLE);
384  Buttons[i++] = CreatePushButton("Width -",70,101,WS_VISIBLE);
385 
386  Buttons[i++] = CreatePushButton("Heigth +",70,102,WS_VISIBLE);
387  Buttons[i++] = CreatePushButton("Heigth -",70,103,WS_VISIBLE);
388 
389  Buttons[i++] = CreatePushButton("CreateWindowA",140,CREATEWINDOW,WS_VISIBLE);
390  Buttons[i++] = CreatePushButton("CreateWindowExA",140,CREATEWINDOWEX,WS_VISIBLE);
391  Buttons[i++] = CreatePushButton("CreateWindowExW",140,CREATEWINDOWW,WS_VISIBLE);
392 
393 
394  /* ---- The 1st page of buttons ---- */
395 
396  xButPos = 0;
397  yButPos = 10;
398 
399  for (i = 0 ; i < 14 ; i++)
400  MessageButtons[i] = CreatePushButton(Msg[i].Text,170,600+i,0);
401 
402  xButPos += 180;
403  yButPos = 10;
404 
405  for (; i < 26 ; i++)
406  MessageButtons[i] = CreatePushButton(Msg[i].Text,170,600+i,0);
407 
408  Back1But = CreatePushButton("Back - destroys edit",170,400,0);
409  NextBut = CreatePushButton("Next",170,401,0);
410 
411  /* ---- The 2nd page of buttons ------*/
412 
413  xButPos = 0;
414  yButPos = 10;
415 
416  for (; i<40; i++)
417  MessageButtons[i] = CreatePushButton(Msg[i].Text,170,600+i,0);
418 
419  xButPos += 180;
420  yButPos = 10;
421 
422  for (; i < MAXMESSAGEBUTTONS ; i++)
423  MessageButtons[i] = CreatePushButton(Msg[i].Text,170,600+i,0);
424 
425  Back2But = CreatePushButton("Back",170,402,0);
426 
427  break;
428 
429  case WM_COMMAND:
430  if (LOWORD(wParam) >= 600)
431  {
432  Msg[LOWORD(wParam)-600].Handler(hwndEdit,
433  Msg[LOWORD(wParam)-600].MsgCode,
434  Msg[LOWORD(wParam)-600].wParam,
435  Msg[LOWORD(wParam)-600].lParam);
436  break;
437  }
438 
439  switch(LOWORD(wParam)){
440 
441  case 100:
442  EditWidth += 10;
443  break;
444 
445  case 101:
446  EditWidth -= 10;
447  break;
448 
449  case 102:
450  EditHeight += 10;
451  break;
452 
453  case 103:
454  EditHeight -= 10;
455  break;
456 
457  case 400:
459  break;
460 
461  case 401:
463  break;
464 
465  case 402:
466  BackToFirstPage();
467  break;
468 
469  case CREATEWINDOW:
470  UnicodeUsed = FALSE;
471  ReadNHide();
472  hwndEdit = CreateWindow("EDIT",
473  TestStr,
475  350,
476  10,
477  EditWidth,
478  EditHeight,
479  g_hwnd,
480  NULL,
481  g_hInst,
482  NULL);
483  break;
484 
485  case CREATEWINDOWEX:
486  UnicodeUsed = FALSE;
487  ReadNHide();
489  "EDIT",
490  TestStr,
492  350,
493  10,
494  EditWidth,
495  EditHeight,
496  g_hwnd,
497  NULL,
498  g_hInst,
499  NULL);
500  break;
501 
502  case CREATEWINDOWW:
503  UnicodeUsed = TRUE;
504  ReadNHide();
506  L"EDIT",
507  TestStrW,
509  350,
510  10,
511  EditWidth,
512  EditHeight,
513  g_hwnd,
514  NULL,
515  g_hInst,
516  NULL);
517  break;
518  }
519 
520  if (lParam == (LPARAM)hwndEdit)
521  switch(HIWORD(wParam))
522  {
523  case EN_CHANGE:
524  PrintTextXY("EN_CHANGE notification",NOTIFYX,NOTIFYY,22);
525  break;
526 
527  case EN_ERRSPACE:
528  PrintTextXY("EN_ERRSPACE notification",NOTIFYX,NOTIFYY,24);
529  break;
530 
531  /* --- FIXME not defined in w32api-2.3 headers
532  case H_SCROLL:
533  PrintTextXY("H_SCROLL notification",NOTIFYX,NOTIFYY,21);
534  break; */
535 
536  /* --- FIXME not defined in w32api-2.3 headers
537  case KILL_FOCUS:
538  PrintTextXY("KILL_FOCUS notification",NOTIFYX,NOTIFYY,23);
539  break; */
540 
541  /* --- FIXME not defined in w32api-2.3 headers
542  case EN_MAXTEST:
543  PrintTextXY("EN_MAXTEXT notification",NOTIFYX,NOTIFYY,23);
544  break; */
545 
546  case EN_SETFOCUS:
547  PrintTextXY("EN_SETFOCUS notification",NOTIFYX,NOTIFYY,24);
548  break;
549 
550  case EN_UPDATE:
551  PrintTextXY("EN_UPDATE notification",NOTIFYX,NOTIFYY + 20,22);
552  break;
553 
554  case EN_VSCROLL:
555  PrintTextXY("EN_VSCROLL notification",NOTIFYX,NOTIFYY,23);
556  break;
557 
558  }
559 
560  break;
561 
562  case WM_SIZE :
563  return 0;
564 
565  case WM_CLOSE:
567  return 0;
568 
569  case WM_QUERYENDSESSION:
570  return 0;
571 
572  case WM_DESTROY:
573  PostQuitMessage(0);
574  return 0;
575  }
576  return DefWindowProc ( hwnd, msg, wParam, lParam );
577 }
578 
579 HWND
581  const char* className,
582  const char* title)
583 {
584  WNDCLASSEX wc;
585  HWND hwnd;
586 
587  g_hInst = hInst;
588 
589  wc.cbSize = sizeof (WNDCLASSEX);
590 
591  wc.lpfnWndProc = WndProc; /* window procedure */
592  wc.hInstance = hInst; /* owner of the class */
593 
594  wc.lpszClassName = className;
595  wc.hCursor = LoadCursor ( 0, (LPCTSTR)IDC_ARROW );
596  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
597  wc.style = CS_HREDRAW | CS_VREDRAW;
598  wc.cbClsExtra = 0;
599  wc.cbWndExtra = 0;
600  wc.hIcon = 0;
601  wc.hIconSm = 0;
602  wc.lpszMenuName = 0;
603 
604  if ( !RegisterClassEx ( &wc ) )
605  return NULL;
606 
607  hwnd = CreateWindowEx (
608  0, /* dwStyleEx */
609  className, /* class name */
610  title, /* window title */
611 
612  WS_OVERLAPPEDWINDOW, /* dwStyle */
613 
614  1, /* x */
615  1, /* y */
616  560, /* width */
617  350, /* height */
618  NULL, /* hwndParent */
619  NULL, /* hMenu */
620  hInst,
621  0
622  );
623 
624  if (!hwnd) return NULL;
625 
627  UpdateWindow (hwnd);
628 
629  return hwnd;
630 }
631 
632 int
633 WINAPI
634 WinMain ( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow )
635 {
636  char className [] = "Edit Control Test";
637  MSG msg;
638 
639  RegisterAndCreateWindow ( hInst, className, "Edit Control Styles Test" );
640 
641  // Message loop
642  while (GetMessage (&msg, NULL, 0, 0))
643  {
645  DispatchMessage (&msg);
646  }
647  return msg.wParam;
648 
649 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define CREATEWINDOW
Definition: edittest.c:15
#define EM_LIMITTEXT
Definition: winuser.h:1961
#define ES_CENTER
Definition: pedump.c:665
#define WS_DISABLED
Definition: pedump.c:621
#define WS_THICKFRAME
Definition: pedump.c:630
char * AllocatedText
Definition: edittest.c:56
RECT rect2
Definition: edittest.c:51
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: winuser.h:3155
#define ReplaceTextStr
Definition: edittest.c:54
#define DispatchMessage
Definition: winuser.h:5631
VOID PrintTextXY(char *Text, int x, int y, int len)
Definition: edittest.c:66
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND MessageButtons[MAXMESSAGEBUTTONS]
Definition: edittest.c:262
HWND NextBut
Definition: edittest.c:264
LPCSTR lpszMenuName
Definition: winuser.h:3163
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define RegisterClassEx
Definition: winuser.h:5703
#define EM_LINELENGTH
Definition: winuser.h:1964
BOOL NTAPI LocalUnlock(HLOCAL hMem)
Definition: heapmem.c:1788
#define NOTIFYY
Definition: edittest.c:23
#define TestStr
Definition: edittest.c:28
VOID strcpyw_(wchar_t *dst, wchar_t *src)
Definition: utils.c:29
#define WM_CUT
Definition: winuser.h:1822
HCURSOR hCursor
Definition: winuser.h:3161
WNDPROC lpfnWndProc
Definition: winuser.h:3156
#define CreateWindow
Definition: winuser.h:5620
#define EM_SETMARGINS
Definition: winuser.h:1973
#define EM_SETREADONLY
Definition: winuser.h:1976
HDC WINAPI GetDC(_In_opt_ HWND)
static VOID HandlePrintReturnStr(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:121
LPCSTR lpszClassName
Definition: winuser.h:3164
#define CREATEWINDOWW
Definition: edittest.c:17
BOOL UnicodeUsed
Definition: edittest.c:46
#define SW_HIDE
Definition: winuser.h:762
HWND hwndEdit
Definition: edittest.c:48
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HWND Back1But
Definition: edittest.c:263
#define ES_MULTILINE
Definition: pedump.c:667
#define WM_QUERYENDSESSION
Definition: winuser.h:1604
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI UpdateWindow(_In_ HWND)
GLdouble n
Definition: glext.h:7729
LONG top
Definition: windef.h:292
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define WM_PASTE
Definition: winuser.h:1824
#define CS_HREDRAW
Definition: winuser.h:648
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
int yButPos
Definition: edittest.c:39
UINT_PTR WPARAM
Definition: windef.h:207
#define ES_READONLY
Definition: pedump.c:675
#define WS_CHILD
Definition: pedump.c:617
HICON hIconSm
Definition: winuser.h:3165
LONG left
Definition: windef.h:291
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CREATEWINDOWEX
Definition: edittest.c:16
#define ResultY
Definition: edittest.c:20
char * LPSTR
Definition: xmlstorage.h:182
WPARAM wParam
Definition: edittest.c:183
char * Text
Definition: edittest.c:181
LONG right
Definition: windef.h:293
BOOL WINAPI DestroyWindow(_In_ HWND)
HWND RegisterAndCreateWindow(HINSTANCE hInst, const char *className, const char *title)
Definition: edittest.c:580
POINTL point
Definition: edittest.c:50
HWND Back2But
Definition: edittest.c:263
VOID htoa(unsigned int val, char *buf)
Definition: utils.c:10
#define TestStrW
Definition: edittest.c:30
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define EM_SETHANDLE
Definition: winuser.h:1970
#define EM_CHARFROMPOS
Definition: richedit.h:78
#define EM_GETSEL
Definition: winuser.h:1958
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define EM_POSFROMCHAR
Definition: richedit.h:77
#define EM_GETPASSWORDCHAR
Definition: winuser.h:1956
#define ES_PASSWORD
Definition: pedump.c:670
VOID BackToFirstPage()
Definition: edittest.c:341
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 EN_SETFOCUS
Definition: winuser.h:1988
VOID ForwardToSecondPage()
Definition: edittest.c:329
void FunctionHandler(HWND, DWORD, WPARAM, LPARAM)
Definition: edittest.c:62
#define ES_RIGHT
Definition: pedump.c:666
HINSTANCE hInstance
Definition: winuser.h:3159
#define WM_COPY
Definition: winuser.h:1823
HWND Buttons[NUMBERBUTTONS]
Definition: edittest.c:261
unsigned int BOOL
Definition: ntddk_ex.h:94
#define NOTIFYX
Definition: edittest.c:22
#define BUFFERLEN
Definition: edittest.c:25
HWND CreatePushButton(const char *lpWindowName, DWORD xSize, DWORD id, DWORD Style)
Definition: edittest.c:289
int pos
Definition: edittest.c:37
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CreateWindowEx
Definition: winuser.h:5621
#define EC_LEFTMARGIN
Definition: winuser.h:2560
#define ES_WANTRETURN
Definition: pedump.c:676
#define ES_UPPERCASE
Definition: pedump.c:668
#define EM_GETMARGINS
Definition: winuser.h:1954
HWND CreateCheckButton(const char *lpWindowName, DWORD xSize, DWORD id)
Definition: edittest.c:268
smooth NULL
Definition: ftsmooth.c:416
#define EN_ERRSPACE
Definition: winuser.h:1984
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:3154
#define BM_GETCHECK
Definition: winuser.h:1879
#define SW_SHOW
Definition: winuser.h:769
DWORD EditHeight
Definition: edittest.c:44
HBRUSH hbrBackground
Definition: winuser.h:3162
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
VOID strcpy_(char *dst, const char *src)
Definition: utils.c:23
LPARAM lParam
Definition: edittest.c:184
HWND g_hwnd
Definition: edittest.c:34
#define ES_AUTOVSCROLL
Definition: pedump.c:671
#define CS_VREDRAW
Definition: winuser.h:653
DWORD EndP
Definition: edittest.c:52
#define NUMBERBUTTONS
Definition: edittest.c:260
#define EM_SETPASSWORDCHAR
Definition: winuser.h:1975
const DWORD Style
Definition: appswitch.c:71
#define LMEM_ZEROINIT
Definition: winbase.h:356
static VOID HandlePrintPasswdChar(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:149
#define WM_SIZE
Definition: winuser.h:1593
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define EM_SCROLL
Definition: winuser.h:1968
#define WM_CLOSE
Definition: winuser.h:1603
#define EM_GETLIMITTEXT
Definition: richedit.h:74
#define EM_GETMODIFY
Definition: winuser.h:1955
#define WINAPI
Definition: msvc.h:8
BOOL WINAPI ValidateRect(_In_opt_ HWND, _In_opt_ LPCRECT)
#define EM_SETSEL
Definition: winuser.h:1979
#define LMEM_MOVEABLE
Definition: winbase.h:350
unsigned long DWORD
Definition: ntddk_ex.h:95
char * StyleNames[]
Definition: edittest.c:253
int cbWndExtra
Definition: winuser.h:3158
struct @1576 Msg[]
#define ES_NOHIDESEL
Definition: pedump.c:673
#define WS_HSCROLL
Definition: pedump.c:628
DWORD MsgCode
Definition: edittest.c:182
static VOID HandlePrintRect(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:131
#define EM_LINESCROLL
Definition: winuser.h:1965
int ret
#define EM_SETRECTNP
Definition: winuser.h:1978
#define EM_UNDO
Definition: winuser.h:1982
HICON hIcon
Definition: winuser.h:3160
static const WCHAR L[]
Definition: oid.c:1250
VOID ReadNHide()
Definition: edittest.c:310
#define EM_EMPTYUNDOBUFFER
Definition: winuser.h:1946
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 COLOR_BTNFACE
Definition: winuser.h:918
#define EM_GETHANDLE
Definition: winuser.h:1950
#define EM_FMTLINES
Definition: winuser.h:1947
GLenum GLsizei len
Definition: glext.h:6722
DWORD EditWidth
Definition: edittest.c:43
GLdouble s
Definition: gl.h:2039
static VOID HandleSetHandlePrintHex(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:89
#define EM_SETMODIFY
Definition: winuser.h:1974
#define WM_COMMAND
Definition: winuser.h:1716
#define LoadCursor
Definition: winuser.h:5678
#define BS_PUSHBUTTON
Definition: pedump.c:651
char * NewText
Definition: edittest.c:57
char TextBuffer[BUFFERLEN]
Definition: edittest.c:60
#define EN_VSCROLL
Definition: winuser.h:1990
int cbClsExtra
Definition: winuser.h:3157
int xButPos
Definition: edittest.c:40
DWORD StartP
Definition: edittest.c:52
HINSTANCE hInst
Definition: dxdiag.c:13
#define WS_BORDER
Definition: pedump.c:625
HINSTANCE g_hInst
Definition: edittest.c:35
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define EM_SETRECT
Definition: winuser.h:1977
#define EM_LINEFROMCHAR
Definition: winuser.h:1962
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
LPVOID NTAPI LocalLock(HLOCAL hMem)
Definition: heapmem.c:1599
#define ES_NUMBER
Definition: winuser.h:301
FunctionHandler * LPFUNCTIONHANDLER
Definition: edittest.c:63
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdParam, int cmdShow)
Definition: edittest.c:634
unsigned int UINT
Definition: ndis.h:50
#define SB_LINEDOWN
Definition: winuser.h:565
#define EM_GETWORDBREAKPROC
Definition: winuser.h:1960
#define WS_VSCROLL
Definition: pedump.c:627
DWORD EditStyles[]
Definition: edittest.c:246
#define GetMessage
Definition: winuser.h:5656
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define BST_CHECKED
Definition: winuser.h:197
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
#define ES_OEMCONVERT
Definition: pedump.c:674
#define SendMessage
Definition: winuser.h:5709
#define EM_LINEINDEX
Definition: winuser.h:1963
#define WM_CREATE
Definition: winuser.h:1590
#define MAXMESSAGEBUTTONS
Definition: edittest.c:32
#define EM_GETRECT
Definition: winuser.h:1957
#define EM_GETLINE
Definition: winuser.h:1952
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
RECT rect
Definition: edittest.c:51
#define EM_CANUNDO
Definition: winuser.h:1944
#define HIWORD(l)
Definition: typedefs.h:246
#define TextOut
Definition: wingdi.h:4461
LONG bottom
Definition: windef.h:294
#define EN_UPDATE
Definition: winuser.h:1989
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:364
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
#define ResultX
Definition: edittest.c:19
HLOCAL NTAPI LocalHandle(LPCVOID pMem)
Definition: heapmem.c:1588
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5585
FunctionHandler * LPFUNCTIONHANDLER
Definition: combotst.c:74
#define WM_UNDO
Definition: winuser.h:1826
LONG_PTR LRESULT
Definition: windef.h:209
VOID BackToInitialPage()
Definition: edittest.c:352
#define ES_LEFT
Definition: pedump.c:664
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
wchar_t * NewTextW
Definition: edittest.c:58
static char title[]
Definition: ps.c:92
#define ES_AUTOHSCROLL
Definition: pedump.c:672
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define EM_GETFIRSTVISIBLELINE
Definition: winuser.h:1949
#define EM_REPLACESEL
Definition: winuser.h:1967
#define EM_SCROLLCARET
Definition: richedit.h:81
LPFUNCTIONHANDLER Handler
Definition: edittest.c:185
DWORD EditStyle
Definition: edittest.c:42
#define SYSTEM_FIXED_FONT
Definition: wingdi.h:911
static VOID HandlePrintReturnHex(HWND handle, DWORD Msg, WPARAM wParam, LPARAM lParam)
Definition: edittest.c:79
#define ES_LOWERCASE
Definition: pedump.c:669
#define EM_GETTHUMB
Definition: winuser.h:1959
#define EM_GETLINECOUNT
Definition: winuser.h:1953
#define EN_CHANGE
Definition: winuser.h:1983