loadimage函数装载资源中的位图如何写?

qq_17230049 2017-05-07 11:06:30
C++控制台程序,原语句loadimage(&fm, "./fire/flower.jpg", 3120, 240);现已将flower.jpg转化为bmp文件导入到resource资源中,值为IDB_BITMAP1 改写成loadimage(&fm, LPCTSTR(IDB_BITMAP1), 3120, 240);程序出错,异常中断,求助该如何写?谢谢!!
...全文
849 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
smile_sa 2019-02-27
  • 打赏
  • 举报
回复
楼主,我用loadimage(&fm, RT_BITMAP, MAKEINTRESOURCE(IDB_BITMAP2));
也出现了这种情况,请问一下你最后是怎么解决的?

「已注销」 2017-05-26
  • 打赏
  • 举报
回复
之前已经说清楚了,用文本打开 rc 文件,如果其中的代码是: RT_BITMAP IDB_BITMAP2 "xxx.bmp" 且 resource.h 中,有 IDB_BITMAP2 的宏定义: #define IDB_BITMAP2 1000 并且 xxx,bmp 的确是一个 bmp 文件的话,是可以的,不能只是个 bmp 扩展名的假 bmp。 凡是 resource.h 中没有定义的宏,VS 编辑器中,类型和名字都被加上了引号。如 "RT_IMAGE","IDB_BITMAP2"。 MAKEINTRESOURCE(IDB_BITMAP2) 的作用和 (LPCTSTR)IDB_BITMAP2 一样。 如果没有定义,就要用 TEXT("IDB_BITMAP2") 这样的字符串。 自己排查一下,是否参数使用的问题,如 TEXT("IDB_BITMAP2") 和 (LPCTSTR)IDB_BITMAP2 的区别。 不用按我的来,而是应该按你的实际情况来定,搞清楚资源 id、资源名 id 是数字 (宏定义) 还是字符串。
qq_17230049 2017-05-25
  • 打赏
  • 举报
回复
改成是上面的了,虽然程序编译不报错了,但是装载在资源中的图片运行时也不显示了,原因何在?
qq_17230049 2017-05-25
  • 打赏
  • 举报
