info->windowName = HeapAlloc( GetProcessHeap(), 0, sizeof(L"#65535") );
if (info->windowName != NULL)
{
- wsprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1));
+ wsprintf((LPWSTR)info->windowName, L"#%u", GET_WORD(p + 1));
info->windowNameFree = TRUE;
}
else
int nIDDlgItem)
{
int i;
- HWND *list = WIN_ListChildren(hDlg);
+ HWND *list;
HWND ret = 0;
+ if (!hDlg) return 0;
+
+ list = WIN_ListChildren(hDlg);
if (!list) return 0;
for (i = 0; list[i]; i++) if (GetWindowLongPtrW(list[i], GWLP_ID) == nIDDlgItem) break;
{
HWND hWnd = GetDlgItem(hDlg, nIDDlgItem);
if ( hWnd ) return GetWindowTextA(hWnd, lpString, nMaxCount);
- if ( nMaxCount ) *lpString = 0;
+ if ( nMaxCount ) lpString[0] = '\0';
return 0;
}
{
HWND hWnd = GetDlgItem(hDlg, nIDDlgItem);
if ( hWnd ) return GetWindowTextW(hWnd, lpString, nMaxCount);
- if ( nMaxCount ) *lpString = 0;
+ if ( nMaxCount ) lpString[0] = '\0';
return 0;
}