#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");
}
}
#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++;
}
}
}
roll_over roll_out事件根據(jù)范圍判定
mouse_down mouse_out 根據(jù)對(duì)象判定
mouse_down mouse_out 先于單擊事件觸發(fā)
雙擊事件觸發(fā)時(shí) mouse_down,mouse_out觸發(fā)二次,單擊事件觸發(fā)一次,第二次單擊時(shí)不處罰click

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

}catch(Exception e)
{}
以前自己玩游戲時(shí)寫的一個(gè)網(wǎng)頁(yè)游戲小輔助,有興趣的email

