ReactOS 0.4.15-dev-7958-gcd0bb1a
date.c
Go to the documentation of this file.
1/*
2 * ReactOS
3 * Copyright (C) 2004 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19/*
20 * PROJECT: ReactOS International Control Panel
21 * FILE: dll/cpl/intl/date.c
22 * PURPOSE: Date property page
23 * PROGRAMMERS: Eric Kohl
24 * Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
25 */
26
27#include "intl.h"
28
29/* GLOBALS ******************************************************************/
30
31#define YEAR_STR_MAX_SIZE 5
32#define MAX_SHRT_DATE_SEPARATORS 3
33#define STD_DATE_SEP L"."
34#define YEAR_DIFF (99)
35#define MAX_YEAR (9999)
36
38
39/* FUNCTIONS ****************************************************************/
40
41/* If char is 'y' or 'M' or 'd' return TRUE, else FALSE */
42BOOL
44{
45 if ((alpha == L'y') || (alpha == L'M') || (alpha == L'd') || (alpha == L' '))
46 return TRUE;
47 else
48 return FALSE;
49}
50
51/* Find first date separator in string */
53FindDateSep(const WCHAR *szSourceStr)
54{
55 PWSTR pszFoundSep;
56 UINT nDateCompCount=0;
57 UINT nDateSepCount=0;
58
59 pszFoundSep = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, MAX_SAMPLES_STR_SIZE * sizeof(WCHAR));
60 if (pszFoundSep == NULL)
61 return NULL;
62
63 wcscpy(pszFoundSep,STD_DATE_SEP);
64
65 while (nDateCompCount < wcslen(szSourceStr))
66 {
67 if (!isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] != L'\''))
68 {
69 while (!isDateCompAl(szSourceStr[nDateCompCount]) && (szSourceStr[nDateCompCount] != L'\''))
70 {
71 pszFoundSep[nDateSepCount++] = szSourceStr[nDateCompCount];
72 nDateCompCount++;
73 }
74
75 pszFoundSep[nDateSepCount] = L'\0';
76 return pszFoundSep;
77 }
78
79 nDateCompCount++;
80 }
81
82 return pszFoundSep;
83}
84
85/* Replace given template in source string with string to replace and return received string */
86
87
88/* Setted up short date separator to registry */
89static BOOL
90SetShortDateSep(HWND hwndDlg, PWSTR pszShortDateSep)
91{
92 INT nSepStrSize;
93 INT nSepCount;
94
95 /* Get separator */
99 (LPARAM)pszShortDateSep);
100
101 /* Get separator string size */
102 nSepStrSize = wcslen(pszShortDateSep);
103
104 /* Check date components */
105 for (nSepCount = 0; nSepCount < nSepStrSize; nSepCount++)
106 {
107 if (iswalnum(pszShortDateSep[nSepCount]) || (pszShortDateSep[nSepCount] == L'\''))
108 {
110 return FALSE;
111 }
112 }
113
114 if (nSepStrSize == 0)
115 {
117 return FALSE;
118 }
119
120 return TRUE;
121}
122
123/* Setted up short date format to registry */
124static BOOL
125SetShortDateFormat(HWND hwndDlg, PWSTR pszShortDateFmt)
126{
127 WCHAR szShortDateSep[MAX_SAMPLES_STR_SIZE];
128 WCHAR szFoundDateSep[MAX_SAMPLES_STR_SIZE];
129 PWSTR pszResultStr;
130 PWSTR pszFoundSep;
131 BOOL OpenApostFlg = FALSE;
132 INT nFmtStrSize;
133 INT nDateCompCount;
134
135 /* Get format */
139 (LPARAM)pszShortDateFmt);
140
141 /* Get separator */
145 (LPARAM)szShortDateSep);
146
147 /* Get format-string size */
148 nFmtStrSize = wcslen(pszShortDateFmt);
149
150 /* Check date components */
151 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
152 {
153 if (pszShortDateFmt[nDateCompCount] == L'\'')
154 {
155 OpenApostFlg = !OpenApostFlg;
156 }
157
158 if (iswalnum(pszShortDateFmt[nDateCompCount]) &&
159 !isDateCompAl(pszShortDateFmt[nDateCompCount]) &&
160 !OpenApostFlg)
161 {
163 return FALSE;
164 }
165 }
166
167 if (OpenApostFlg || nFmtStrSize == 0)
168 {
170 return FALSE;
171 }
172
173 pszFoundSep = FindDateSep(pszShortDateFmt);
174 if (pszFoundSep != NULL)
175 {
176 /* Substring replacement of separator */
177 wcscpy(szFoundDateSep, pszFoundSep);
178 pszResultStr = ReplaceSubStr(pszShortDateFmt, szShortDateSep, szFoundDateSep);
179 if (pszResultStr != NULL)
180 {
181 wcscpy(pszShortDateFmt, pszResultStr);
182 HeapFree(GetProcessHeap(), 0, pszResultStr);
183 }
184
185 HeapFree(GetProcessHeap(), 0, pszFoundSep);
186 }
187
188 return TRUE;
189}
190
191/* Setted up long date format to registry */
192static BOOL
193SetLongDateFormat(HWND hwndDlg, PWSTR pszLongDateFmt)
194{
195 BOOL OpenApostFlg = FALSE;
196 INT nFmtStrSize;
197 INT nDateCompCount;
198
199 /* Get format */
203 (LPARAM)pszLongDateFmt);
204
205 /* Get format string size */
206 nFmtStrSize = wcslen(pszLongDateFmt);
207
208 /* Check date components */
209 for (nDateCompCount = 0; nDateCompCount < nFmtStrSize; nDateCompCount++)
210 {
211 if (pszLongDateFmt[nDateCompCount] == L'\'')
212 {
213 OpenApostFlg = !OpenApostFlg;
214 }
215
216 if (iswalnum(pszLongDateFmt[nDateCompCount]) &&
217 !isDateCompAl(pszLongDateFmt[nDateCompCount]) &&
218 !OpenApostFlg)
219 {
221 return FALSE;
222 }
223 }
224
225 if (OpenApostFlg || nFmtStrSize == 0)
226 {
228 return FALSE;
229 }
230
231 return TRUE;
232}
233
234/* Init short date separator control box */
235static VOID
237{
238 PWSTR ShortDateSepSamples[MAX_SHRT_DATE_SEPARATORS] =
239 {
240 L".",
241 L"/",
242 L"-"
243 };
244 INT nCBIndex;
245 INT nRetCode;
246
247 /* Clear all box content */
250 (WPARAM)0,
251 (LPARAM)0);
252
253 /* Create standard list of separators */
254 for (nCBIndex = 0; nCBIndex < MAX_SHRT_DATE_SEPARATORS; nCBIndex++)
255 {
258 0,
259 (LPARAM)ShortDateSepSamples[nCBIndex]);
260 }
261
262 /* Set current item to value from registry */
263 nRetCode = SendDlgItemMessageW(hwndDlg, IDC_SHRTDATESEP_COMBO,
265 -1,
266 (LPARAM)pGlobalData->szDateSep);
267
268 /* If it is not successful, add new value to list and select them */
269 if (nRetCode == CB_ERR)
270 {
273 0,
274 (LPARAM)pGlobalData->szDateSep);
277 -1,
278 (LPARAM)pGlobalData->szDateSep);
279 }
280}
281
282static BOOL CALLBACK
284{
287 0,
288 (LPARAM)lpTimeFormatString);
289
290 return TRUE;
291}
292
293/* Init short date control box */
294VOID
295InitShortDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
296{
297 INT nRetCode;
298
299 /* Limit text lengths */
303 0);
307 0);
308
309 /* Clear all box content */
312 (WPARAM)0,
313 (LPARAM)0);
314
315 /* Enumerate short date formats */
318
319 /* Set current item to value from registry */
320 nRetCode = SendDlgItemMessageW(hwndDlg, IDC_SHRTDATEFMT_COMBO,
322 -1,
323 (LPARAM)pGlobalData->szShortDateFormat);
324
325 /* If it is not successful, add new value to list and select them */
326 if (nRetCode == CB_ERR)
327 {
330 0,
331 (LPARAM)pGlobalData->szShortDateFormat);
334 -1,
335 (LPARAM)pGlobalData->szShortDateFormat);
336 }
337}
338
339/* Init long date control box */
340static VOID
341InitLongDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
342{
343 INT nRetCode;
344
345 /* Limit text length */
349 0);
350
351 /* Clear all box content */
354 (WPARAM)0,
355 (LPARAM)0);
356
357 /* Enumerate short long formats */
360
361 /* Set current item to value from registry */
362 nRetCode = SendDlgItemMessageW(hwndDlg, IDC_LONGDATEFMT_COMBO,
364 -1,
365 (LPARAM)pGlobalData->szLongDateFormat);
366
367 /* If it is not successful, add new value to list and select them */
368 if (nRetCode == CB_ERR)
369 {
372 0,
373 (LPARAM)pGlobalData->szLongDateFormat);
376 -1,
377 (LPARAM)pGlobalData->szLongDateFormat);
378 }
379}
380
381/* Set up max date value to registry */
382static VOID
383SetMaxDate(HWND hwndDlg, LCID lcid)
384{
385 WCHAR szMaxDateVal[YEAR_STR_MAX_SIZE];
386 HWND hWndYearSpin;
387 INT nSpinVal;
388
389 hWndYearSpin = GetDlgItem(hwndDlg, IDC_SCR_MAX_YEAR);
390
391 /* Get spin value */
392 nSpinVal = LOWORD(SendMessageW(hWndYearSpin,
394 0,
395 0));
396
397 /* convert to wide char */
398 _itow(nSpinVal, szMaxDateVal, DECIMAL_RADIX);
399
400 /* Save max date value */
401 SetCalendarInfoW(lcid,
403 48 , /* CAL_ITWODIGITYEARMAX */
404 (PCWSTR)szMaxDateVal);
405}
406
407/* Get max date value from registry set */
408static INT
410{
411 INT nMaxDateVal = 0;
412
413 GetCalendarInfoW(lcid,
415 CAL_ITWODIGITYEARMAX | CAL_RETURN_NUMBER,
416 NULL,
417 0, /* ret type - number */
418 (LPDWORD)&nMaxDateVal);
419
420 return nMaxDateVal;
421}
422
423/* Set's MIN data edit control value to MAX-99 */
424static VOID
426{
428 HWND hWndYearSpin;
429 INT nSpinVal;
430
431 hWndYearSpin = GetDlgItem(hwndDlg, IDC_SCR_MAX_YEAR);
432
433 /* Get spin value */
434 nSpinVal = LOWORD(SendMessageW(hWndYearSpin,
436 0,
437 0));
438
439 /* Set min year value */
440 wsprintf(OutBuffer, L"%d", (DWORD)nSpinVal - YEAR_DIFF);
443 0,
445}
446
447/* Init spin control */
448static VOID
450{
452 HWND hWndYearSpin;
453
454 /* Limit text lengths */
458 0);
462 0);
463
464 hWndYearSpin = GetDlgItem(hwndDlg, IDC_SCR_MAX_YEAR);
465
466 /* Init max date value */
467 wsprintf(OutBuffer, L"%04d", (DWORD)GetMaxDate(pGlobalData->UserLCID));
470 0,
472
473 /* Init min date value */
474 wsprintf(OutBuffer, L"%04d", (DWORD)GetMaxDate(pGlobalData->UserLCID) - YEAR_DIFF);
477 0,
479
480 /* Init updown control */
481 /* Set bounds */
482 SendMessageW(hWndYearSpin,
484 0,
486
487 /* Set current value */
488 SendMessageW(hWndYearSpin,
490 0,
491 MAKELONG(GetMaxDate(pGlobalData->UserLCID),0));
492}
493
494/* Update all date locale samples */
495static VOID
497 PGLOBALDATA pGlobalData)
498{
500
501 /* Get short date format sample */
502 GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
503 pGlobalData->szShortDateFormat, OutBuffer,
506 0, (LPARAM)OutBuffer);
507
508 /* Get long date sample */
509 GetDateFormatW(pGlobalData->UserLCID, 0, NULL,
510 pGlobalData->szLongDateFormat, OutBuffer,
514}
515
516
517static
518BOOL
520 HWND hwndDlg,
521 PGLOBALDATA pGlobalData)
522{
523 WCHAR szLongDateFormat[MAX_LONGDATEFORMAT];
524 WCHAR szShortDateFormat[MAX_SHORTDATEFORMAT];
525 WCHAR szDateSeparator[MAX_DATESEPARATOR];
526
527 if (!SetLongDateFormat(hwndDlg, szLongDateFormat) ||
528 !SetShortDateFormat(hwndDlg, szShortDateFormat) ||
529 !SetShortDateSep(hwndDlg, szDateSeparator))
530 {
531 return FALSE;
532 }
533
534 /* Store settings in global data */
535 wcscpy(pGlobalData->szLongDateFormat, szLongDateFormat);
536 wcscpy(pGlobalData->szShortDateFormat, szShortDateFormat);
537 wcscpy(pGlobalData->szDateSep, szDateSeparator);
538
539 return TRUE;
540}
541
542/* Property page dialog callback */
545 UINT uMsg,
548{
549 PGLOBALDATA pGlobalData;
550
551 pGlobalData = (PGLOBALDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
552
553 switch (uMsg)
554 {
555 case WM_INITDIALOG:
556 pGlobalData = (PGLOBALDATA)((LPPROPSHEETPAGE)lParam)->lParam;
557 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
558
559 InitMinMaxDateSpin(hwndDlg, pGlobalData);
560 UpdateDateLocaleSamples(hwndDlg, pGlobalData);
561 InitShortDateCB(hwndDlg, pGlobalData);
562 InitLongDateCB(hwndDlg, pGlobalData);
563 InitShortDateSepSamples(hwndDlg, pGlobalData);
564 /* TODO: Add other calendar types */
565 pGlobalData->bEnableYearNotification = TRUE;
566 break;
567
568 case WM_COMMAND:
569 switch (LOWORD(wParam))
570 {
572 if (HIWORD(wParam) == EN_CHANGE &&
573 pGlobalData != NULL &&
574 pGlobalData->bEnableYearNotification == TRUE)
575 {
576 SetMinDate(hwndDlg);
577
578 /* Enable the Apply button */
579 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
580 }
581 break;
582
588 if (HIWORD(wParam) == CBN_SELCHANGE ||
590 {
591 /* Enable the Apply button */
592 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
593 }
594 break;
595 }
596 break;
597
598 case WM_NOTIFY:
599 if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY)
600 {
601 if (GetDateSetting(hwndDlg, pGlobalData))
602 {
603 pGlobalData->bUserLocaleChanged = TRUE;
604 SetMaxDate(hwndDlg, pGlobalData->UserLCID);
605 UpdateDateLocaleSamples(hwndDlg, pGlobalData);
606 }
607 }
608 break;
609 }
610
611 return FALSE;
612}
613
614/* EOF */
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static VOID UpdateDateLocaleSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:496
static VOID SetMinDate(HWND hwndDlg)
Definition: date.c:425
LPTSTR FindDateSep(const WCHAR *szSourceStr)
Definition: date.c:53
static VOID InitShortDateSepSamples(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:236
#define YEAR_DIFF
Definition: date.c:34
INT_PTR CALLBACK DatePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: date.c:544
#define STD_DATE_SEP
Definition: date.c:33
#define MAX_YEAR
Definition: date.c:35
static INT GetMaxDate(LCID lcid)
Definition: date.c:409
#define YEAR_STR_MAX_SIZE
Definition: date.c:31
static VOID InitMinMaxDateSpin(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:449
BOOL isDateCompAl(WCHAR alpha)
Definition: date.c:43
static HWND hwndEnum
Definition: date.c:37
static BOOL GetDateSetting(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:519
static BOOL CALLBACK ShortDateFormatEnumProc(PWSTR lpTimeFormatString)
Definition: date.c:283
static BOOL SetShortDateFormat(HWND hwndDlg, PWSTR pszShortDateFmt)
Definition: date.c:125
static VOID SetMaxDate(HWND hwndDlg, LCID lcid)
Definition: date.c:383
static VOID InitLongDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:341
static BOOL SetLongDateFormat(HWND hwndDlg, PWSTR pszLongDateFmt)
Definition: date.c:193
VOID InitShortDateCB(HWND hwndDlg, PGLOBALDATA pGlobalData)
Definition: date.c:295
static BOOL SetShortDateSep(HWND hwndDlg, PWSTR pszShortDateSep)
Definition: date.c:90
#define MAX_SHRT_DATE_SEPARATORS
Definition: date.c:32
#define IDC_LONGDATESAMPLE_EDIT
Definition: resource.h:63
#define IDC_SECONDYEAR_EDIT
Definition: resource.h:55
#define IDC_SHRTDATESEP_COMBO
Definition: resource.h:62
#define IDC_HIJCHRON_COMBO
Definition: resource.h:58
#define IDC_LONGDATEFMT_COMBO
Definition: resource.h:65
#define IDS_ERROR_SYMBOL_FORMAT_LONG
Definition: resource.h:89
#define IDC_SHRTDATESAMPLE_EDIT
Definition: resource.h:59
#define IDC_CALTYPE_COMBO
Definition: resource.h:57
#define IDC_SHRTDATEFMT_COMBO
Definition: resource.h:61
#define IDC_FIRSTYEAR_EDIT
Definition: resource.h:54
#define IDS_ERROR_SYMBOL_SEPARATE
Definition: resource.h:87
#define IDC_SCR_MAX_YEAR
Definition: resource.h:56
#define IDS_ERROR_SYMBOL_FORMAT_SHORT
Definition: resource.h:88
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740
#define iswalnum(_c)
Definition: ctype.h:671
_CRTIMP wchar_t *__cdecl _itow(_In_ int _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
VOID PrintErrorMsgBox(UINT msg)
Definition: intl.c:51
PWSTR ReplaceSubStr(PCWSTR szSourceStr, PCWSTR szStrToReplace, PCWSTR szTempl)
Definition: misc.c:118
#define DECIMAL_RADIX
Definition: intl.h:19
#define MAX_LONGDATEFORMAT
Definition: intl.h:44
struct _GLOBALDATA * PGLOBALDATA
#define MAX_SHORTDATEFORMAT
Definition: intl.h:43
#define MAX_YEAR_EDIT
Definition: intl.h:46
#define MAX_DATESEPARATOR
Definition: intl.h:45
#define MAX_SAMPLES_STR_SIZE
Definition: intl.h:24
int WINAPI SetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPCWSTR lpCalData)
Definition: lcformat.c:2842
BOOL WINAPI EnumDateFormatsW(DATEFMT_ENUMPROCW proc, LCID lcid, DWORD flags)
Definition: lcformat.c:2033
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:993
int WINAPI GetCalendarInfoW(LCID Locale, CALID Calendar, CALTYPE CalType, LPWSTR lpCalData, int cchData, LPDWORD lpValue)
Definition: lcformat.c:2499
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_APPLY
Definition: prsht.h:117
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define UDM_SETPOS
Definition: commctrl.h:2143
#define UDM_SETRANGE
Definition: commctrl.h:2141
#define UDM_GETPOS
Definition: commctrl.h:2144
#define WM_NOTIFY
Definition: richedit.h:61
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
DWORD LCID
Definition: nls.h:13
WCHAR szShortDateFormat[MAX_SHORTDATEFORMAT]
Definition: intl.h:100
LCID UserLCID
Definition: intl.h:113
WCHAR szLongDateFormat[MAX_LONGDATEFORMAT]
Definition: intl.h:99
WCHAR szDateSep[MAX_DATESEPARATOR]
Definition: intl.h:101
Definition: inflate.c:139
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * PCWSTR
Definition: typedefs.h:57
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define CAL_GREGORIAN
Definition: winnls.h:443
#define DATE_LONGDATE
Definition: winnls.h:197
#define DATE_SHORTDATE
Definition: winnls.h:196
#define CB_SELECTSTRING
Definition: winuser.h:1960
#define EM_LIMITTEXT
Definition: winuser.h:2000
#define DWLP_USER
Definition: winuser.h:872
#define WM_COMMAND
Definition: winuser.h:1740
#define CB_ERR
Definition: winuser.h:2435
#define WM_GETTEXT
Definition: winuser.h:1618
#define CB_RESETCONTENT
Definition: winuser.h:1959
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CBN_SELCHANGE
Definition: winuser.h:1979
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETTEXT
Definition: winuser.h:1617
#define CB_ADDSTRING
Definition: winuser.h:1936
#define wsprintf
Definition: winuser.h:5865
HWND WINAPI GetParent(_In_ HWND)
#define CB_LIMITTEXT
Definition: winuser.h:1958
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CBN_EDITCHANGE
Definition: winuser.h:1975
#define EN_CHANGE
Definition: winuser.h:2022
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CHAR * LPTSTR
Definition: xmlstorage.h:192