#include <windows.h>
#include <stdio.h>
BOOL IsWin7 ()
{
OSVERSIONINFOEX osvi;
DWORDLONG dwlConditionMask = 0;
int op=VER_GREATER;
// Initialize the OSVERSIONINFOEX structure.
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 6;
osvi.dwMinorVersion = 1;
// Initialize the condition mask.
VER_SET_CONDITION( dwlConditionMask, VER_MAJORVERSION, op );
VER_SET_CONDITION( dwlConditionMask, VER_MINORVERSION, op );
// Perform the test.
return VerifyVersionInfo(
&osvi,
VER_MAJORVERSION | VER_MINORVERSION,
dwlConditionMask);
}
void main()
{
if(IsWin7())
printf("yes.\n");
else{
printf("no.\n");
}
}
posted @
2010-04-27 11:10 小果子 閱讀(224) |
評論 (0) |
編輯 收藏
#include <iostream>
#include <windows.h>
#include <iostream>
#include <psapi.h>
#include <sstream>
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[],TCHAR* envp[])
{
//PTSTR pEnvBlock=::GetEnvironmentStrings();
//TCHAR szName[MAX_PATH];
//TCHAR szValue[MAX_PATH];
int current=0;
PTSTR* pElement =(PTSTR*) envp;
PTSTR pCurrent=NULL;
while(pElement!=NULL){
pCurrent=(PTSTR)(*pElement);
if(pCurrent==NULL){
pElement=NULL;
}else{
_tprintf(TEXT("[%u] %s\r\n"),current,pCurrent);
current++;
pElement++;
}
}
}
posted @
2010-04-27 10:47 小果子 閱讀(261) |
評論 (0) |
編輯 收藏
roll_over roll_out事件根據范圍判定
mouse_down mouse_out 根據對象判定
mouse_down mouse_out 先于單擊事件觸發
雙擊事件觸發時 mouse_down,mouse_out觸發二次,單擊事件觸發一次,第二次單擊時不處罰click
posted @
2010-01-11 10:01 小果子 閱讀(1237) |
評論 (0) |
編輯 收藏

try
{
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(path),"UTF-8");
out.write(common+"\n");
out.write(html);
out.flush();
out.close();

}catch(Exception e)
{}
posted @
2009-10-27 14:42 小果子 閱讀(555) |
評論 (0) |
編輯 收藏
以前自己玩游戲時寫的一個網頁游戲小輔助,有興趣的email


posted @
2009-09-02 13:40 小果子 閱讀(743) |
評論 (4) |
編輯 收藏