Fixed some small issues in the C code of the Windows port.
This commit is contained in:
parent
868161b7f0
commit
307577889e
|
@ -11,7 +11,7 @@ LRESULT getWindowTextLen(HWND hwnd)
|
||||||
void getWindowText(HWND hwnd, WPARAM n, LPWSTR buf)
|
void getWindowText(HWND hwnd, WPARAM n, LPWSTR buf)
|
||||||
{
|
{
|
||||||
SetLastError(0);
|
SetLastError(0);
|
||||||
if (SendMessageW(hwnd, WM_GETTEXT, n + 1, (LPARAM) buf) != n)
|
if (SendMessageW(hwnd, WM_GETTEXT, n + 1, (LPARAM) buf) != (LRESULT) n)
|
||||||
xpanic("WM_GETTEXT did not copy the correct number of characters out", GetLastError());
|
xpanic("WM_GETTEXT did not copy the correct number of characters out", GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@ static LRESULT CALLBACK msgwinproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
DWORD makemsgwin(char **errmsg)
|
DWORD makemsgwin(char **errmsg)
|
||||||
{
|
{
|
||||||
WNDCLASSW wc;
|
WNDCLASSW wc;
|
||||||
HWND hwnd;
|
|
||||||
|
|
||||||
ZeroMemory(&wc, sizeof (WNDCLASSW));
|
ZeroMemory(&wc, sizeof (WNDCLASSW));
|
||||||
wc.lpfnWndProc = msgwinproc;
|
wc.lpfnWndProc = msgwinproc;
|
||||||
|
|
|
@ -28,7 +28,7 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
|
||||||
default:
|
default:
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
xmissedmsg("Window", "windowWinProc()", uMsg);
|
xmissedmsg("Window", "windowWndProc()", uMsg);
|
||||||
return 0; // unreached
|
return 0; // unreached
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue