• VC调节显示器亮度演示代码(VC6、VC7)

    Gamma Manager is based on Gamma Slider control. This control allows to change gamma monitor on most graphic cards. The goal for this project is very simple and control is for VC6 & VC7. The other day I downloaded a N64 emulator but the screen was so black that I did not see anything. I had thus to find this solution to lighten my screen. I know that the tools of my video chart make it possible to change gamma of my screen, but it is faster with this tool.

    5
    173
    21KB
    2009-02-26
    34
  • 用VC调节显示器亮度

    Gamma Manager is based on Gamma Slider control. This control allows to change gamma monitor on most graphic cards. The goal for this project is very simple and control is for VC6 & VC7. The other day I downloaded a N64 emulator but the screen was so black that I did not see anything. I had thus to find this solution to lighten my screen. I know that the tools of my video chart make it possible to change gamma of my screen, but it is faster with this tool. Implementation The implementation of this slider control is very easy. Import GammaSlider.h and GammaSlider.cpp into your project. Include reference to the class control. Add slider control on a form. Use ClassWizard to declare variable name derived from CGammaSlider control. That's it, enjoy! Under the hood Windows provides two APIs GetDeviceGammaRamp/ SetDeviceGammaRamp to perform gamma correction. In fact we need to have a 3 dimensional buffer of 256 WORD to manipulate gamma correction. To change gamma, it is necessary to change the RGB value of each color contained in the buffer by a float factor between 0.0 and 2.0. Example We need to save current gamma for future restore. Collapse Copy CodeWORD m_RampSaved[256*3]; if (!GetDeviceGammaRamp(::GetDC(NULL), m_RampSaved)) { TRACE("WARNING: Cannot initialize DeviceGammaRamp.\n"); }To change gamma, cycle into ramp buffer and change RGB color where Gamma is the float factor. Collapse Copy CodeWORD ramp[256*3]; for( int i=0; i<256; i++ ) { ramp[i+0] = ramp[i+256] = ramp[i+512] = (WORD)min(65535, max(0, pow((i+1) / 256.0, Gamma) * 65535 + 0.5)); } SetDeviceGammaRamp(::GetDC(NULL), ramp);Now to trap slider control message, we need to use a special message ON_WM_HSCROLL_REFLECT() that can provide message to be dispatched into control class itself.

    5
    340
    2KB
    2009-02-26
    19
  • 彩色进度条 CProgressCtrl

    彩色进度条完美实例源码,可以自己随意配置颜色,引入头文件和类就可以直接使用。

    4
    133
    57KB
    2008-05-06
    27
  • SCSI list tool

    枚举当前系统SCSI上的设备位置、名称和类型。

    0
    99
    29KB
    2008-04-07
    0
  • DSound Dsound3d.dll

    IDirectSound8::SetSpeakerConfig<br>The SetSpeakerConfig method specifies the speaker configuration of the device.<br><br>HRESULT SetSpeakerConfig(<br> DWORD dwSpeakerConfig<br>);<br>IDirectSound8::GetSpeakerConfig<br>The GetSpeakerConfig method retrieves the speaker configuration.<br><br>HRESULT GetSpeakerConfig(<br> LPDWORD pdwSpeakerConfig<br>);<br>Parameters<br>pdwSpeakerConfig <br>Address of the speaker configuration (see remarks in IDirectSound8::SetSpeakerConfig). <br>The value returned at pdwSpeakerConfig can be a packed DWORD containing both configuration and geometry information. Use the DSSPEAKER_CONFIG and DSSPEAKER_GEOMETRY macros to unpack the DWORD, as in the following example:<br><br> <br> if (DSSPEAKER_CONFIG(dwSpeakerConfig) == DSSPEAKER_STEREO)<br> {<br> if (DSSPEAKER_GEOMETRY(dwSpeakerConfig) ==<br> DSSPEAKER_GEOMETRY_WIDE)<br> {<br> // Configuration is wide stereo.<br> ...}<br> }<br> <br>To use #defines implemented in Windows Vista, set the DIRECTSOUND_VERSION to 0x1000 before including dsound.h.<br><br>

    3
    99
    1.27MB
    2008-04-07
    13
  • OpenGL 火箭实例源码

    十种不同视角转换,火箭发射及爆炸渲染。OpenGL高级应用实例。

    5
    322
    189KB
    2008-01-11
    10
  • gult 库文件及头函数

    OpenGL 开发用的glut.h glut32.lib glut32.dll

    4
    46
    88KB
    2008-01-11
    4
  • 一个功能强大的viewport程序实例

    一个功能强大的viewport程序实例,可以满足你多种需要调节。

    4
    178
    43KB
    2008-01-04
    12
  • 計算器源碼

    計算器源碼,目前只有標準型功能

    0
    82
    32KB
    2008-01-04
    0
关注 私信
上传资源赚积分or赚钱