Commit 7315afbc authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

comctl32/ipaddress: Only print an error when it actually occurs.

IPADDRESS_GetPartIndex() is also used for handling WM_KILLFOCUS and WM_SETFOCUS messages. In this case, it's actually expected that the window receiving or losing focus may not be a IP Address part window. Signed-off-by: 's avatarZhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a11ffeec
...@@ -130,7 +130,6 @@ static int IPADDRESS_GetPartIndex(const IPADDRESS_INFO *infoPtr, HWND hwnd) ...@@ -130,7 +130,6 @@ static int IPADDRESS_GetPartIndex(const IPADDRESS_INFO *infoPtr, HWND hwnd)
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
if (infoPtr->Part[i].EditHwnd == hwnd) return i; if (infoPtr->Part[i].EditHwnd == hwnd) return i;
ERR("We subclassed the wrong window! (hwnd=%p)\n", hwnd);
return -1; return -1;
} }
...@@ -503,7 +502,11 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -503,7 +502,11 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam); TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
if ( (index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0) return 0; if ((index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0)
{
ERR("We subclassed the wrong window! (hwnd=%p)\n", hwnd);
return 0;
}
part = &infoPtr->Part[index]; part = &infoPtr->Part[index];
if (uMsg == WM_CHAR || uMsg == WM_KEYDOWN) { if (uMsg == WM_CHAR || uMsg == WM_KEYDOWN) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment