for (n = 0 ; n < gd->num_prompts ; n++) {
Edit_GetText(GetDlgItem(hwnd, id), gd->prompts[n].reply->data,
gd->prompts[n].reply->length);
- gd->prompts[n].reply->length = strlen(gd->prompts[n].reply->data);
+ gd->prompts[n].reply->length = (unsigned)strlen(gd->prompts[n].reply->data);
id += 2;
}
/*
* The dialog callback.
*/
-static BOOL CALLBACK
+static INT_PTR CALLBACK
gic_dialog(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
{
DWORD err;
- err = RegSetValueEx(hkey, sub, 0, REG_SZ, (BYTE *)x, strlen(x) + 1);
+ err = RegSetValueEx(hkey, sub, 0, REG_SZ, (BYTE *)x, (DWORD)strlen(x) + 1);
if (err != ERROR_SUCCESS)
return -1;
return 4;
}
-static int
+static size_t
ADD_UNICODE_STRING(unsigned char *p, const char *s)
{
WORD *w;
- int i;
- int len;
+ size_t i;
+ size_t len;
w = (WORD *)p;
#define DWORD_ALIGN(p) { while ((DWORD)p % 4) *p++ = 0x00; }
-static int
+static size_t
ADD_DLGTEMPLATE(unsigned char *dlg, short x, short y, short cx, short cy,
const char *caption, const char *fontname, WORD fontsize,
WORD n)
return (p - dlg);
}
-static int
+static size_t
ADD_DLGITEM(unsigned char *dlg, short x, short y, short cx, short cy,
const char *label, WORD id, WORD type, DWORD style)
{
hdc = GetDC(GetDlgItem(hwnd, cid)); /* assume one label is the same as all the others */
for (n = 0 ; n < num_prompts ; n++) {
- GetTextExtentPoint32(hdc, prompts[n].prompt, strlen(prompts[n].prompt), &csize);
+ GetTextExtentPoint32(hdc, prompts[n].prompt, (int)strlen(prompts[n].prompt), &csize);
if (csize.cx > maxsize.cx)
maxsize.cx = csize.cx;
if (csize.cy > maxsize.cy)
hdc = GetDC(GetDlgItem(hwnd, id));
- GetTextExtentExPoint(hdc, p, strlen(p), cx, &nFit,
+ GetTextExtentExPoint(hdc, p, (int)strlen(p), cx, &nFit,
pDx, &csize);
banner_y += csize.cy;