• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

Loweynet


Commit MetaInfo

Revision642b947efc5358f232f9eeda98f7c8eb111acf1f (tree)
Zeit2011-10-15 16:46:37
Autors_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Fix bugs of copying URL to clipboard.

Ändern Zusammenfassung

Diff

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/mbswrapper.c
+++ b/mbswrapper.c
@@ -1818,6 +1818,34 @@ END_ROUTINE
18181818 return r;
18191819 }
18201820
1821+HANDLE SetClipboardDataM(UINT uFormat, HANDLE hMem)
1822+{
1823+ HANDLE r = NULL;
1824+ char* p;
1825+ int Length;
1826+ int BufferLength;
1827+ HGLOBAL hBufferMem;
1828+START_ROUTINE
1829+ if(uFormat == CF_TEXT)
1830+ {
1831+ p = (char*)GlobalLock(hMem);
1832+ Length = (int)GlobalSize(hMem);
1833+ BufferLength = MtoW(NULL, 0, p, Length);
1834+ if(hBufferMem = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t) * BufferLength))
1835+ {
1836+ MtoW((LPWSTR)GlobalLock(hBufferMem), BufferLength, p, Length);
1837+ GlobalUnlock(hBufferMem);
1838+ r = SetClipboardData(CF_UNICODETEXT, hBufferMem);
1839+ }
1840+ GlobalUnlock(hMem);
1841+ GlobalFree(hMem);
1842+ }
1843+ else
1844+ r = SetClipboardData(uFormat, hMem);
1845+END_ROUTINE
1846+ return r;
1847+}
1848+
18211849 int mkdirM(const char * _Path)
18221850 {
18231851 int r = 0;
--- a/mbswrapper.h
+++ b/mbswrapper.h
@@ -155,6 +155,9 @@ HWND CreateDialogParamM(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndPar
155155 #undef sndPlaySound
156156 #define sndPlaySound sndPlaySoundM
157157 BOOL sndPlaySoundM(LPCSTR pszSound, UINT fuSound);
158+#undef SetClipboardData
159+#define SetClipboardData SetClipboardDataM
160+HANDLE SetClipboardDataM(UINT uFormat, HANDLE hMem);
158161 #undef mkdir
159162 #define mkdir _mkdirM
160163 int mkdirM(const char * _Path);