I know how to set ring volume, but how to display it?
Dear all:
Now i can set ring volume according some experts help. they had ever past some guides in this forum. I just re-paste part of my program.
void SetGSMVolume(DWORD *devGSMVolumeLevel)
{
HKEY Key = NULL;
//dwPhoneVolumeLevel between 0 and 0xFFFFFFFF
DWORD res = RegOpenKeyEx(HKEY_CURRENT_USER,_T("\\ControlPanel\ \Volume"),0,0,&Key);
if (res == ERROR_SUCCESS)
{
res = RegSetValueEx(Key,_T("Ringer"),0,REG_DWORD,(LPBYTE )devGSMVolumeLevel,sizeof(DWORD));
if (res != ERROR_SUCCESS) {;}
//RegCloseKey(Key);
}
RegCloseKey(Key);
Sleep(500);
}
But I meet another question: I can set any value for the ring, and read it out correctly. But the display on icon is not right. The icon always fixed at some point, I can set it use pen, not program.
Who can help me to synchrize the display and my ring volume?
The value in registry is aligned with what i set, not same with its display.
thanks
|