Created
March 2, 2015 03:28
-
-
Save kumatti1/3d8436480b092110fbd0 to your computer and use it in GitHub Desktop.
iGPU色調整
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#using <C:\\Windows\\System32\\gfxSrvc.dll> | |
#using <System.Windows.Forms.dll> | |
using namespace System; | |
using namespace System::Windows::Forms; | |
using namespace System::Reflection; | |
using namespace System::Runtime::InteropServices; | |
using namespace ServiceLibrary; | |
void settings(int deviceID); | |
void test() | |
{ | |
CEDID ^objPenent = gcnew CEDID; | |
for(int i = 0 ; i < 32 ; i++) | |
{ | |
int tmp = 1; | |
CEDID::CEDID_V1_Block ^objChild = gcnew CEDID::CEDID_V1_Block; | |
int DevID = tmp << i; | |
objChild->DsiplayDev->U32DeviceID = DevID; | |
if (objPenent->GetEDIDBlock(objChild)) | |
{ | |
settings(objChild->DsiplayDev->U32DeviceID); | |
} | |
break; | |
} | |
} | |
void settings(int deviceID) | |
{ | |
ColorInfo ^colorinf = gcnew ColorInfo; | |
colorinf->device = gcnew CDevice(deviceID); | |
colorinf->FillColorInfo(); | |
array<int>^ ary1 = gcnew array<int>( {50, 50, 50} ); | |
colorinf->Contrast->I32CurrentValues = ary1; | |
array<int>^ ary2 = gcnew array<int>( {-30, -30, -30} ); | |
colorinf->Brightness->I32CurrentValues = ary2; | |
colorinf->SetColor(); | |
} | |
int CALLBACK WinMain( | |
_In_ HINSTANCE hInstance, | |
_In_ HINSTANCE hPrevInstance, | |
_In_ LPSTR lpCmdLine, | |
_In_ int nCmdShow | |
) | |
{ | |
test(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment