Settings | Sign in | Sign up

There are currently 2 posts.

原来,在Windows文件管理器中剪切或复制文件,会在剪切板中产生这么多种格式的数据

Floor 1 巨大八爪鱼 1/2/16 9:56

共有14种
Floor 2 巨大八爪鱼 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格式的内容为:

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.