发布于 2003-07-08 09:28:08
0楼
用Dbase III格式#include "apdefap.h"
void OnLButtonDown(char* lpszPictureName,
char* lpszObjectName, char* lpszPropertyName,
UINT nFlags, int x, int y)
{
#pragma code("kernel32.dll");
char *pp,e[40],temp[100];
void GetLocalTime(SYSTEMTIME*lpst);
DWORD Val,Valm,Vald;
char TmpStr[64];
BOOL CopyFileA(LPCTSTR,LPCTSTR,BOOL);
#pragma code()
SYSTEMTIME time;
GetLocalTime(&time);
SetTagDWord("year",time.wYear); //Return-Type :BOOL
SetTagDWord("month",time.wMonth); //Return-Type :BOOL
SetTagDWord("day",time.wDay); //Return-Type :BOOL
SetTagDWord("hour",time.wHour); //Return-Type :BOOL
SetTagDWord("minute",time.wMinute); //Return-Type :BOOL
SetTagDWord("second",time.wSecond); //Return-Type :BOOL
Val = GetTagDWord("year");
Valm= GetTagDWord("month");
Vald = GetTagDWord("day");
sprintf (TmpStr, "%u%u%u%u%u%u",
Val,Valm,Vald,GetTagDWord("hour"),
GetTagDWord("minute"),GetTagDWord("second"));
SetTagChar ("txtyear", TmpStr);
printf("\"%s\"\r\n",TmpStr);
strcpy(temp,"H:\\useful_email\int2str\\PDE\\test\\"); //Return-Type :char*
strcat(temp,GetTagChar ("txtyear"));
strcat(temp,".dbf");
printf("\"%s\"\r\n",temp);
CopyFileA("H:\\useful_email\\int2str\PDE\\test\\test.dbf",temp,FALSE);
}