There are currently 2 posts.
Font size: Small - 100% (Default)▼  Content converter: No conversion▼
 
Clicks Replies
1196 1
原来,在Windows文件管理器中剪切或复制文件,会在剪切板中产生这么多种格式的数据
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 1/2/16 9:56

共有14种
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 2 Posted at: 1/2/16 10:18
通过以下代码可以获得复制的文件名的简写形式:
    if (IsClipboardFormatAvailable(49158))
    {
        hMem = GetClipboardData(49158);
        LPTSTR filename = (LPTSTR)GlobalLock(hMem);
        GlobalUnlock(hMem);
        MessageBox(hWnd, filename, TEXT("剪切板中存储的文件名"), MB_ICONINFORMATION);
    }
当复制文件“D:\My Documents\RPGXP\Project1\Game.rxproj”时,剪切板中FileName格式的内容为:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1196 Replies: 1
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 1/2/16 10:18
Announcements