当前位置: 代码迷 >> VC/MFC >> vc 怎么打开文件详情属性窗口
  详细解决方案

vc 怎么打开文件详情属性窗口

热度:108   发布时间:2016-05-02 03:33:07.0
vc 如何打开文件详情属性窗口
vc 如何打开文件详情属性窗口
------解决思路----------------------
仅供参考:
#pragma comment(lib,"shell32")
#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <shellapi.h>
SHELLEXECUTEINFO sei;
int main(int argc,char **argv) {
    if (argc<2) {
        printf("Use: %s file
------解决思路----------------------
folder\nDisplays the file or folder's properties dialog.\n",argv[0]);
        return 1;
    }
    sei.hwnd     = 0;
    sei.lpVerb   = "properties";
    sei.lpFile   = argv[1];
    sei.fMask    = SEE_MASK_INVOKEIDLIST
------解决思路----------------------
SEE_MASK_FLAG_DDEWAIT;
    sei.cbSize   = sizeof(sei);
    ShellExecuteEx(&sei);
    cprintf("Press any key to end.");
    while (1) {
        Sleep(100);
        if (kbhit()) {getch(); break;}
    }
    return 0;
}
  相关解决方案