• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FFFTPのソースコードです。


Commit MetaInfo

修訂dc9efb9a37f8901f0b3acc84a4036fe885bea33b (tree)
時間2011-10-13 00:43:05
作者s_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Fix bugs of host list dialog.

Change Summary

差異

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
--- a/hostman.c
+++ b/hostman.c
@@ -151,7 +151,9 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
151151 int Level2;
152152 HOSTLISTDATA *Data1;
153153 HOSTLISTDATA *Data2;
154- NM_TREEVIEW *tView;
154+ // UTF-8対応
155+// NM_TREEVIEW *tView;
156+ NM_TREEVIEWW *tView;
155157 HTREEITEM tViewPos;
156158 TV_HITTESTINFO HitInfo;
157159
@@ -550,7 +552,9 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
550552 break;
551553
552554 case WM_NOTIFY:
553- tView = (NM_TREEVIEW FAR *)lParam;
555+ // UTF-8対応
556+// tView = (NM_TREEVIEW FAR *)lParam;
557+ tView = (NM_TREEVIEWW FAR *)lParam;
554558 switch(tView->hdr.idFrom)
555559 {
556560 case HOST_LIST :
@@ -558,7 +562,9 @@ static BOOL CALLBACK SelectHostProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
558562 hItem = tView->itemNew.hItem;
559563 switch(tView->hdr.code)
560564 {
561- case TVN_SELCHANGED :
565+ // UTF-8対応
566+// case TVN_SELCHANGED :
567+ case TVN_SELCHANGEDW :
562568 /* フォルダが選ばれたときは接続、コピーボタンは禁止 */
563569 Item.hItem = hItem;
564570 Item.mask = TVIF_PARAM;
--- a/mbswrapper.c
+++ b/mbswrapper.c
@@ -610,6 +610,10 @@ LRESULT SendMessageM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
610610 LVFINDINFOW wLVFindInfo;
611611 LVCOLUMNA* pmLVColumn;
612612 LVCOLUMNW wLVColumn;
613+ TVITEMEXA* pmTVItem;
614+ TVITEMEXW wTVItem;
615+ TVINSERTSTRUCTA* pmTVInsert;
616+ TVINSERTSTRUCTW wTVInsert;
613617 wchar_t ClassName[MAX_PATH];
614618 START_ROUTINE
615619 switch(Msg)
@@ -887,6 +891,83 @@ START_ROUTINE
887891 break;
888892 }
889893 }
894+ else if(_wcsicmp(ClassName, WC_TREEVIEWW) == 0)
895+ {
896+ switch(Msg)
897+ {
898+ case TVM_GETITEMA:
899+ pmTVItem = (TVITEMEXA*)lParam;
900+ wTVItem.mask = pmTVItem->mask;
901+ wTVItem.hItem = pmTVItem->hItem;
902+ wTVItem.state = pmTVItem->state;
903+ wTVItem.stateMask = pmTVItem->stateMask;
904+ if(pmTVItem->mask & TVIF_TEXT)
905+ {
906+ Size = pmTVItem->cchTextMax * 4;
907+ pw0 = AllocateStringW(Size);
908+ wTVItem.pszText = pw0;
909+ wTVItem.cchTextMax = Size;
910+ }
911+ wTVItem.iImage = pmTVItem->iImage;
912+ wTVItem.iSelectedImage = pmTVItem->iSelectedImage;
913+ wTVItem.cChildren = pmTVItem->cChildren;
914+ wTVItem.lParam = pmTVItem->lParam;
915+ wTVItem.iIntegral = pmTVItem->iIntegral;
916+// wTVItem.uStateEx = pmTVItem->uStateEx;
917+// wTVItem.hwnd = pmTVItem->hwnd;
918+// wTVItem.iExpandedImage = pmTVItem->iExpandedImage;
919+// wTVItem.iReserved = pmTVItem->iReserved;
920+ r = SendMessageW(hWnd, TVM_GETITEMW, wParam, (LPARAM)&wTVItem);
921+ pmTVItem->mask = wTVItem.mask;
922+ pmTVItem->hItem = wTVItem.hItem;
923+ pmTVItem->state = wTVItem.state;
924+ pmTVItem->stateMask = wTVItem.stateMask;
925+ if(pmTVItem->mask & TVIF_TEXT)
926+ {
927+ WtoM(pmTVItem->pszText, pmTVItem->cchTextMax, wTVItem.pszText, -1);
928+ TerminateStringM(pmTVItem->pszText, pmTVItem->cchTextMax);
929+ }
930+ pmTVItem->iImage = wTVItem.iImage;
931+ pmTVItem->iSelectedImage = wTVItem.iSelectedImage;
932+ pmTVItem->cChildren = wTVItem.cChildren;
933+ pmTVItem->lParam = wTVItem.lParam;
934+ pmTVItem->iIntegral = wTVItem.iIntegral;
935+// pmTVItem->uStateEx = wTVItem.uStateEx;
936+// pmTVItem->hwnd = wTVItem.hwnd;
937+// pmTVItem->iExpandedImage = wTVItem.iExpandedImage;
938+// pmTVItem->iReserved = wTVItem.iReserved;
939+ break;
940+ case TVM_INSERTITEMA:
941+ pmTVInsert = (TVINSERTSTRUCTA*)lParam;
942+ wTVInsert.hParent = pmTVInsert->hParent;
943+ wTVInsert.hInsertAfter = pmTVInsert->hInsertAfter;
944+ wTVInsert.itemex.mask = pmTVInsert->itemex.mask;
945+ wTVInsert.itemex.hItem = pmTVInsert->itemex.hItem;
946+ wTVInsert.itemex.state = pmTVInsert->itemex.state;
947+ wTVInsert.itemex.stateMask = pmTVInsert->itemex.stateMask;
948+ if(pmTVInsert->itemex.mask & TVIF_TEXT)
949+ {
950+ pw0 = DuplicateMtoW(pmTVInsert->itemex.pszText, -1);
951+ wTVInsert.itemex.pszText = pw0;
952+ // TODO: cchTextMaxの確認
953+ wTVInsert.itemex.cchTextMax = pmTVInsert->itemex.cchTextMax;
954+ }
955+ wTVInsert.itemex.iImage = pmTVInsert->itemex.iImage;
956+ wTVInsert.itemex.iSelectedImage = pmTVInsert->itemex.iSelectedImage;
957+ wTVInsert.itemex.cChildren = pmTVInsert->itemex.cChildren;
958+ wTVInsert.itemex.lParam = pmTVInsert->itemex.lParam;
959+ wTVInsert.itemex.iIntegral = pmTVInsert->itemex.iIntegral;
960+// wTVInsert.itemex.uStateEx = pmTVInsert->itemex.uStateEx;
961+// wTVInsert.itemex.hwnd = pmTVInsert->itemex.hwnd;
962+// wTVInsert.itemex.iExpandedImage = pmTVInsert->itemex.iExpandedImage;
963+// wTVInsert.itemex.iReserved = pmTVInsert->itemex.iReserved;
964+ r = SendMessageW(hWnd, TVM_INSERTITEMW, wParam, (LPARAM)&wTVInsert);
965+ break;
966+ default:
967+ r = SendMessageW(hWnd, Msg, wParam, lParam);
968+ break;
969+ }
970+ }
890971 else
891972 r = SendMessageW(hWnd, Msg, wParam, lParam);
892973 break;