回复
为何将图片装载在资源中编译没任何错误,程序也可基本运行,资源中的图片不工作 #include <stdio.h> //标准的输入输出头文件 #include <math.h> #include <graphics.h> //图形库头文件 #include <mmsystem.h> #pragma comment(lib,"winmm.lib") #include "resource.h" #include <conio.h> #define NUM 13 #define PI 3.1415926548 //烟花弹结构体 struct Jet { int x; //坐标 int y; int hx; //最高的坐标 将赋值给烟花 int hy; int height; //高度 bool shoot; //是否可以发射 DWORD t1, t2, dt;//烟花弹的上升速度 IMAGE img[2]; //一亮一暗两张图片 byte n : 1; //图片下标 0 1 //位段 一个二进制位 int 32 float 32 short 16 }jet[13]; //烟花结构体 struct Fire { int x, y; //坐标 int cen_x, cen_y; //中心坐标 int width,height; //图片的宽和高 int r; //半径 从小变大 int max_r; //最大的半径 int xy[240][240]; //像素点的集合 bool show; bool draw; //输出像素点 DWORD t1, t2, dt; }fire[NUM]; void Init(int i); void welcome(); void Load(); void Chose(DWORD& t1); void shoot(); void Show(DWORD* pMem); //C 语言 条件选择 函数的使用 循环 数据类型 // 库函数 逻辑思维 了解库函数的时候 组装成一个程序。 int main() //在使用一些标准库函数的时候 需要添加头文件 { initgraph(1200, 800); //打开一个界面 welcome(); DWORD t1 = timeGetTime(); DWORD *pMem = GetImageBuffer(); //循环初始化13次 for (int i = 0; i < NUM; i++) { Init(i); } Load(); BeginBatchDraw(); while (!_kbhit()) { Sleep(10); for (int clr = 0; clr < 1000; clr++) { for (int j = 0; j < 2; j++) { int px1 = rand() % 1200; int py1 = rand() % 800; if (py1 < 799) { pMem[py1 * 1200 + px1] = pMem[py1 * 1200 + px1 + 1] = BLACK; } } } Chose(t1); shoot(); Show(pMem); FlushBatchDraw(); //吧显存展示出来 } getchar(); closegraph(); //关闭界面 return 0; } void welcome() { //wav //PlaySound((LPCTSTR)IDR_WAVE1, NULL, SND_RESOURCE | SND_LOOP | SND_ASYNC); //MP3 mciSendString(L"open ./music/你还要我怎样.mp3 alias BGM", 0, 0, 0); mciSendString(L"play BGM repeat", 0, 0, 0); settextcolor(YELLOW); //怎样得到一个圆的轨迹上的n个坐标。 for (int i = 0; i < 50; i++) { int x = 600 + int(180 * sin(PI * 2 * i / 60)); int y = 200 + int(180 * cos(PI * 2 * i / 60)); cleardevice(); //刷新 没有指定颜色 默认为黑色 settextstyle(i, 0, L"楷体"); outtextxy(x - 200, y, L"给:"); outtextxy(x + 50, y + 100, L"某某"); Sleep(25); } getchar(); //卡住 cleardevice(); settextstyle(25, 0, L"楷体"); outtextxy(400,150,L"XXXXXXXXXXXXXXXXXXX"); outtextxy(400, 150, L"XXXXXXXXXX"); outtextxy(400, 200, L"XXXXXXXXX"); outtextxy(400, 250, L"XXXXXXXXXXXXXXXXXX"); outtextxy(400, 300, L"XXXXXXXXXXXXXXXXXXXXXXXXXXX"); outtextxy(400, 350, L"XXXXXXXXXXXXXXXXXX"); outtextxy(400, 400, L"XXXXXXXXX"); outtextxy(400, 450, L"XXXXXXXXXXXXXXXXXXXXXXXXXXX"); outtextxy(400, 500, L"XXXXXXXXXXXXXXXXXX"); getchar(); } void Init(int i) { int r[13] = { 120, 120, 155, 123, 130, 147, 138, 138, 130, 135, 140, 132, 155 }; int x[13] = { 120, 120, 110, 117, 110, 93, 102, 102, 110, 105, 100, 108, 110 }; int y[13] = { 120, 120, 85, 118, 120, 103, 105, 110, 110, 120, 120, 104, 85 }; //初始化烟花 fire[i].x = 0; fire[i].y = 0; fire[i].width = 240; fire[i].height = 240; fire[i].max_r = r[i]; fire[i].cen_x = x[i]; fire[i].cen_y = y[i]; fire[i].show = false; fire[i].dt = 5; fire[i].t1 = timeGetTime(); fire[i].r = 0; //初始化烟花弹 jet[i].x = 0; jet[i].y = 0; jet[i].hx = 0; jet[i].hy = 0; jet[i].height = 0; jet[i].t1 = timeGetTime(); jet[i].dt = rand() % 10; jet[i].n = 0; jet[i].shoot = false; } void Load() { //加载烟花 IMAGE fm,gm; //loadimage(&fm, L"./images/bluexc/flower.jpg");//用这一句,使用文件中的图片可以显示 loadimage(&fm, RT_BITMAP, MAKEINTRESOURCE(IDB_BITMAP2));//换这一句,资源中的图片无法显示,请帮忙修改能运行,我需要将图片装载在资源中,说明程序运行需要装EASYX运行图新界面库 for (int i = 0; i < NUM; i++) { SetWorkingImage(&fm); //工作---对象是一张图片 getimage(&gm, i * 240, 0, 240, 240); SetWorkingImage(&gm); //工作---对象是一张图片 for (int a = 0; a < 240; a++) { for (int b = 0; b < 240; b++) { fire[i].xy[a][b] = getpixel(a, b); } } } //加载烟花弹 IMAGE jm; loadimage(&jm, L"./images/shoot.jpg"); //jm 里面保存了一整张图片 分隔开来 for (int i = 0; i < NUM; i++) { SetWorkingImage(&jm); //工作---对象是一张图片 int n = rand() % 5; //0-4 getimage(&jet[i].img[0], n * 20, 0, 20, 50); getimage(&jet[i].img[1], (n + 5) * 20, 0, 20, 50); } SetWorkingImage(NULL); //放弃掉刚才的工作区域。 //零基础 条件选择 循环。 } //选出13个 void Chose(DWORD& t1) { DWORD t2 = timeGetTime(); if (t2 - t1 > 100) { int n = rand() % 20; if (n < NUM&&jet[n].shoot == false&&fire[n].show==false) { jet[n].x = rand() % 1200; jet[n].y = rand() % 100 + 600; //600-699 jet[n].hx = jet[n].x; jet[n].hy = rand() % 400; jet[n].height = jet[n].y - jet[n].hy; jet[n].shoot = true; putimage(jet[n].x, jet[n].y, &jet[n].img[jet[n].n], SRCINVERT); } t1 = t2; } } void shoot() { for (int i = 0; i < NUM; i++) { jet[i].t2 = timeGetTime(); if (jet[i].t2 - jet[i].t1>jet[i].dt&&jet[i].shoot == true) { putimage(jet[i].x, jet[i].y, &jet[i].img[jet[i].n], SRCINVERT); if (jet[i].y > jet[i].hy) { jet[i].n++; //明暗交替的效果 jet[i].y -= 5; } putimage(jet[i].x, jet[i].y, &jet[i].img[jet[i].n], SRCINVERT); // if (jet[i].y <= jet[i].hy) { putimage(jet[i].x, jet[i].y, &jet[i].img[jet[i].n], SRCINVERT); fire[i].x = jet[i].hx + 10; fire[i].y = jet[i].hy; fire[i].show = true; jet[i].shoot = false; } jet[i].t1 = jet[i].t2; } } } void Show(DWORD* pMem) //显存指针 像素 这里面所有的像素点的集合 { //3D游戏 地形 天空 显存来做 int drt[16] = { 5, 5, 5, 5, 5, 5, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55 }; for (int i = 0; i < NUM; i++) { fire[i].t2 = timeGetTime(); if (fire[i].t2 - fire[i].t1>fire[i].dt&&fire[i].show == true) { if (fire[i].r < fire[i].max_r) { fire[i].r++; fire[i].dt = drt[fire[i].r / 10]; fire[i].draw = true; } if (fire[i].r >= fire[i].max_r-1) { fire[i].draw = false; Init(i); } fire[i].t1 = fire[i].t2; } if (fire[i].draw) { for (double a = 0; a <= 6.28; a += 0.01) { int x1 = (int)(fire[i].cen_x + fire[i].r*cos(a)); int y1 = (int)(fire[i].cen_y + fire[i].r*sin(a)); if (x1 > 0 && x1<fire[i].width&&y1>0 && y1 < fire[i].height) { int b = fire[i].xy[x1][y1] & 0xff; int g = (fire[i].xy[x1][y1] >> 8) & 0xff; int r = (fire[i].xy[x1][y1] >> 16); int xx = (int)(fire[i].x + fire[i].r*cos(a)); int yy = (int)(fire[i].y - fire[i].r*sin(a)); if (r>0x20 && g > 0x20 && b > 0x20 && xx > 0 && xx<1200 && yy>0 && yy < 800) pMem[yy * 1200 + xx] = BGR(fire[i].xy[x1][y1]); } } fire[i].draw = false; } } }
qq_17230049 2017-05-21
  • 打赏
  • 举报
