Go to the source code of this file.
|
static INT | LengthOfStrResource (IN HINSTANCE hInst, IN UINT uID) |
|
INT | AllocAndLoadString (OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID) |
|
DWORD | LoadAndFormatString (IN HINSTANCE hInstance, IN UINT uID, OUT LPWSTR *lpTarget,...) |
|
BOOL | StatusBarLoadAndFormatString (IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID,...) |
|
BOOL | StatusBarLoadString (IN HWND hStatusBar, IN INT PartId, IN HINSTANCE hInstance, IN UINT uID) |
|
INT | GetTextFromEdit (OUT LPWSTR lpString, IN HWND hDlg, IN UINT Res) |
|
VOID | DisplayError (INT err) |
|
VOID | DisplayMessage (LPWSTR lpMsg) |
|
HIMAGELIST | InitImageList (UINT StartResource, UINT EndResource, UINT Width, UINT Height) |
|
DWORD | AnsiToUnicode (LPCSTR lpSrcStr, LPWSTR *lpDstStr) |
|
DWORD | UnicodeToAnsi (LPCWSTR lpSrcStr, LPSTR *lpDstStr) |
|
◆ AllocAndLoadString()
Definition at line 50 of file misc.c.
53{
55
57 uID);
58 if (ln++ > 0)
59 {
62 if ((*lpTarget) !=
NULL)
63 {
66 {
68 }
69 return Ret;
70 }
71 }
72 return 0;
73}
INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID)
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
◆ AnsiToUnicode()
Definition at line 267 of file misc.c.
269{
272
274
276 if (*lpDstStr)
277 {
279 0,
280 lpSrcStr,
281 -1,
282 *lpDstStr,
284 }
285
287}
ACPI_SIZE strlen(const char *String)
#define MultiByteToWideChar
GLuint GLsizei GLsizei * length
◆ DisplayError()
Definition at line 192 of file misc.c.
193{
195
203 0,
205
207
209}
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
◆ DisplayMessage()
Definition at line 211 of file misc.c.
212{
214}
#define MB_ICONEXCLAMATION
◆ GetTextFromEdit()
Definition at line 174 of file misc.c.
177{
180 {
182 Res,
183 lpString,
185 }
186 else
188
190}
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
int WINAPI GetWindowTextLengthW(_In_ HWND)
◆ InitImageList()
Definition at line 219 of file misc.c.
223{
228
229
233 EndResource - StartResource,
234 0);
235 if (hImageList ==
NULL)
237
238
239 for (
i = StartResource;
i <= EndResource;
i++)
240 {
248 goto fail;
249
252
254
255 if (Ret == -1)
256 goto fail;
257 }
258
259 return hImageList;
260
261fail:
264}
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
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
#define ImageList_AddIcon(himl, hicon)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI DestroyIcon(_In_ HICON)
◆ LengthOfStrResource()
Definition at line 14 of file misc.c.
16{
17 HRSRC hrSrc;
20
22 {
23 return -1;
24 }
25
26
28
29
33 {
35
36
37 uID &= 0xF;
38 for (
x = 0;
x < uID;
x++)
39 {
40 lpStr += (*lpStr) + 1;
41 }
42
43
44 return (int)(*lpStr);
45 }
46 return -1;
47}
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
GLint GLint GLint GLint GLint x
◆ LoadAndFormatString()
Definition at line 76 of file misc.c.
80{
84
87 uID) > 0)
88 {
90
91
94 0,
95 0,
97 0,
98 &lArgs);
100
102 }
103
104 return Ret;
105}
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
#define FORMAT_MESSAGE_FROM_STRING
◆ StatusBarLoadAndFormatString()
Definition at line 108 of file misc.c.
113{
117
120 uID) > 0)
121 {
123
124
127 0,
128 0,
130 0,
131 &lArgs);
133
135 {
141 }
142
144 }
145
146 return Ret;
147}
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
◆ StatusBarLoadString()
Definition at line 150 of file misc.c.
154{
157
160 uID) > 0)
161 {
167 }
168
169 return Ret;
170}
◆ UnicodeToAnsi()
Definition at line 290 of file misc.c.
292{
295
297
299 if (*lpDstStr)
300 {
302 0,
303 lpSrcStr,
304 -1,
305 *lpDstStr,
309 }
310
312}
#define WideCharToMultiByte
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)