自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(1)
  • 资源 (9)
  • 收藏
  • 关注

原创 AVI文件格式

AVI(Audio Video Interleaved的缩写)是一种RIFF(Resource Interchange File Format的缩写)文件格式,多用于音视频捕捉、编辑、回放等应用程序中。通常情况下,一个AVI文件可以包含多个不同类型的媒体流(典型的情况下有一个音频流和一个视频流),不过含有单一音频流或单一视频流的AVI文件也是合法的。AVI可以算是Windows操作系统上最基本的、

2008-03-31 16:58:00 644 1

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.

2009-02-26

用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.

2009-02-26

彩色进度条 CProgressCtrl

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

2008-05-06

SCSI list tool

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

2008-04-07

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>

2008-04-07

OpenGL 火箭实例源码

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

2008-01-11

gult 库文件及头函数

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

2008-01-11

一个功能强大的viewport程序实例

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

2008-01-04

計算器源碼

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

2008-01-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除