Added link to info in dialog_windows.c; removed TODOs in area_window.c and basicctrls_windows.c that I decided were fine as they were; more TODOs otherwise.

This commit is contained in:
Pietro Gagliardi 2014-08-25 23:35:20 -04:00
parent 3648d379c6
commit e7490ce49b
3 changed files with 5 additions and 4 deletions

View File

@ -374,21 +374,21 @@ static LRESULT CALLBACK areaWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
areaMouseEvent(hwnd, data, 1, TRUE, heldButtons, lParam); areaMouseEvent(hwnd, data, 1, TRUE, heldButtons, lParam);
return 0; return 0;
case WM_MBUTTONDOWN: case WM_MBUTTONDOWN:
SetFocus(hwnd); // TODO correct? SetFocus(hwnd);
areaMouseEvent(hwnd, data, 2, FALSE, heldButtons, lParam); areaMouseEvent(hwnd, data, 2, FALSE, heldButtons, lParam);
return 0; return 0;
case WM_MBUTTONUP: case WM_MBUTTONUP:
areaMouseEvent(hwnd, data, 2, TRUE, heldButtons, lParam); areaMouseEvent(hwnd, data, 2, TRUE, heldButtons, lParam);
return 0; return 0;
case WM_RBUTTONDOWN: case WM_RBUTTONDOWN:
SetFocus(hwnd); // TODO correct? SetFocus(hwnd);
areaMouseEvent(hwnd, data, 3, FALSE, heldButtons, lParam); areaMouseEvent(hwnd, data, 3, FALSE, heldButtons, lParam);
return 0; return 0;
case WM_RBUTTONUP: case WM_RBUTTONUP:
areaMouseEvent(hwnd, data, 3, TRUE, heldButtons, lParam); areaMouseEvent(hwnd, data, 3, TRUE, heldButtons, lParam);
return 0; return 0;
case WM_XBUTTONDOWN: case WM_XBUTTONDOWN:
SetFocus(hwnd); // TODO correct? SetFocus(hwnd);
// values start at 1; we want them to start at 4 // values start at 1; we want them to start at 4
which = (DWORD) GET_XBUTTON_WPARAM(wParam) + 3; which = (DWORD) GET_XBUTTON_WPARAM(wParam) + 3;
heldButtons = (uintptr_t) GET_KEYSTATE_WPARAM(wParam); heldButtons = (uintptr_t) GET_KEYSTATE_WPARAM(wParam);

View File

@ -111,7 +111,7 @@ void textfieldSetAndShowInvalidBalloonTip(HWND hwnd, WCHAR *text)
ZeroMemory(&ti, sizeof (EDITBALLOONTIP)); ZeroMemory(&ti, sizeof (EDITBALLOONTIP));
ti.cbStruct = sizeof (EDITBALLOONTIP); ti.cbStruct = sizeof (EDITBALLOONTIP);
ti.pszTitle = L"Invalid Input"; // TODO verify ti.pszTitle = L"Invalid Input"; // TODO this is necessary for the icon to show up; figure out some language-neutral thing
ti.pszText = text; ti.pszText = text;
ti.ttiIcon = TTI_ERROR; ti.ttiIcon = TTI_ERROR;
if (SendMessageW(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM) (&ti)) == FALSE) if (SendMessageW(hwnd, EM_SHOWBALLOONTIP, 0, (LPARAM) (&ti)) == FALSE)

View File

@ -8,6 +8,7 @@ static LRESULT CALLBACK dialogSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
switch (uMsg) { switch (uMsg) {
case WM_COMMAND: case WM_COMMAND:
// we must re-enable other windows in the right order (see http://blogs.msdn.com/b/oldnewthing/archive/2004/02/27/81155.aspx) // we must re-enable other windows in the right order (see http://blogs.msdn.com/b/oldnewthing/archive/2004/02/27/81155.aspx)
// see http://stackoverflow.com/questions/25494914/is-there-something-like-cdn-filecancel-analogous-to-cdn-fileok-for-getting-when
if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDCANCEL) if (HIWORD(wParam) == BN_CLICKED && LOWORD(wParam) == IDCANCEL)
SendMessageW(msgwin, msgEndModal, 0, 0); SendMessageW(msgwin, msgEndModal, 0, 0);
break; // let the dialog handle it now break; // let the dialog handle it now