|
[求助]没有邀请码,感觉很对不起楼主……
不怪,呵呵,只是看完别人的文章很收益,想顶一下,但是不让发帖子哦不是会员,所以感觉对不起楼主 |
|
[求助]我的问题 很难吗? 就没有高手 帮我解决啊
请先搞清楚C++和VC的关系 |
|
[求助]关于Random函数的神奇之处……大侠们研究一下!!!太灵异了!
是啊,如果给2的话,我突然感觉自己好2啊 |
|
[原创]关于使用SystemParametersInfo设置背景桌面的问题一点点心得
哦,谢谢!我去找找这样的DLL |
|
[求助]关于Random函数的神奇之处……大侠们研究一下!!!太灵异了!
天哪,还是算了吧,太多次了!就是个换桌面,而且图片也很多! |
|
|
|
[求助]关于Random函数的神奇之处……大侠们研究一下!!!太灵异了!
嗯,谢谢啊!那看来要自己弄个根据时间得出来的数字,当作随机数了!谢谢!嘿嘿! |
|
[求助]关于Random函数的神奇之处……大侠们研究一下!!!太灵异了!
是啊,很神奇的函数…… |
|
[求助]一个win32汇编的程序,折腾一天没折腾出来,前辈们帮看看……谢谢了
.386 .model flat,stdcall option casemap:none ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ include windows.inc include kernel32.inc includelib kernel32.lib include user32.inc includelib user32.lib include Stdlib.Inc includelib Stdlib.lib ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ ICO_MAIN equ 1000h ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ .const szPathBmp db '*.bmp',0 szPathJpg db '*.jpg',0 szError db '未找到任何bmp和jpg的文件',0dh,0ah, '程序将退出',0dh,0ah, '谢谢使用',0dh,0ah, 'BY:GLCWOLF',0 szErrorCap db '查找图片失败',0 .data szTest1 db '%d',0 szTest2 db '%s',0 szBufferTest db 128 dup (?) .data? dwCount dd ? hFindFile dd ? szBuffer db 256 dup (?) szName db MAX_PATH dup (?) szBufferName db 10000 dup(?) dwRand dd ? dwFileCount dd ? dwAddr dd ? stWin32FindData WIN32_FIND_DATA <?> dwNameAddr dd ? .code _FindBmpFiles proc uses esi;查找bmp文件 invoke FindFirstFile,offset szPathBmp,offset stWin32FindData .if eax != INVALID_HANDLE_VALUE ;如果找到第一个bmp文件,保存句柄,进行FindNextFile mov hFindFile,eax mov esi,offset szBufferName .while TRUE inc dwCount invoke StrCpy,esi,offset stWin32FindData.cFileName ;把找到的文件的文件名拼接到缓存区里 add esi,sizeof stWin32FindData.cFileName mov dwNameAddr,esi invoke FindNextFile,hFindFile,offset stWin32FindData .break .if eax == FALSE .endw invoke FindClose,hFindFile ;关闭文件句柄 .endif ret _FindBmpFiles endp ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _FindJpgFiles proc uses esi;注释类似与_FindBmpFiles .if dwCount ==0 mov esi,offset szBufferName ;如果没找到BMP图片,那么把缓存区的地址给esi .else mov esi,dwNameAddr ;如果找到了BMP,那么接着找到的BMP文件的后面放置JPG的文件名 .endif invoke FindFirstFile,offset szPathJpg,offset stWin32FindData .if eax != INVALID_HANDLE_VALUE mov hFindFile,eax .while TRUE inc dwCount invoke StrCpy,esi,offset stWin32FindData.cFileName add esi,sizeof stWin32FindData.cFileName invoke FindNextFile,hFindFile,offset stWin32FindData .break .if eax == FALSE .endw invoke FindClose,hFindFile .endif ret _FindJpgFiles endp ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ _ChangeWall proc invoke Randomize invoke Random,dwCount ;产生随机数 mov ebx,sizeof stWin32FindData.cFileName mul ebx ;这里有个问题:我把MAX_PATH长度的文件名,放到缓存区里面,但是缓存区是以实际长度来 mov ebx,offset szBufferName ;存储文件名的,不是以MAX_PATH长度来存储的,那么,想取出缓存区里任意一个文件名的 add eax,ebx ;的话,应该如何操作呢?想了一天了,还是没想明白……初学者…… invoke SystemParametersInfo,SPI_SETDESKWALLPAPER,0,eax,SPIF_UPDATEINIFILE ret _ChangeWall endp _ErrorInfo proc invoke MessageBox,NULL,offset szError,offset szErrorCap,MB_OK invoke ExitProcess,NULL ret _ErrorInfo endp ;※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※ start: invoke LoadIcon,NULL,ICO_MAIN invoke SendMessage,NULL,WM_SETICON,ICON_BIG or ICON_SMALL,eax call _FindBmpFiles call _FindJpgFiles .if dwCount > 0 call _ChangeWall .else call _ErrorInfo .endif invoke ExitProcess,NULL end start 方法和你的有一些出入!我实在是看不懂你的程序啊……我刚学!不好意思…… 但是现在有个新问题: 设置桌面的时候,SystemParametersInfo 如何让它支持JPG的图片呢? 兄台,你知道吗? |
|
[求助]关于Random函数的神奇之处……大侠们研究一下!!!太灵异了!
百度了一下这个函数的说明,也没错啊,百度结果如下 它是随机数字产生函数 random函数返回一个0~num-1之间的随机数. random(num)是在stdlib.h中的一个宏定义. num和函数返回值都是整型数. 神奇啊 |
|
[求助]一个win32汇编的程序,折腾一天没折腾出来,前辈们帮看看……谢谢了
十分感谢!不过……程序执行的时候挂掉了……CPU使用率居高不下! 还有,由于我才疏学浅,_ChangeWall 这个函数居然没看懂…… |
|
[求助]一个win32汇编的程序,折腾一天没折腾出来,前辈们帮看看……谢谢了
问题,这样的话,只能让程序数0然后确定是第几个文件了吧? |
|
[求助]一个win32汇编的程序,折腾一天没折腾出来,前辈们帮看看……谢谢了
可以找到文件啊,可是放到缓存区里面的时候,文件名是挨着放的,并不是按照MAX_PATH的尺寸放的!不知道该怎么办了! 谁还可以知道一下啊!郁闷死了! |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值