×Ô¶¯¸ü¸Ä×ÀÃæ±³¾° 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
Ïà¹ØÎĵµ£º
×î½üÏëд¸ö¿ØÖÆÌ¨ÏµĽø¶ÈÌõ£¬¿ÉÒÔÖªµÀ³ÌÐòµÄ½øÕ¹Çé¿ö£¬²»ÓÃŪ¸ö½çÃæ¡£ÆäÖÐ×îÖ÷ÒªµÄ¾ÍÊÇ“\b“×Ö·û£¬ËüµÄasciiÂëÖµÊÇ10£¬ÊÇÍ˸ñµÄÒâ˼¡£
ÏÖ°Ñ´úÂëÌùÉÏ£¬ÈçÏ£¨¿ÉÒÔÔÚvcºÍlinux±àÒ룩£º
progress.c
#include <stdio.h>
#ifdef _WIN32
#include <windows.h>
#define mysleep(n) Sleep(n*1000)
......
1.int *p1 = *(int **)p2;
Õâ¸ö±í´ïʽ½«p2Ö¸ÏòµÄÖµµ±×öÖ¸ÕëÀàÐ͸³Öµ¸øp1
£¬½«ÆÕֵͨµ±×öÖ¸ÕëֵʹÓÃ
2.*£¨int **£©p1 = p2£»
Õâ¸ö±í´ïʽ½«p1Ö¸ÏòµÄÖµÐÞ¸ÄΪµÄp2±£´æµÄÖ¸Õë
µÄÖµ£¬½«Ö¸Õëµ±×öÆÕֵͨʹÓÃ
ÕâÊǽñÌì¿´us/OSµÄÄÚ´æ¹ÜÀíµÄʱºò¿´µ½µÄ£¬ÕæÊÇÌ«¾«±ÙÁË
°¦£¬¿´À´×Ô¼ºµÄ¼ûʶ»¹ÊÇÌ«ÉÙÁË£¬ÒÔºóµÃ¼Ó±¶Å ......
1. ÏÂÔØSQLitewindows°æ
ÎÒÃÇ¿ÉÒÔ´ÓÏÂÁÐÍøÕ¾ÏÂÔØsqliteµÄwindows°æ¡£
http://www.sqlite.com.cn/bbs/topicdisp.asp?tid=182&topage=1#gotolast
ÏÂÔØÕâ¸öÈý¸öÎļþ£º
SQLite 3.3.7 ÏÂÔØ
windows°æ
sqlite-3_3_7.zip Õâ¸öÊÇSQLiteµÄwindows¿ÉÖ´ÐÐÎļþ
sqlitedll-3_3_7.zip Õâ¸ö ......
Á´±íÖÐÓÐÁ½¸ö¹Ø¼üµÄ²Ù×÷£º´´½¨ºÍɾ³ý¡£½ñÌìÎҾͶÔÕâÁ½¸ö²Ù×÷½øÐнéÉÜ£¬
´ÓÕâÁ½¸ö²Ù×÷ÖÐѧϰµ½Á´±íµÄ»ù±¾Ó÷¨¡£
1. Create
Create() ÊÇÒ»¸öÁ´±í»ù´¡£¬Ö»Óн¨Á¢ºÃÁ´±í²ÅÄܶÔËü½øÐÐÏàÓ¦µÄ²éÕÒ£¬É¾³ý µÈ¡£
»ù±¾Ëã·¨£º
1.³õʼ»¯
head=NULL;
......
DelphiºÍC++Êý¾ÝÀàÐͶÔÕÕ±í
Delphi ×Ö³¤/ÖµÓò C++
ShortInt &n ......