Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

×Ô¶¯¸ü¸Ä×ÀÃæ±³¾° c/c++ win32

Õâ¸ö³ÌÐò½ö¹©±à³Ì²Î¿¼
ÈôÏëÔÚƽʱÓã¬ÇëÏÂÔØ΢ÈíµÄwallpaper changer
ÎÒÕâ¸ö³ÌÐòʵÏÖÁ˶¨Ê±¸ü»»×ÀÃæ±³¾°µÄ¹¦ÄÜ
ÃüÁîÐÐ wallpaper "your images' directory path" time_in_minute
±à³ÌÒªµã
findfirstfile findnextfile ²éÕÒͼÏñÎļþ
SystemParametersInfo  ÐÞ¸ÄϵͳÐÅÏ¢£¬ÔÚÕâ¶ùµ±È»ÊÇ×ÀÃæ±³¾°
×¢²á±í²Ù×÷ ±£´æÐÅÏ¢
Èç¹û×öµÃʵÓã¬Ó¦¼ÓÈ뿪»úÆô¶¯¹¦ÄÜ£¬×ÔÈ»»¹Òªgui
//wallpaper.c
//by onezeros@yahoo.cn||Zhijie Lee
//usage:wallpaper "full directory path" interval
// interval is in minutes
#include <windows.h>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
/* argc=3;
argv[1]="E:\\picture\\testbmp";
argv[2]="1";
*/ LPCSTR currentDir;
LPCSTR currentImage;
int interval;

HKEY hKey;
WIN32_FIND_DATAA FileData;
HANDLE hFind;

//initialize parameters
if(argc==1){
//find parameters in registry
if(RegOpenKeyA(HKEY_LOCAL_MACHINE,(LPCSTR)"Software\\wallpaper",
&hKey)!=ERROR_SUCCESS||
RegQueryValueExA(hKey,(LPCSTR)"interval",0,NULL,
(LPBYTE)interval,NULL)!=ERROR_SUCCESS||
RegQueryValueExA(hKey,(LPCSTR)"directory",0,NULL,
(LPBYTE)currentDir,NULL)!=ERROR_SUCCESS||
RegQueryValueExA(hKey,(LPCSTR)"image",0,NULL,
(LPBYTE)currentImage,NULL)!=ERROR_SUCCESS){
//if connot be found ,wrong usage
cout<<"wrong usage"<<endl
<<"Please use it like this"<<endl
<<"wallpaper \"D:\\Files\\Images\" 30"<<endl
<<"30 is the interval in minutes or"<<endl
<<"wallpaper \"D:\\Files\\Images\""<<endl
<<"with 30 minutes as default interval"<<endl;
exit(1);
}else{
hFind=FindFirstFileA(currentImage,&FileData);
if(hFind==INVALID_HANDLE_VALUE){
cout<<"connot open file";
exit(1);
}
}
}else if(argc==3){
interval=60000*atoi(argv[2]);
currentDir=(LPCSTR)argv[1];
SetCurrentDirectoryA(currentDir);
hFind = FindFirstFileA((LPCSTR)"*.jpg",&am


Ïà¹ØÎĵµ£º

jstl±êÇ©: c:ForeachÏê½â

 
Ϊѭ»·¿ØÖÆ£¬Ëü¿ÉÒÔ½«¼¯ºÏ(Collection)ÖеijÉԱѭÐòä¯ÀÀÒ»±é¡£ÔË×÷·½Ê½Îªµ±Ìõ¼þ·ûºÏʱ£¬¾Í»á³ÖÐøÖظ´Ö´Ðеı¾ÌåÄÚÈÝ¡£
¡¡¡¡ Ϊѭ»·¿ØÖÆ£¬Ëü¿ÉÒÔ½«¼¯ºÏ(Collection)ÖеijÉԱѭÐòä¯ÀÀÒ»±é¡£ÔË×÷·½Ê½Îªµ±Ìõ¼þ·ûºÏʱ£¬¾Í»á³ÖÐøÖظ´Ö´Ðеı¾ÌåÄÚÈÝ¡£
¡¡¡¡Óï·¨
¡¡¡¡Óï·¨1£ºµü´úÒ»¼¯ºÏ¶ÔÏóÖ®ËùÓгÉÔ±
¡¡¡¡<c:forEac ......

¹ØÓÚB/SºÍC/S¼Ü¹¹µÄ½éÉÜ

Ò»¡¢Ê²Ã´ÊÇC/SºÍB/S
µÚÒ»¡¢Ê²Ã´ÊÇC/S½á¹¹¡£C/S
£¨Client/Server£©½á¹¹£¬¼´´ó¼ÒÊìÖªµÄ¿Í»§»úºÍ·þÎñÆ÷½á¹¹¡£ËüÊÇÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ýËü¿ÉÒÔ³ä·ÖÀûÓÃÁ½¶ËÓ²¼þ»·¾³µÄÓÅÊÆ£¬½«ÈÎÎñºÏÀí·ÖÅäµ½
Client¶ËºÍServer¶ËÀ´ÊµÏÖ£¬½µµÍÁËϵͳµÄͨѶ¿ªÏú¡£Ä¿Ç°´ó¶àÊýÓ¦ÓÃÈí¼þϵͳ¶¼ÊÇClient/ServerÐÎʽµÄÁ½²ã½á¹¹£¬ÓÉÓÚÏÖÔÚµÄÈí¼þÓ¦
......

Ò»¸öͨѶ¼´úÂë¡£Ìṩ²Î¿¼£¬Ð´µÄ¼È²»Ïñc£¬ÓÖ²»Ïñc++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <windows.h>
#include <iostream>
using namespace std;
class student{
private:
 char name[20],addr[40];
 char id_number[40],phone[20];
public:
 void searchstud_info();
 void ......

Linux C notes (BOOK UNIX)

Chapter 1: Thread
¢Ù thread functions
1. pthread_self();
2. thread existing
    you can get the value of rval_ptr just by  pthread_join(pthread_t tht, void ** rval_ptr)
    cancel a thread as the thread exits with PTHREAD_CANCELED in pthread_exit, this functio ......

c/c++ÖÐÄÚ´æÇøÓò»®·Ö´ó×ܽá

Ò». ÔÚcÖзÖΪÕ⼸¸ö´æ´¢Çø
1.Õ» - ÓɱàÒëÆ÷×Ô¶¯·ÖÅäÊÍ·Å
2.¶Ñ - Ò»°ãÓɳÌÐòÔ±·ÖÅäÊÍ·Å£¬Èô³ÌÐòÔ±²»ÊÍ·Å£¬³ÌÐò½áÊøʱ¿ÉÄÜÓÉOS»ØÊÕ
3.È«¾ÖÇø£¨¾²Ì¬Çø£©£¬È«¾Ö±äÁ¿ºÍ¾²Ì¬±äÁ¿µÄ´æ´¢ÊÇ·ÅÔÚÒ»¿éµÄ£¬³õʼ»¯µÄÈ«¾Ö±äÁ¿ºÍ¾²Ì¬±äÁ¿ÔÚÒ»¿éÇøÓò£¬Î´³õʼ»¯µÄÈ«¾Ö±äÁ¿ºÍδ³õʼ»¯µÄ¾²Ì¬±äÁ¿ÔÚÏàÁÚµÄÁíÒ»¿éÇøÓò¡£- ³ÌÐò½áÊøÊÍ·Å
4.ÁíÍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