Go to the source code of this file.
◆ GetSelectedComboBoxIndex()
VOID GetSelectedComboBoxIndex |
( |
HWND |
hwndDlg, |
|
|
INT |
nIdDlgItem, |
|
|
PINT |
pValue |
|
) |
| |
◆ GetSelectedComboBoxText()
Definition at line 176 of file misc.c.
181{
186
187
189 if (hChildWnd ==
NULL)
190 return;
191
192
195 {
196
198 }
199 else
200 {
201
202
203
205
206
209 {
210
212
213
215
217 }
218 }
219}
#define HeapFree(x, y, z)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by GetCurrencySetting(), GetNumberSetting(), and GetTimeSetting().
◆ InsSpacePos()
Definition at line 5 of file misc.c.
6{
11
13 if (pszDestStr ==
NULL)
15
16 wcscpy(pszDestStr, szInsStr);
17
18 nStrSize =
wcslen(szInsStr);
19
20 for (nStrCnt = 0; nStrCnt < nStrSize; nStrCnt++)
21 {
22 if (nStrCnt == nStrSize - nPos)
23 {
24 pszDestStr[nDestStrCnt] =
L' ';
25 nDestStrCnt++;
26 }
27
28 pszDestStr[nDestStrCnt] = szInsStr[nStrCnt];
29 nDestStrCnt++;
30 }
31
32 pszDestStr[nDestStrCnt] =
L'\0';
33
34 return pszDestStr;
35}
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define MAX_SAMPLES_STR_SIZE
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
Referenced by InsSpacesFmt().
◆ InsSpacesFmt()
Definition at line 39 of file misc.c.
40{
49
51 if (pszDestStr ==
NULL)
53
54 wcscpy(pszDestStr, szSourceStr);
55
56
57 if (!*szFmtStr)
58 return pszDestStr;
59
60
61 for (nFmtCount = 0; nFmtCount <=
wcslen(szFmtStr); nFmtCount++)
62 {
63 if (szFmtStr[nFmtCount] ==
L';' || szFmtStr[nFmtCount] ==
L'\0')
64 {
65 if (
_wtoi(szFmtVal) == 0 && !wasNul)
66 {
68 break;
69 }
70
71
72 if (wasNul)
73 {
74 nSpaceOffset += nLastVal;
75 }
76 else
77 {
78 nSpaceOffset +=
_wtoi(szFmtVal);
79 }
80
81 szFmtVal[nValCount] =
L'\0';
82 nValCount=0;
83
84
86 wcscpy(pszDestStr,pszTempStr);
88
89
90 if (!wasNul)
91 {
92 nSpaceOffset++;
93 nLastVal =
_wtoi(szFmtVal);
94 }
95 }
96 else
97 {
98 szFmtVal[nValCount++] = szFmtStr[nFmtCount];
99 }
100 }
101
102
103 if (wasNul && nLastVal != 0)
104 {
105 for (nFmtCount = nSpaceOffset + nLastVal; nFmtCount <
wcslen(pszDestStr); nFmtCount += nLastVal + 1)
106 {
108 wcscpy(pszDestStr, pszTempStr);
110 }
111 }
112
113 return pszDestStr;
114}
PWSTR InsSpacePos(PCWSTR szInsStr, const int nPos)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
Referenced by InitFieldDigNumCB().
◆ ReplaceSubStr()
Definition at line 118 of file misc.c.
121{
127
129 if (szDestStr ==
NULL)
131
132 nDestStrCnt = 0;
133 nFirstCharCnt = 0;
134
136
137 while (nFirstCharCnt <
wcslen(szSourceStr))
138 {
139 if (szSourceStr[nFirstCharCnt] == szTempl[0])
140 {
141 nSubStrCnt = 0;
142 for (nCharCnt = nFirstCharCnt; nCharCnt < nFirstCharCnt +
wcslen(szTempl); nCharCnt++)
143 {
144 if (szSourceStr[nCharCnt] == szTempl[nSubStrCnt])
145 {
146 nSubStrCnt++;
147 }
148 else
149 {
150 break;
151 }
152
153 if (
wcslen(szTempl) == nSubStrCnt)
154 {
155 wcscat(szDestStr, szStrToReplace);
156 nDestStrCnt =
wcslen(szDestStr);
157 nFirstCharCnt +=
wcslen(szTempl) - 1;
158 break;
159 }
160 }
161 }
162 else
163 {
164 szDestStr[nDestStrCnt++] = szSourceStr[nFirstCharCnt];
165 szDestStr[nDestStrCnt] =
L'\0';
166 }
167
168 nFirstCharCnt++;
169 }
170
171 return szDestStr;
172}
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
Referenced by InitLeadingZeroesCB(), InitNegNumFmtCB(), and SetShortDateFormat().