沉寂了一段時間,現在繼續SWT Win32 Extension的開發,說實話,最近的進展挺失敗的。Black Glossy效果我發現在某些機器上的顯示效果非常的卡,我自己的機器卻沒有任何問題。另外就是我最近在XP下實現了Window Mixer API,用來管理系統聲音。Win98,2000,XP都沒有問題,結果Vista讓我郁悶了,Vista居然取消了Mixer,我哭呀。以下是微軟員工給出的答案:
That's because the mixer APIs are virtualized on Windows Vista - you don't get to see the real audio hardware by default, only a virtualized version. We did this because the vast majority of applications that used the mixer APIs were using them to control their own volume, which is quite rude (it says "I own the box, no other sounds on the system matter").
You have two choices. The first is to run your application in XP compatibility mode, in which case you'll be able to access the real audio hardware (please note: you'll see exactly what the hardware provides, which may lead to surprising results).
The other choice is to use the new Vista audio engine APIs. either the IAudioEndpointVolume API which allows you access to the master volume for each of the audio endpoints on the machine. If you really need to access the actual audio controls the IDeviceTopology interface will allow you direct access to the various controls on the audio hardware.
沒脾氣了,只能專門為Vista實現一套簡單的API了。