VC++显示文件或文件夹属性
When you select a file or folder in Explorer window, and choose 'Properties' from the menu, you get the properties window that contains some essential information about the file: The size of file, created date, modified date, attributes, and so on.
It's possible to display this properties window programmatically, by using the ShellExecuteEx API function.
The function below accept 2 parameters, and displays the properties window of the file:
hwnd - The handle of the window that calls this function.
lpszFile - The file or folder that you want to display its properties.
|
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
void ShowFileProperties(HWND hwnd, LPCWSTR lpszFile)
{ SHELLEXECUTEINFO ShExecInfo = {}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); |


VC++显示文件或文件夹属性的更多相关文章
- VC 获取指定文件夹路径的方法小结
VC获取指定文件夹路径 flyfish 2010-3-5 一 使用Shell函数 1 获取应用程序的安装路径 TCHAR buf[_MAX_PATH];SHGetSpecialFolderPath( ...
- TDirectory.GetAttributes、TDirectory.SetAttributes获取和设置文件夹属性
使用函数: System.IOUtils.TDirectory.GetAttributes//获取属性 System.IOUtils.TDirectory.SetAttributes//设置属性 注: ...
- 使用VC++压缩解压缩文件夹
前言 项目中要用到一个压缩解压缩的模块, 看了很多文章和源代码, 都不是很称心, 现在把我自己实现的代码和大家分享. 要求: 1.使用Unicode(支持中文). 2.使用源代码.(不使用静态或 ...
- [sharepoint]rest api文档库文件上传,下载,拷贝,剪切,删除文件,创建文件夹,修改文件夹属性,删除文件夹,获取文档列表
写在前面 最近对文档库的知识点进行了整理,也就有了这篇文章,当时查找这些接口,并用在实践中,确实废了一些功夫,也为了让更多的人走更少的弯路. 系列文章 sharepoint环境安装过程中几点需要注意的 ...
- VC下遍历文件夹中的所有文件的几种方法
一.使用::FindFirstFile和::FindNextFile方法 #include "StdAfx.h" #include <windows.h> #inclu ...
- Linux ->> Chmod命令改变文件/文件夹属性
简介 chmod命令用于改变linux系统文件或目录的访问权限,控制用户/用户组对文件或目录的访问权限. 用法: 两种用法:1)用字母r(读).w(写).x(执行)表示权限类型:2)用数字表示,4代表 ...
- Linux文件(夹)属性与权限
文件属性与权限,文件权限设置 参考资料:鸟哥的Linux私房菜 用户与用户组 Linux系统是一个多用户多任务的分时操作系统,任何一个要使用系统资源的用户,都必须首先向系统管理员申请一个账号,然后以这 ...
- dos添加文件夹属性!
attrib 显示所有文件的属性:参数:+r或-r [文件名] 设置文件属性是否为只读 +h或-h [文件名] 设置文件属性是否隐含 +s或-s [文件名] 设置文件属性是否为系统文件 +a或-a [ ...
- linux 显示文件或文件夹
用 -v 很简单呀! 显示文件 ls -l | grep -v '^d'显示目录 ls -l | grep '^d'
随机推荐
- 操作系统开发之——一个简单的Bootsect
先吓唬一下读者朋友呵呵,直接发代码:(这是UOS操作系统的Bootsect)(有兴趣的朋友能够增加我们,联系方式在最后) ;------------------------------ ;文件名称:B ...
- android4.4系统永不锁屏
android4.4\frameworks\base\packages\Keyguard\src\com\android\keyguard\KeyguardViewMediator.java /** ...
- windows和linux-JDK环境变量设置
Windows环境变量添加或修改以下内容: JAVA_HOME=C:\Program Files\Java\jdk1..0_43 --注意修改路径 CLASSPATH=.;%JAVA_HOME%\li ...
- java 判断一个字符串是否包含某个字符串中的字符
public static void main(String[] args) { if(isHave("购买ab","出售AssBC")) Sy ...
- php处理行业分类数据
实现步骤: 1.将excel表格存储为后缀名为 .csv格式的文件: 2.将.csv格式文件导入到mysql数据库中: 3.通过条件查询将所需要的数据查出并导入另一个数据表中: 下面是一些php片段: ...
- 使用Openssl创建证书
概述 SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secure socketlayer(SSL),SSL安全协议主要用来提供对用户和服务器的认证:对传送的数据进行加密和隐藏: ...
- Swift不等于nil
我照着书上的例子写下了如下代码,运行后发现提示Nil cannot be assigned to type 'Int' if i!=nil {//Nil cannot be assigned to t ...
- python selenium--常用函数3
ActionChains类鼠标操作的常用方法: 引入ActionChains类:from selenium.webdriver.common.action_chains import ActionCh ...
- myeclipse的user library不自动部署到WEB-INF/lib目录下的解决办法
右键进入项目属性 Properties 点进去 左边 MyEclipse -> Deployment Assembly 右边 Add -> JavaBuild Path Entries - ...
- log4j DatePattern 解惑
og4j.appender.Root=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.Root.File=../logs/bloglog ...