| 948 | | SendMessage(pDest, EM_LINESCROLL, 0, 1000); |
| 949 | | // SendMessage( pDest, WM_VSCROLL, SB_BOTTOM, 0 ); |
| | 948 | //SendMessage(pDest, EM_LINESCROLL, 0, 1000); |
| | 949 | SendMessage(pDest, WM_VSCROLL, SB_BOTTOM, 0); |
| | 1353 | DWORD mask = SendDlgItemMessageW(pWindow, IDC_CHAT_OUT, EM_GETEVENTMASK, 0, 0); |
| | 1354 | SendDlgItemMessageW(pWindow, IDC_CHAT_OUT, EM_SETEVENTMASK, 0, mask | ENM_LINK); |
| | 1355 | SendDlgItemMessageW(pWindow, IDC_CHAT_OUT, EM_AUTOURLDETECT, TRUE, 0); |
| | 1356 | |
| 1701 | | case IDC_USER_LIST: |
| 1702 | | if(lNotMessage->code == LVN_ITEMCHANGED) { |
| 1703 | | lReturnValue = TRUE; |
| 1704 | | |
| 1705 | | // Select the game corresponding to the selected |
| 1706 | | mThis->SelectGameForUser(pWindow); |
| 1707 | | } |
| 1708 | | break; |
| 1709 | | } |
| 1710 | | } |
| 1711 | | break; |
| | 1705 | case IDC_USER_LIST: |
| | 1706 | if(lNotMessage->code == LVN_ITEMCHANGED) { |
| | 1707 | lReturnValue = TRUE; |
| | 1708 | |
| | 1709 | // Select the game corresponding to the selected |
| | 1710 | mThis->SelectGameForUser(pWindow); |
| | 1711 | } |
| | 1712 | break; |
| | 1713 | |
| | 1714 | case IDC_CHAT_OUT: |
| | 1715 | // User clicked on a link. |
| | 1716 | if (lNotMessage->code == EN_LINK) { |
| | 1717 | ENLINK *linkInfo = (ENLINK*)pLParam; |
| | 1718 | if (linkInfo->msg == WM_LBUTTONUP) { |
| | 1719 | CHARRANGE *chrg = &linkInfo->chrg; |
| | 1720 | int len = chrg->cpMax - chrg->cpMin; |
| | 1721 | wchar_t url[512] = { 0 }; |
| | 1722 | TEXTRANGEW range; |
| | 1723 | range.chrg.cpMin = chrg->cpMin; |
| | 1724 | range.chrg.cpMax = (len > 511) ? chrg->cpMin + 511 : chrg->cpMax; |
| | 1725 | range.lpstrText = url; |
| | 1726 | SendDlgItemMessageW(pWindow, IDC_CHAT_OUT, EM_GETTEXTRANGE, 0, (LPARAM)&range); |
| | 1727 | |
| | 1728 | // Open the URL in the browser. |
| | 1729 | //TODO: Move this to Util::OS. |
| | 1730 | //FIXME: Need to make sure we're only handling "http:", "https:", and "ftp:". |
| | 1731 | OutputDebugStringW(L"Opening URL: "); |
| | 1732 | OutputDebugStringW(range.lpstrText); |
| | 1733 | OutputDebugStringW(L"\n"); |
| | 1734 | ShellExecuteW(NULL, L"open", range.lpstrText, NULL, NULL, SW_SHOWNORMAL); |
| | 1735 | } |
| | 1736 | } |
| | 1737 | break; |
| | 1738 | } |
| | 1739 | } |
| | 1740 | break; |