回复
感谢,你的回复是最详细,说得最透彻的
「已注销」 2017-05-16
  • 打赏
  • 举报
回复
你用的是 easyX loadimage 而不是 Windows API LoadImage。网上查阅,easyX 的 loadimage 有以下重载:
void loadimage(
	IMAGE *lpDestImage,
	LPCTSTR lpImageFile,
	int nWidth = 0,
	int nHeight = 0,
	bool bResize = false
);

void loadimage(
	IMAGE *lpDestImage,
	LPCTSTR lpResType,
	LPCTSTR lpResName,
	int nWidth = 0,
	int nHeight = 0,
	bool bResize = false
);
所以,格式不需要转换,即使转换了,也没法通过 Windows 的 LoadImage 得到 easyX 的 IMAGE 对象。 正确的做法是:
loadimage(&fm, MAKEINTRESOURCE(RT_IMAGE), MAKEINTRESOURCE(IDB_BMP1));
这里的 RT_IMAGE 和 IDB_BMP1 由你的资源类型和名字决定。如果你确定添加的是 bmp 资源,则格式如下:
loadimage(&fm, RT_BITMAP, MAKEINTRESOURCE(IDB_BMP1));
RT_BITMAP 是 Windows 已定义的资源类型。如果是其他的系统资源类型,都是 RT_ 开头的。如果是自定义的类型,在头文件定义为数值,如 #define RT_IMAGE 100,代码中就是 MAKEINTRESOURCE(RT_IMAGE),没有定义宏的,都被认为是字符串,则传 TEXT("RT_IMAGE") 即可。
qq_17230049 2017-05-08
  • 打赏
  • 举报
