FFFTPのソースコードです。
Revisión | 619b82a7a7f0c24da339c76ef9a102960ce928b0 (tree) |
---|---|
Tiempo | 2011-11-29 21:54:03 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Change the character code of windows into UTF-16 completely.
Add support for 64 bit Windows.
@@ -185,7 +185,9 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst) | ||
185 | 185 | |
186 | 186 | if(hWndListLocal != NULL) |
187 | 187 | { |
188 | - LocalProcPtr = (WNDPROC)SetWindowLong(hWndListLocal, GWL_WNDPROC, (LONG)LocalWndProc); | |
188 | + // 64ビット対応 | |
189 | +// LocalProcPtr = (WNDPROC)SetWindowLong(hWndListLocal, GWL_WNDPROC, (LONG)LocalWndProc); | |
190 | + LocalProcPtr = (WNDPROC)SetWindowLongPtr(hWndListLocal, GWL_WNDPROC, (LONG_PTR)LocalWndProc); | |
189 | 191 | |
190 | 192 | Tmp = SendMessage(hWndListLocal, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); |
191 | 193 | Tmp |= LVS_EX_FULLROWSELECT; |
@@ -234,7 +236,9 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst) | ||
234 | 236 | |
235 | 237 | if(hWndListRemote != NULL) |
236 | 238 | { |
237 | - RemoteProcPtr = (WNDPROC)SetWindowLong(hWndListRemote, GWL_WNDPROC, (LONG)RemoteWndProc); | |
239 | + // 64ビット対応 | |
240 | +// RemoteProcPtr = (WNDPROC)SetWindowLong(hWndListRemote, GWL_WNDPROC, (LONG)RemoteWndProc); | |
241 | + RemoteProcPtr = (WNDPROC)SetWindowLongPtr(hWndListRemote, GWL_WNDPROC, (LONG_PTR)RemoteWndProc); | |
238 | 242 | |
239 | 243 | Tmp = SendMessage(hWndListRemote, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); |
240 | 244 | Tmp |= LVS_EX_FULLROWSELECT; |
@@ -1123,32 +1127,50 @@ void GetListTabWidth(void) | ||
1123 | 1127 | |
1124 | 1128 | void SetListViewType(void) |
1125 | 1129 | { |
1126 | - long lStyle; | |
1130 | + // 64ビット対応 | |
1131 | +// long lStyle; | |
1132 | + LONG_PTR lStyle; | |
1127 | 1133 | |
1128 | 1134 | switch(ListType) |
1129 | 1135 | { |
1130 | 1136 | case LVS_LIST : |
1131 | - lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE); | |
1137 | + // 64ビット対応 | |
1138 | +// lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE); | |
1139 | + lStyle = GetWindowLongPtr(GetLocalHwnd(), GWL_STYLE); | |
1132 | 1140 | lStyle &= ~(LVS_REPORT | LVS_LIST); |
1133 | 1141 | lStyle |= LVS_LIST; |
1134 | - SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1142 | + // 64ビット対応 | |
1143 | +// SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1144 | + SetWindowLongPtr(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1135 | 1145 | |
1136 | - lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE); | |
1146 | + // 64ビット対応 | |
1147 | +// lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE); | |
1148 | + lStyle = GetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE); | |
1137 | 1149 | lStyle &= ~(LVS_REPORT | LVS_LIST); |
1138 | 1150 | lStyle |= LVS_LIST; |
1139 | - SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1151 | + // 64ビット対応 | |
1152 | +// SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1153 | + SetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1140 | 1154 | break; |
1141 | 1155 | |
1142 | 1156 | default : |
1143 | - lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE); | |
1157 | + // 64ビット対応 | |
1158 | +// lStyle = GetWindowLong(GetLocalHwnd(), GWL_STYLE); | |
1159 | + lStyle = GetWindowLongPtr(GetLocalHwnd(), GWL_STYLE); | |
1144 | 1160 | lStyle &= ~(LVS_REPORT | LVS_LIST); |
1145 | 1161 | lStyle |= LVS_REPORT; |
1146 | - SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1162 | + // 64ビット対応 | |
1163 | +// SetWindowLong(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1164 | + SetWindowLongPtr(GetLocalHwnd(), GWL_STYLE, lStyle); | |
1147 | 1165 | |
1148 | - lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE); | |
1166 | + // 64ビット対応 | |
1167 | +// lStyle = GetWindowLong(GetRemoteHwnd(), GWL_STYLE); | |
1168 | + lStyle = GetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE); | |
1149 | 1169 | lStyle &= ~(LVS_REPORT | LVS_LIST); |
1150 | 1170 | lStyle |= LVS_REPORT; |
1151 | - SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1171 | + // 64ビット対応 | |
1172 | +// SetWindowLong(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1173 | + SetWindowLongPtr(GetRemoteHwnd(), GWL_STYLE, lStyle); | |
1152 | 1174 | break; |
1153 | 1175 | } |
1154 | 1176 | return; |
@@ -3639,7 +3639,9 @@ static LRESULT CALLBACK TransDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM | ||
3639 | 3639 | /* ここに break はない */ |
3640 | 3640 | |
3641 | 3641 | case IDCANCEL : |
3642 | - if(!(Pkt = (TRANSPACKET*)GetWindowLong(hDlg, GWL_USERDATA))) | |
3642 | + // 64ビット対応 | |
3643 | +// if(!(Pkt = (TRANSPACKET*)GetWindowLong(hDlg, GWL_USERDATA))) | |
3644 | + if(!(Pkt = (TRANSPACKET*)GetWindowLongPtr(hDlg, GWL_USERDATA))) | |
3643 | 3645 | break; |
3644 | 3646 | Pkt->Abort = ABORT_USER; |
3645 | 3647 | // Canceled = YES; |
@@ -3655,7 +3657,9 @@ static LRESULT CALLBACK TransDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM | ||
3655 | 3657 | SetForegroundWindow(hDlg); |
3656 | 3658 | MoveToForeground = NO; |
3657 | 3659 | KillTimer(hDlg, TIMER_DISPLAY); |
3658 | - if(!(Pkt = (TRANSPACKET*)GetWindowLong(hDlg, GWL_USERDATA))) | |
3660 | + // 64ビット対応 | |
3661 | +// if(!(Pkt = (TRANSPACKET*)GetWindowLong(hDlg, GWL_USERDATA))) | |
3662 | + if(!(Pkt = (TRANSPACKET*)GetWindowLongPtr(hDlg, GWL_USERDATA))) | |
3659 | 3663 | break; |
3660 | 3664 | if(Canceled[Pkt->ThreadCount] == YES) |
3661 | 3665 | Pkt->Abort = ABORT_USER; |
@@ -3666,7 +3670,9 @@ static LRESULT CALLBACK TransDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM | ||
3666 | 3670 | |
3667 | 3671 | case WM_SET_PACKET : |
3668 | 3672 | // Pkt = (TRANSPACKET *)lParam; |
3669 | - SetWindowLong(hDlg, GWL_USERDATA, (LONG)lParam); | |
3673 | + // 64ビット対応 | |
3674 | +// SetWindowLong(hDlg, GWL_USERDATA, (LONG)lParam); | |
3675 | + SetWindowLongPtr(hDlg, GWL_USERDATA, (LONG_PTR)lParam); | |
3670 | 3676 | break; |
3671 | 3677 | } |
3672 | 3678 | return(FALSE); |
@@ -163,7 +163,9 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR | ||
163 | 163 | { |
164 | 164 | case WM_INITDIALOG : |
165 | 165 | /* TreeViewでのダブルクリックをつかまえるため */ |
166 | - HostListProcPtr = (WNDPROC)SetWindowLong(GetDlgItem(hDlg, HOST_LIST), GWL_WNDPROC, (LONG)HostListWndProc); | |
166 | + // 64ビット対応 | |
167 | +// HostListProcPtr = (WNDPROC)SetWindowLong(GetDlgItem(hDlg, HOST_LIST), GWL_WNDPROC, (LONG)HostListWndProc); | |
168 | + HostListProcPtr = (WNDPROC)SetWindowLongPtr(GetDlgItem(hDlg, HOST_LIST), GWL_WNDPROC, (LONG_PTR)HostListWndProc); | |
167 | 169 | |
168 | 170 | |
169 | 171 | // SetClassLong(hDlg, GCL_HICON, (LONG)LoadIcon(GetFtpInst(), MAKEINTRESOURCE(ffftp))); |
@@ -1669,7 +1671,9 @@ static int DispHostSetDlg(HWND hDlg) | ||
1669 | 1671 | |
1670 | 1672 | static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam) |
1671 | 1673 | { |
1672 | - long wStyle; | |
1674 | + // 64ビット対応 | |
1675 | +// long wStyle; | |
1676 | + LONG_PTR wStyle; | |
1673 | 1677 | char Tmp[FMAX_PATH+1]; |
1674 | 1678 | NMHDR *pnmhdr; |
1675 | 1679 |
@@ -1747,17 +1751,25 @@ static BOOL CALLBACK MainSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP | ||
1747 | 1751 | if(SendDlgItemMessage(hDlg, HSET_ANONYMOUS, BM_GETCHECK, 0, 0) == 1) |
1748 | 1752 | { |
1749 | 1753 | SendDlgItemMessage(hDlg, HSET_USER, WM_SETTEXT, 0, (LPARAM)"anonymous"); |
1750 | - wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1754 | + // 64ビット対応 | |
1755 | +// wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1756 | + wStyle = GetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1751 | 1757 | wStyle &= ~ES_PASSWORD; |
1752 | - SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1758 | + // 64ビット対応 | |
1759 | +// SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1760 | + SetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1753 | 1761 | SendDlgItemMessage(hDlg, HSET_PASS, WM_SETTEXT, 0, (LPARAM)UserMailAdrs); |
1754 | 1762 | } |
1755 | 1763 | else |
1756 | 1764 | { |
1757 | 1765 | SendDlgItemMessage(hDlg, HSET_USER, WM_SETTEXT, 0, (LPARAM)""); |
1758 | - wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1766 | + // 64ビット対応 | |
1767 | +// wStyle = GetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1768 | + wStyle = GetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE); | |
1759 | 1769 | wStyle |= ES_PASSWORD; |
1760 | - SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1770 | + // 64ビット対応 | |
1771 | +// SetWindowLong(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1772 | + SetWindowLongPtr(GetDlgItem(hDlg, HSET_PASS), GWL_STYLE, wStyle); | |
1761 | 1773 | SendDlgItemMessage(hDlg, HSET_PASS, WM_SETTEXT, 0, (LPARAM)""); |
1762 | 1774 | } |
1763 | 1775 | break; |
@@ -299,7 +299,9 @@ static int CellRectFromPoint(HWND hWnd, POINT point, RECT *cellrect, int *col) | ||
299 | 299 | int Ret; |
300 | 300 | |
301 | 301 | Ret = -1; |
302 | - if((GetWindowLong(hWnd, GWL_STYLE) & LVS_TYPEMASK) == LVS_REPORT ) | |
302 | + // 64ビット対応 | |
303 | +// if((GetWindowLong(hWnd, GWL_STYLE) & LVS_TYPEMASK) == LVS_REPORT ) | |
304 | + if((GetWindowLongPtr(hWnd, GWL_STYLE) & LVS_TYPEMASK) == LVS_REPORT ) | |
303 | 305 | { |
304 | 306 | row = ListView_GetTopIndex(hWnd); |
305 | 307 | bottom = row + ListView_GetCountPerPage(hWnd); |
@@ -632,13 +632,7 @@ static int MakeAllWindows(int cmdShow) | ||
632 | 632 | WinPosX = CW_USEDEFAULT; |
633 | 633 | WinPosY = 0; |
634 | 634 | } |
635 | - // UTF-8対応 | |
636 | - // ユーザー定義のクラスはデフォルトのWNDPROCがShift_JIS専用のため | |
637 | -// hWndFtp = CreateWindow(FtpClassStr, "FFFTP", | |
638 | -// WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, | |
639 | -// WinPosX, WinPosY, WinWidth, WinHeight, | |
640 | -// HWND_DESKTOP, 0, hInstFtp, NULL); | |
641 | - hWndFtp = CreateWindowA(FtpClassStr, "FFFTP", | |
635 | + hWndFtp = CreateWindow(FtpClassStr, "FFFTP", | |
642 | 636 | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, |
643 | 637 | WinPosX, WinPosY, WinWidth, WinHeight, |
644 | 638 | HWND_DESKTOP, 0, hInstFtp, NULL); |
@@ -845,6 +839,8 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
845 | 839 | { |
846 | 840 | PAINTSTRUCT ps; |
847 | 841 | LPTOOLTIPTEXT lpttt; |
842 | + // UTF-8対応 | |
843 | + LPTOOLTIPTEXTW wlpttt; | |
848 | 844 | RECT Rect; |
849 | 845 | |
850 | 846 | int TmpTransType; |
@@ -1410,8 +1406,13 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
1410 | 1406 | switch(((LPNMHDR)lParam)->code) |
1411 | 1407 | { |
1412 | 1408 | /* ツールチップコントロールメッセージの処理 */ |
1413 | - case TTN_NEEDTEXT: | |
1409 | + // UTF-8対応 | |
1410 | +// case TTN_NEEDTEXT: | |
1411 | + case TTN_NEEDTEXTW: | |
1414 | 1412 | lpttt = (LPTOOLTIPTEXT)lParam; |
1413 | + // UTF-8対応 | |
1414 | + // lptttは単なる警告回避用 | |
1415 | + wlpttt = (LPTOOLTIPTEXTW)lParam; | |
1415 | 1416 | lpttt->hinst = hInstFtp; |
1416 | 1417 | switch(lpttt->hdr.idFrom) |
1417 | 1418 | { |
@@ -1541,15 +1542,14 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
1541 | 1542 | lpttt->lpszText = MSGJPN176; |
1542 | 1543 | break; |
1543 | 1544 | } |
1544 | - // UTF-8からShift_JISへ変換 | |
1545 | + // UTF-8対応 | |
1546 | + // UTF-8からUTF-16 LEへ変換 | |
1545 | 1547 | { |
1546 | 1548 | static wchar_t StringBufferUTF16[1024]; |
1547 | - static char StringBufferSJIS[1024]; | |
1548 | 1549 | if(lpttt->lpszText) |
1549 | 1550 | { |
1550 | 1551 | MtoW(StringBufferUTF16, sizeof(StringBufferUTF16)/ sizeof(wchar_t), lpttt->lpszText, -1); |
1551 | - WtoA(StringBufferSJIS, sizeof(StringBufferSJIS)/ sizeof(char), StringBufferUTF16, -1); | |
1552 | - lpttt->lpszText = StringBufferSJIS; | |
1552 | + wlpttt->lpszText = StringBufferUTF16; | |
1553 | 1553 | } |
1554 | 1554 | } |
1555 | 1555 | break; |
@@ -723,7 +723,7 @@ END_ROUTINE | ||
723 | 723 | |
724 | 724 | LONG GetWindowLongM(HWND hWnd, int nIndex) |
725 | 725 | { |
726 | - LRESULT r = 0; | |
726 | + LONG r = 0; | |
727 | 727 | START_ROUTINE |
728 | 728 | // WNDPROCがShift_JIS用であるため |
729 | 729 | if(IsWindowUnicode(hWnd)) |
@@ -736,7 +736,7 @@ END_ROUTINE | ||
736 | 736 | |
737 | 737 | LONG SetWindowLongM(HWND hWnd, int nIndex, LONG dwNewLong) |
738 | 738 | { |
739 | - LRESULT r = 0; | |
739 | + LONG r = 0; | |
740 | 740 | START_ROUTINE |
741 | 741 | // WNDPROCがShift_JIS用であるため |
742 | 742 | if(IsWindowUnicode(hWnd)) |
@@ -747,6 +747,32 @@ END_ROUTINE | ||
747 | 747 | return r; |
748 | 748 | } |
749 | 749 | |
750 | +LONG_PTR GetWindowLongPtrM(HWND hWnd, int nIndex) | |
751 | +{ | |
752 | + LONG_PTR r = 0; | |
753 | +START_ROUTINE | |
754 | + // WNDPROCがShift_JIS用であるため | |
755 | + if(IsWindowUnicode(hWnd)) | |
756 | + r = GetWindowLongPtrW(hWnd, nIndex); | |
757 | + else | |
758 | + r = GetWindowLongPtrA(hWnd, nIndex); | |
759 | +END_ROUTINE | |
760 | + return r; | |
761 | +} | |
762 | + | |
763 | +LONG_PTR SetWindowLongPtrM(HWND hWnd, int nIndex, LONG_PTR dwNewLong) | |
764 | +{ | |
765 | + LONG_PTR r = 0; | |
766 | +START_ROUTINE | |
767 | + // WNDPROCがShift_JIS用であるため | |
768 | + if(IsWindowUnicode(hWnd)) | |
769 | + r = SetWindowLongPtrW(hWnd, nIndex, dwNewLong); | |
770 | + else | |
771 | + r = SetWindowLongPtrA(hWnd, nIndex, dwNewLong); | |
772 | +END_ROUTINE | |
773 | + return r; | |
774 | +} | |
775 | + | |
750 | 776 | LRESULT DefWindowProcM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
751 | 777 | { |
752 | 778 | LRESULT r = 0; |
@@ -44,6 +44,12 @@ LONG GetWindowLongM(HWND hWnd, int nIndex); | ||
44 | 44 | #undef SetWindowLong |
45 | 45 | #define SetWindowLong SetWindowLongM |
46 | 46 | LONG SetWindowLongM(HWND hWnd, int nIndex, LONG dwNewLong); |
47 | +#undef GetWindowLongPtr | |
48 | +#define GetWindowLongPtr GetWindowLongPtrM | |
49 | +LONG_PTR GetWindowLongPtrM(HWND hWnd, int nIndex); | |
50 | +#undef SetWindowLongPtr | |
51 | +#define SetWindowLongPtr SetWindowLongPtrM | |
52 | +LONG_PTR SetWindowLongPtrM(HWND hWnd, int nIndex, LONG_PTR dwNewLong); | |
47 | 53 | #undef DefWindowProc |
48 | 54 | #define DefWindowProc DefWindowProcM |
49 | 55 | LRESULT DefWindowProcM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); |
@@ -252,7 +252,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
252 | 252 | if(hWndTbarMain != NULL) |
253 | 253 | { |
254 | 254 | /* 2007/09/21 sunasunamix ここから *********************/ |
255 | - pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc); | |
255 | + // 64ビット対応 | |
256 | +// pOldTbarMainProc = (WNDPROC)SetWindowLong(hWndTbarMain, GWL_WNDPROC, (DWORD)CountermeasureTbarMainProc); | |
257 | + pOldTbarMainProc = (WNDPROC)SetWindowLongPtr(hWndTbarMain, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarMainProc); | |
256 | 258 | /********************************************* ここまで */ |
257 | 259 | |
258 | 260 | GetClientRect(hWnd, &Rect1); |
@@ -277,7 +279,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
277 | 279 | if(hWndTbarLocal != NULL) |
278 | 280 | { |
279 | 281 | /* 2007/09/21 sunasunamix ここから *********************/ |
280 | - pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc); | |
282 | + // 64ビット対応 | |
283 | +// pOldTbarLocalProc = (WNDPROC)SetWindowLong(hWndTbarLocal, GWL_WNDPROC, (DWORD)CountermeasureTbarLocalProc); | |
284 | + pOldTbarLocalProc = (WNDPROC)SetWindowLongPtr(hWndTbarLocal, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarLocalProc); | |
281 | 285 | /********************************************* ここまで */ |
282 | 286 | |
283 | 287 | MoveWindow(hWndTbarLocal, 0, TOOLWIN_HEIGHT, LocalWidth, TOOLWIN_HEIGHT, FALSE); |
@@ -302,7 +306,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
302 | 306 | /* エディットコントロールを探す */ |
303 | 307 | hWndDirLocalEdit = GetWindow(hWndDirLocal, GW_CHILD); |
304 | 308 | if(hWndDirLocalEdit != NULL) |
305 | - HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc); | |
309 | + // 64ビット対応 | |
310 | +// HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirLocalEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc); | |
311 | + HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirLocalEdit, GWL_WNDPROC, (LONG_PTR)HistEditBoxWndProc); | |
306 | 312 | |
307 | 313 | SendMessage(hWndDirLocal, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0)); |
308 | 314 | SendMessage(hWndDirLocal, CB_LIMITTEXT, FMAX_PATH, 0); |
@@ -340,7 +346,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
340 | 346 | if(hWndTbarRemote != NULL) |
341 | 347 | { |
342 | 348 | /* 2007/09/21 sunasunamix ここから *********************/ |
343 | - pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc); | |
349 | + // 64ビット対応 | |
350 | +// pOldTbarRemoteProc = (WNDPROC)SetWindowLong(hWndTbarRemote, GWL_WNDPROC, (DWORD)CountermeasureTbarRemoteProc); | |
351 | + pOldTbarRemoteProc = (WNDPROC)SetWindowLongPtr(hWndTbarRemote, GWL_WNDPROC, (LONG_PTR)CountermeasureTbarRemoteProc); | |
344 | 352 | /********************************************* ここまで */ |
345 | 353 | |
346 | 354 | MoveWindow(hWndTbarRemote, LocalWidth + SepaWidth, TOOLWIN_HEIGHT, RemoteWidth, TOOLWIN_HEIGHT, FALSE); |
@@ -359,7 +367,9 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
359 | 367 | /* エディットコントロールを探す */ |
360 | 368 | hWndDirRemoteEdit = GetWindow(hWndDirRemote, GW_CHILD); |
361 | 369 | if(hWndDirRemoteEdit != NULL) |
362 | - HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc); | |
370 | + // 64ビット対応 | |
371 | +// HistEditBoxProcPtr = (WNDPROC)SetWindowLong(hWndDirRemoteEdit, GWL_WNDPROC, (LONG)HistEditBoxWndProc); | |
372 | + HistEditBoxProcPtr = (WNDPROC)SetWindowLongPtr(hWndDirRemoteEdit, GWL_WNDPROC, (LONG_PTR)HistEditBoxWndProc); | |
363 | 373 | |
364 | 374 | SendMessage(hWndDirRemote, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE, 0)); |
365 | 375 | SendMessage(hWndDirRemote, CB_LIMITTEXT, FMAX_PATH, 0); |
@@ -1899,7 +1909,9 @@ static LRESULT CALLBACK CountermeasureTbarMainProc(HWND hWnd,UINT uMessage,WPARA | ||
1899 | 1909 | { |
1900 | 1910 | switch (uMessage) { |
1901 | 1911 | case WM_DESTROY : |
1902 | - SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc); | |
1912 | + // 64ビット対応 | |
1913 | +// SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarMainProc); | |
1914 | + SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarMainProc); | |
1903 | 1915 | break; |
1904 | 1916 | case WM_RBUTTONDBLCLK : |
1905 | 1917 | case WM_RBUTTONDOWN : |
@@ -1916,7 +1928,9 @@ static LRESULT CALLBACK CountermeasureTbarLocalProc(HWND hWnd,UINT uMessage,WPAR | ||
1916 | 1928 | { |
1917 | 1929 | switch (uMessage) { |
1918 | 1930 | case WM_DESTROY : |
1919 | - SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc); | |
1931 | + // 64ビット対応 | |
1932 | +// SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarLocalProc); | |
1933 | + SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarLocalProc); | |
1920 | 1934 | break; |
1921 | 1935 | case WM_RBUTTONDBLCLK : |
1922 | 1936 | case WM_RBUTTONDOWN : |
@@ -1933,7 +1947,9 @@ static LRESULT CALLBACK CountermeasureTbarRemoteProc(HWND hWnd,UINT uMessage,WPA | ||
1933 | 1947 | { |
1934 | 1948 | switch (uMessage) { |
1935 | 1949 | case WM_DESTROY : |
1936 | - SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc); | |
1950 | + // 64ビット対応 | |
1951 | +// SetWindowLong(hWnd,GWL_WNDPROC,(DWORD)pOldTbarRemoteProc); | |
1952 | + SetWindowLongPtr(hWnd,GWL_WNDPROC,(LONG_PTR)pOldTbarRemoteProc); | |
1937 | 1953 | break; |
1938 | 1954 | case WM_RBUTTONDBLCLK : |
1939 | 1955 | case WM_RBUTTONDOWN : |