好友
阅读权限10
听众
最后登录1970-1-1
|
arsh
发表于 2012-3-30 20:56
又来水了.以前在猴岛发过,
都知道买了烟雾头需要设置系统分辨率`刷新率`真彩色 = 800*600`75 ` 16放在目录下运行即可,退出CF后自动还原为原来的配置``
// CF烟雾设置Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "stdio.h"
#include "windows.h"
#include "string.h"
#include "Tlhelp32.h"
#define GAME_PROCESS_NAME "QQLogin.exe"
#define GAME_PROCESS_NAME2 "crossfire.exe"
BOOL FindProcessName(const char*ProcessName);
#pragma comment( linker, "/subsystem:"windows" /entry:"mainCRTStartup"" ) //隐藏dos
void main()
{
//MessageBox(NULL,"by:arsh QQ:2605574 "," CF烟雾设置一键",MB_OK);
WinExec("QQlogin.exe",SW_SHOW);
if(FindProcessName(GAME_PROCESS_NAME))
{
DEVMODE devmode,oldmode;
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&devmode);
ZeroMemory(&oldmode,sizeof(DEVMODE));
CopyMemory(&oldmode,&devmode,sizeof(DEVMODE));
devmode.dmPelsWidth=800;
devmode.dmPelsHeight=600;
devmode.dmBitsPerPel=16;
devmode.dmDisplayFrequency=75;
devmode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL|DM_DISPLAYFREQUENCY;
ChangeDisplaySettings(&devmode,0);
}
else
{
BOOL FindProcessName(const char*ProcessName);
if(FindProcessName(GAME_PROCESS_NAME2))
{
DEVMODE devmode,oldmode;
EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&devmode);
ZeroMemory(&oldmode,sizeof(DEVMODE));
CopyMemory(&oldmode,&devmode,sizeof(DEVMODE));
oldmode.dmPelsWidth;
oldmode.dmPelsHeight;
oldmode.dmBitsPerPel;
oldmode.dmDisplayFrequency;
oldmode.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL|DM_DISPLAYFREQUENCY;
ChangeDisplaySettings(&oldmode,0);
}
}
}
BOOL FindProcessName(const char*ProcessName)
{
PROCESSENTRY32 stProcess;
HANDLE hProcessShot;
hProcessShot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
Process32First(hProcessShot,&stProcess);
do
{
if(!strcmp(ProcessName,stProcess.szExeFile))
return TRUE;
}
while(Process32Next(hProcessShot,&stProcess));
CloseHandle(hProcessShot);
return FALSE;
}
|
|
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
|
|
|
|