回复
#include <stdio.h> #include <graphics.h> //图形界面的头文件 #include <math.h> #include <time.h> #include <mmsystem.h> //多媒体设备接口 #include "resource.h" #include <Windows.h> #pragma comment(lib,"winmm.lib") #define NUM 13 //十三个烟花 struct FIRE { int r; int max_r; int x, y; int cen_x, cen_y; int width, height; int xy[240][240]; bool isShow; bool isDraw; DWORD t1, t2, dt; }Fire[NUM]; struct JET { int x, y; //烟花弹的坐标 int hx, hy; //烟花弹的最高点的坐标 int height; //当前烟花弹的坐标与最高点坐标的差 bool isShoot; DWORD t1, t2, dt; //发射的时间间隔 IMAGE img[2]; //2张 暗色的 亮色 byte n : 1; //2张图片的下标 位段 byte n 位 1 int 32 -21亿---21亿 }Jet[NUM]; void Welcome() { //播放背景音乐 //MP3格式用下面语句 //mciSendString("open ./fire/小幸运.mp3 alias bk", 0, 0, 0); //mciSendString("play bk repeat", 0, 0, 0); //WAV格式用下面语句 PlaySound((LPCTSTR) IDR_WAVE1, NULL, SND_RESOURCE | SND_LOOP | SND_ASYNC); setcolor(YELLOW); //让文字动起来 x y 学习这些函数 C语言9大控制结构 for (int i = 0; i < 50; i++) //i这个控制变量得到x y { //600 200 需要得到的圆的圆心 //180 圆的半径 //60 是圆轨迹上的60个点 int x = 600 + int(180 * sin(3.1415926548 * 2 * i / 60)); int y = 200 + int(180 * cos(3.1415926548 * 2 * i / 60)); cleardevice(); //每一次循环都把屏幕清除掉 settextstyle(i, 0, "楷体"); outtextxy(x, y, "双十一,不剁手"); outtextxy(x - 100, y + 80, "写段代码"); Sleep(30); } getchar(); //等待键盘的输入 cleardevice(); settextstyle(25, 0, "楷体"); outtextxy(400, 200, "XXXXXXXXXXXXXX"); outtextxy(400, 250, "XXXXXXXXX"); outtextxy(400, 300, "XXXXXXXXXXXXXX"); outtextxy(400, 350, "XXXXXXXXXXXXXXXX"); outtextxy(400, 400, "XXXXXXXXX"); outtextxy(400, 450, "XXXXXXXXXXXXX"); outtextxy(400, 500, "XXXXXXXXXXXXXXX"); outtextxy(600, 550, "----"); getchar(); } //加载图片 void Load() { //加载烟花 IMAGE fm, gm; loadimage(&fm, L"./images/flower.jpg"); for (int i = 0; i < NUM; i++) { SetWorkingImage(&fm); //工作---对象是一张图片 getimage(&gm, i * 240, 0, 240, 240); SetWorkingImage(&gm); //工作---对象是一张图片 for (int a = 0; a < 240; a++) { for (int b = 0; b < 240; b++) { fire[i].xy[a][b] = getpixel(a, b); } } } 就是这里面的一句如何替换?LoadImage(hInst, MAKEINTRESOURCE(IDB_BMP1), IMAGE_BITMAP, 0,0, 0)直接替换不行,很多未定义的标识符,差什么语句或者头文件呀
worldy 2017-05-08
  • 打赏
  • 举报
回复
不可能的,你没有读透
qq_17230049 2017-05-08
  • 打赏
  • 举报
回复
以上回复答案都不能用呀
worldy 2017-05-08
  • 打赏
  • 举报
回复
LoadImage The LoadImage function loads an icon, cursor, or bitmap. HANDLE LoadImage( HINSTANCE hinst, // handle of the instance containing the image LPCTSTR lpszName, // name or identifier of image UINT uType, // type of image int cxDesired, // desired width int cyDesired, // desired height UINT fuLoad // load flags ); Parameters hinst Handle to an instance of the module that contains the image to be loaded. To load an OEM image, set this parameter to zero. lpszName Handle to the image to load. If the hinst parameter is non-NULL and the fuLoad parameter does not include LR_LOADFROMFILE, lpszName is a pointer to a null-terminated string that contains the name of the image resource in the hinst module. If hinst is NULL and LR_LOADFROMFILE is not specified, the low-order word of this parameter must be the identifier of the OEM image to load. The OEM image identifiers are defined in WINUSER.H and have the following prefixes: Prefix Meaning OBM_ OEM bitmaps OIC_ OEM icons OCR_ OEM cursors If the fuLoad parameter includes the LR_LOADFROMFILE value, lpszName is the name of the file that contains the image. uType Specifies the type of image to be loaded. This parameter can be one of the following values: Value Meaning IMAGE_BITMAP Loads a bitmap. IMAGE_CURSOR Loads a cursor. IMAGE_ICON Loads an icon. cxDesired Specifies the width, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CXICON or SM_CXCURSOR system metric value to set the width. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource width. cyDesired Specifies the height, in pixels, of the icon or cursor. If this parameter is zero and the fuLoad parameter is LR_DEFAULTSIZE, the function uses the SM_CYICON or SM_CYCURSOR system metric value to set the height. If this parameter is zero and LR_DEFAULTSIZE is not used, the function uses the actual resource height. fuLoad Specifies a combination of the following values: Value Meaning LR_DEFAULTCOLOR The default flag; it does nothing. All it means is "not LR_MONOCHROME". LR_CREATEDIBSECTION When the uType parameter specifies IMAGE_BITMAP, causes the function to return a DIB section bitmap rather than a compatible bitmap. This flag is useful for loading a bitmap without mapping it to the colors of the display device. LR_DEFAULTSIZE Uses the width or height specified by the system metric values for cursors or icons, if the cxDesired or cyDesired values are set to zero. If this flag is not specified and cxDesired and cyDesired are set to zero, the function uses the actual resource size. If the resource contains multiple images, the function uses the size of the first image. LR_LOADFROMFILE Loads the image from the file specified by the lpszName parameter. If this flag is not specified, lpszName is the name of the resource. LR_LOADMAP3DCOLORS Searches the color table for the image and replaces the following shades of gray with the corresponding 3D color: Color Replaced with Dk Gray, RGB(128,128,128) COLOR_3DSHADOW Gray, RGB(192,192,192) COLOR_3DFACE Lt Gray, RGB(223,223,223) COLOR_3DLIGHT LR_LOADTRANSPARENT Retrieves the color value of the first pixel in the image and replaces the corresponding entry in the color table with the default window color (COLOR_WINDOW). All pixels in the image that use that entry become the default window color. This value applies only to images that have corresponding color tables. If fuLoad includes both the LR_LOADTRANSPARENT and LR_LOADMAP3DCOLORS values, LRLOADTRANSPARENT takes precedence. However, the color table entry is replaced with COLOR_3DFACE rather than COLOR_WINDOW. LR_MONOCHROME Loads the image in black and white. LR_SHARED Shares the image handle if the image is loaded multiple times. If LR_SHARED is not set, a second call to LoadImage for the same resource will load the image again and return a different handle. Do not use LR_SHARED for images that have non-standard sizes, that may change after loading, or that are loaded from a file. Windows 95 and Windows 98: The function finds the first image with the requested resource name in the cache, regardless of the size requested. LR_VGACOLOR Uses true VGA colors. Return Values If the function succeeds, the return value is the handle of the newly loaded image. If the function fails, the return value is NULL. To get extended error information, callGetLastError. Remarks When you are finished using the bitmap, cursor, or icon, you can release its associated memory by calling one of the functions in the following table. Resource Release function Bitmap DeleteObject Cursor DestroyCursor Icon DestroyIcon The system automatically deletes these resources when the process that created them terminates, however, calling the appropriate function saves memory and decreases the size of the process's working set. Windows CE: The cxDesired and cyDesired parameters must be zero for IMAGE_BITMAP. Windows CE does not support stretching and shrinking of icons. The fuLoad parameter must be zero (==LR_DEFAULTCOLOR). If you are targeting a platform that does not support mouse cursors, you cannot specify the SM_CXCURSOR and SM_CYCURSOR values in the cxDesired and cyDesired parameters, and you cannot specify IMAGE_CURSOR for the uType parameter. If you are targeting a platform that supports mouse cursors, you can specify SM_CXCURSOR and SM_CYCURSOR in the cxDesired and cyDesired parameters, and IMAGE_CURSOR in the uType parameter.
zgl7903 2017-05-08
  • 打赏
  • 举报
回复
LoadImage(hInst, MAKEINTRESOURCE(IDB_BMP1), IMAGE_BITMAP, 0,0, 0)
Eleven 2017-05-08
  • 打赏
  • 举报
回复
LoadBitmap()
API之网络函数1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同一个网络资源的连接 WNetCancelConnection 结束一个网络连接 WNetCancelConnection2 结束一个网络连接 WNetCloseEnum 结束一次枚举操作 WNetConnectionDialog 启动一个标准对话框,以便建立同网络资源的连接 WNetDisconnectDialog 启动一个标准对话框,以便断开同网络资源的连接 WNetEnumResource 枚举网络资源 WNetGetConnection 获取本地或已连接的一个资源的网络名称 WNetGetLastError 获取网络错误的扩展错误信息 WNetGetUniversalName 获取网络一个文件的远程名称以及/或者UNC(统一命名规范)名称 WNetGetUser 获取一个网络资源用以连接的名字 WNetOpenEnum 启动对网络资源进行枚举的过程 2. API之消息函数 BroadcastSystemMessage 将一条系统消息广播给系统所有的顶级窗口 GetMessagePos 取得消息队列上一条消息处理完毕时的鼠标指针屏幕位置 GetMessageTime 取得消息队列上一条消息处理完毕时的时间 PostMessage 将一条消息投递到指定窗口的消息队列 PostThreadMessage 将一条消息投递给应用程序 RegisterWindowMessage 获取分配给一个字串标识符的消息编号 ReplyMessage 答复一个消息 SendMessage 调用一个窗口的窗口函数,将一条消息发给那个窗口 SendMessageCallback 将一条消息发给窗口 SendMessageTimeout 向窗口发送一条消息 SendNotifyMessage 向窗口发送一条消息 3. API之文件处理函数 CloseHandle 关闭一个内核对象。其包括文件、文件映射、进程、线程、安全和同步对象等 CompareFileTime 对比两个文件的时间 CopyFile 复制文件 CreateDirectory 创建一个新目录 CreateFile 打开和创建文件、管道、邮槽、通信服务、设备以及控制台 CreateFileMapping 创建一个新的文件映射对象 DeleteFile 删除指定文件 DeviceIoControl 对设备执行指定的操作 DosDateTimeToFileTime 将DOS日期和时间值转换成一个 win32 FILETIME 值 FileTimeToDosDateTime 将一个 win32 FILETIME 值转换成DOS日期和时间值 FileTimeToLocalFileTime 将一个FILETIME结构转换成本地时间 FileTimeToSystemTime 根据一个FILETIME结构的内容,装载一个SYSTEMTIME结构 FindClose 关闭由FindFirstFile函数创建的一个搜索句柄 FindFirstFile 根据文件名查找文件 FindNextFile 根据调用FindFirstFile函数时指定的一个文件名查找下一个文件 FlushFileBuffers 针对指定的文件句柄,刷新内部文件缓冲区 FlushViewOfFile 将入文件映射缓冲区的所有数据都刷新到磁盘 GetBinaryType 判断文件是否可以执行 GetCompressedFileSize 判断一个压缩文件在磁盘上实际占据的字节数 GetCurrentDirectory 在一个缓冲区装载当前目录 GetDiskFreeSpace 获取与一个磁盘的组织有关的信息,以及了解剩余空间的容量 GetDiskFreeSpaceEx 获取与一个磁盘的组织以及剩余空间容量有关的信息 GetDriveType 判断一个磁盘驱动器的类型 GetExpandedName 取得一个压缩文件的全名 GetFileAttributes 判断指定文件的属性 GetFileInformationByHandle 这个函数提供了获取文件信息的一种机制 GetFileSize 判断文件长度 GetFileTime 取得指定文件的时间信息 GetFileType 在给出文件句柄的前提下,判断文件类型 GetFileVersionInfo 从支持版本标记的一个模块里获取文件版本信息

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