win32: remove nonexistent options

This commit is contained in:
OV2 2019-02-11 17:45:08 +01:00
parent 5fdfef70d9
commit 3c928d0824
7 changed files with 22 additions and 85 deletions

View File

@ -129,15 +129,15 @@ bool CDirectSound::InitSoundBuffer()
blockTime = GUI.SoundBufferSize / blockCount; blockTime = GUI.SoundBufferSize / blockCount;
blockSamples = (Settings.SoundPlaybackRate * blockTime) / 1000; blockSamples = (Settings.SoundPlaybackRate * blockTime) / 1000;
blockSamples *= (Settings.Stereo ? 2 : 1); blockSamples *= 2;
blockSize = blockSamples * (Settings.SixteenBitSound ? 2 : 1); blockSize = blockSamples * 2;
bufferSize = blockSize * blockCount; bufferSize = blockSize * blockCount;
wfx.wFormatTag = WAVE_FORMAT_PCM; wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = Settings.Stereo ? 2 : 1; wfx.nChannels = 2;
wfx.nSamplesPerSec = Settings.SoundPlaybackRate; wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1); wfx.nBlockAlign = 2 * 2;
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8; wfx.wBitsPerSample = 16;
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
wfx.cbSize = 0; wfx.cbSize = 0;
@ -320,11 +320,11 @@ void CDirectSound::MixSound()
EnterCriticalSection(&GUI.SoundCritSect); EnterCriticalSection(&GUI.SoundCritSect);
if (B1) if (B1)
{ {
S9xMixSamples(B1,(Settings.SixteenBitSound?S1>>1:S1)); S9xMixSamples(B1, S1>>1);
} }
if (B2) if (B2)
{ {
S9xMixSamples(B2,(Settings.SixteenBitSound?S2>>1:S2)); S9xMixSamples(B2, S2>>1);
} }
LeaveCriticalSection(&GUI.SoundCritSect); LeaveCriticalSection(&GUI.SoundCritSect);

View File

@ -130,7 +130,7 @@ bool CXAudio2::InitVoices(void)
if (device_index < 0) if (device_index < 0)
device_index = 0; device_index = 0;
if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasterVoice, (Settings.Stereo?2:1), if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasterVoice, 2,
Settings.SoundPlaybackRate, 0, device_index, NULL ) ) ) { Settings.SoundPlaybackRate, 0, device_index, NULL ) ) ) {
DXTRACE_ERR_MSGBOX(TEXT("Unable to create mastering voice."),hr); DXTRACE_ERR_MSGBOX(TEXT("Unable to create mastering voice."),hr);
return false; return false;
@ -138,10 +138,10 @@ bool CXAudio2::InitVoices(void)
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
wfx.wFormatTag = WAVE_FORMAT_PCM; wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = Settings.Stereo ? 2 : 1; wfx.nChannels = 2;
wfx.nSamplesPerSec = Settings.SoundPlaybackRate; wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1); wfx.nBlockAlign = 2 * 2;
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8; wfx.wBitsPerSample = 16;
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
wfx.cbSize = 0; wfx.cbSize = 0;
@ -231,8 +231,8 @@ bool CXAudio2::SetupSound()
UINT32 blockTime = GUI.SoundBufferSize / blockCount; UINT32 blockTime = GUI.SoundBufferSize / blockCount;
singleBufferSamples = (Settings.SoundPlaybackRate * blockTime) / 1000; singleBufferSamples = (Settings.SoundPlaybackRate * blockTime) / 1000;
singleBufferSamples *= (Settings.Stereo ? 2 : 1); singleBufferSamples *= 2;
singleBufferBytes = singleBufferSamples * (Settings.SixteenBitSound ? 2 : 1); singleBufferBytes = singleBufferSamples * 2;
sum_bufferSize = singleBufferBytes * blockCount; sum_bufferSize = singleBufferBytes * blockCount;
if (InitVoices()) if (InitVoices())
@ -293,7 +293,7 @@ void CXAudio2::ProcessSound()
{ {
// Using rate control, we should always keep the emulator's sound buffers empty to // Using rate control, we should always keep the emulator's sound buffers empty to
// maintain an accurate measurement. // maintain an accurate measurement.
if (availableSamples > (freeBytes >> (Settings.SixteenBitSound ? 1 : 0))) if (availableSamples > (freeBytes >> 1))
{ {
S9xClearSamples(); S9xClearSamples();
return; return;
@ -335,7 +335,7 @@ void CXAudio2::ProcessSound()
if (availableSamples > 0 && bufferCount < blockCount) { if (availableSamples > 0 && bufferCount < blockCount) {
S9xMixSamples(soundBuffer + writeOffset, availableSamples); S9xMixSamples(soundBuffer + writeOffset, availableSamples);
partialOffset = availableSamples << (Settings.SixteenBitSound ? 1 : 0); partialOffset = availableSamples << 1;
} }
} }

View File

@ -48,8 +48,6 @@
#define IDC_MIX 1004 #define IDC_MIX 1004
#define IDC_OUTPUT_DEVICE 1004 #define IDC_OUTPUT_DEVICE 1004
#define IDC_DYNRATECONTROL 1005 #define IDC_DYNRATECONTROL 1005
#define IDC_STEREO 1006
#define IDC_REV_STEREO 1007
#define IDC_LINEAR_INTER 1008 #define IDC_LINEAR_INTER 1008
#define IDC_SYNC_TO_SOUND_CPU 1009 #define IDC_SYNC_TO_SOUND_CPU 1009
#define IDC_ECHO 1011 #define IDC_ECHO 1011
@ -405,8 +403,6 @@
#define ID_SOUND_INTERPOLATED 40027 #define ID_SOUND_INTERPOLATED 40027
#define ID_SOUND_SYNC 40028 #define ID_SOUND_SYNC 40028
#define ID_WINDOW_FULLSCREEN 40029 #define ID_WINDOW_FULLSCREEN 40029
#define ID_SOUND_16BIT 40030
#define ID_SOUND_STEREO 40031
#define ID_WINDOW_STRETCH 40032 #define ID_WINDOW_STRETCH 40032
#define ID_SOUND_8000HZ 40033 #define ID_SOUND_8000HZ 40033
#define ID_SOUND_11025HZ 40034 #define ID_SOUND_11025HZ 40034
@ -436,7 +432,6 @@
#define ID_SOUND_48000HZ 40085 #define ID_SOUND_48000HZ 40085
#define ID_SOUND_16000HZ 40086 #define ID_SOUND_16000HZ 40086
#define ID_SOUND_35000HZ 40087 #define ID_SOUND_35000HZ 40087
#define ID_SOUND_REVERSE_STEREO 40088
#define ID_FILE_SAVE_SRAM_DATA 40089 #define ID_FILE_SAVE_SRAM_DATA 40089
#define ID_RECENT_DUMMY 40090 #define ID_RECENT_DUMMY 40090
#define IDM_ROM_INFO 40094 #define IDM_ROM_INFO 40094

View File

@ -41,8 +41,6 @@ BEGIN
LTEXT "Playback Rate:",IDC_STATIC,125,53,49,11 LTEXT "Playback Rate:",IDC_STATIC,125,53,49,11
CONTROL "&Dynamic Rate Control",IDC_DYNRATECONTROL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,97,102,10 CONTROL "&Dynamic Rate Control",IDC_DYNRATECONTROL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,97,102,10
CONTROL "&Automatic Input Rate",IDC_AUTOMATICINPUTRATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,109,102,10 CONTROL "&Automatic Input Rate",IDC_AUTOMATICINPUTRATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,109,102,10
CONTROL "&Stereo",IDC_STEREO,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,295,37,102,10
CONTROL "&Reverse Stereo",IDC_REV_STEREO,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,49,102,10
CONTROL "&Synchronize with sound core",IDC_SYNC_TO_SOUND_CPU, CONTROL "&Synchronize with sound core",IDC_SYNC_TO_SOUND_CPU,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,85,102,10 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,295,85,102,10
PUSHBUTTON "&Cancel",IDCANCEL,350,134,56,16 PUSHBUTTON "&Cancel",IDCANCEL,350,134,56,16
@ -786,7 +784,6 @@ BEGIN
VK_F8, ID_OPTIONS_SETTINGS, VIRTKEY, ALT, NOINVERT VK_F8, ID_OPTIONS_SETTINGS, VIRTKEY, ALT, NOINVERT
"[", ID_SOUND_INTERPOLATED, ASCII, ALT, NOINVERT "[", ID_SOUND_INTERPOLATED, ASCII, ALT, NOINVERT
"T", ID_SOUND_OPTIONS, VIRTKEY, ALT, NOINVERT "T", ID_SOUND_OPTIONS, VIRTKEY, ALT, NOINVERT
"R", ID_SOUND_REVERSE_STEREO, VIRTKEY, ALT, NOINVERT
"]", ID_SOUND_SYNC, ASCII, ALT, NOINVERT "]", ID_SOUND_SYNC, ASCII, ALT, NOINVERT
VK_RETURN, ID_WINDOW_FULLSCREEN, VIRTKEY, ALT, NOINVERT VK_RETURN, ID_WINDOW_FULLSCREEN, VIRTKEY, ALT, NOINVERT
VK_BACK, ID_WINDOW_STRETCH, VIRTKEY, ALT, NOINVERT VK_BACK, ID_WINDOW_STRETCH, VIRTKEY, ALT, NOINVERT
@ -1034,9 +1031,6 @@ BEGIN
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "Enable All", ID_CHANNELS_ENABLEALL MENUITEM "Enable All", ID_CHANNELS_ENABLEALL
END END
MENUITEM "&16-Bit Sound", ID_SOUND_16BIT
MENUITEM "&Stereo", ID_SOUND_STEREO
MENUITEM "&Reverse Stereo\tAlt+R", ID_SOUND_REVERSE_STEREO
MENUITEM SEPARATOR MENUITEM SEPARATOR
MENUITEM "S&ync Sound\tAlt+]", ID_SOUND_SYNC MENUITEM "S&ync Sound\tAlt+]", ID_SOUND_SYNC
MENUITEM "&Settings...\tAlt+T", ID_SOUND_OPTIONS MENUITEM "&Settings...\tAlt+T", ID_SOUND_OPTIONS

View File

@ -669,7 +669,6 @@ void WinPostLoad(ConfigFile& conf)
i = -1; i = -1;
} }
} }
if(conf.Exists("Sound::Mono")) Settings.Stereo = !conf.GetBool("Sound::Mono"); // special case
ConfigFile::SetNiceAlignment(niceAlignment); ConfigFile::SetNiceAlignment(niceAlignment);
ConfigFile::SetShowComments(showComments); ConfigFile::SetShowComments(showComments);
@ -812,11 +811,8 @@ void WinRegisterConfigItems()
#undef CATEGORY #undef CATEGORY
#define CATEGORY "Sound" #define CATEGORY "Sound"
AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable."); AddIntC("Sync", Settings.SoundSync, 1, "1 to sync emulation to sound output, 0 to disable.");
AddBool2("Stereo", Settings.Stereo, true);
AddBool("SixteenBitSound", Settings.SixteenBitSound, true);
AddUIntC("Rate", Settings.SoundPlaybackRate, 44100, "sound playback quality, in Hz"); AddUIntC("Rate", Settings.SoundPlaybackRate, 44100, "sound playback quality, in Hz");
AddUIntC("InputRate", Settings.SoundInputRate, 31950, "for each 'Input rate' samples generated by the SNES, 'Playback rate' samples will produced. If you experience crackling you can try to lower this setting."); AddUIntC("InputRate", Settings.SoundInputRate, 31950, "for each 'Input rate' samples generated by the SNES, 'Playback rate' samples will produced. If you experience crackling you can try to lower this setting.");
AddBoolC("ReverseStereo", Settings.ReverseStereo, false, "true to swap speaker outputs");
AddBoolC("Mute", GUI.Mute, false, "true to mute sound output (does not disable the sound CPU)"); AddBoolC("Mute", GUI.Mute, false, "true to mute sound output (does not disable the sound CPU)");
AddBool("DynamicRateControl", Settings.DynamicRateControl, false); AddBool("DynamicRateControl", Settings.DynamicRateControl, false);
AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true); AddBool("AutomaticInputRate", GUI.AutomaticInputRate, true);

View File

@ -1226,10 +1226,10 @@ void DoAVIOpen(const TCHAR* filename)
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
wfx.wFormatTag = WAVE_FORMAT_PCM; wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = Settings.Stereo ? 2 : 1; wfx.nChannels = 2;
wfx.nSamplesPerSec = Settings.SoundPlaybackRate; wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1); wfx.nBlockAlign = 2 * 2;
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8; wfx.wBitsPerSample = 16;
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
wfx.cbSize = 0; wfx.cbSize = 0;
@ -1303,10 +1303,10 @@ void DoAVIVideoFrame()
const WAVEFORMATEX* pwfex = NULL; const WAVEFORMATEX* pwfex = NULL;
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
wfx.wFormatTag = WAVE_FORMAT_PCM; wfx.wFormatTag = WAVE_FORMAT_PCM;
wfx.nChannels = Settings.Stereo ? 2 : 1; wfx.nChannels = 2;
wfx.nSamplesPerSec = Settings.SoundPlaybackRate; wfx.nSamplesPerSec = Settings.SoundPlaybackRate;
wfx.nBlockAlign = (Settings.SixteenBitSound ? 2 : 1) * (Settings.Stereo ? 2 : 1); wfx.nBlockAlign = 2 * 2;
wfx.wBitsPerSample = Settings.SixteenBitSound ? 16 : 8; wfx.wBitsPerSample = 16;
wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign; wfx.nAvgBytesPerSec = wfx.nSamplesPerSec * wfx.nBlockAlign;
wfx.cbSize = 0; wfx.cbSize = 0;
if(avi_skip_frames != Settings.SkipFrames || if(avi_skip_frames != Settings.SkipFrames ||
@ -1327,7 +1327,7 @@ void DoAVIVideoFrame()
// generate sound // generate sound
if(pwfex) if(pwfex)
{ {
const int stereo_multiplier = (Settings.Stereo) ? 2 : 1; const int stereo_multiplier = 2;
avi_sound_samples_error += avi_sound_samples_per_update; avi_sound_samples_error += avi_sound_samples_per_update;
int samples = (int) avi_sound_samples_error; int samples = (int) avi_sound_samples_error;

View File

@ -2005,17 +2005,6 @@ LRESULT CALLBACK WinProc(
GUI.Mute = !GUI.Mute; GUI.Mute = !GUI.Mute;
break; break;
case ID_SOUND_STEREO:
Settings.Stereo = !Settings.Stereo;
ReInitSound();
break;
case ID_SOUND_REVERSE_STEREO:
Settings.ReverseStereo = !Settings.ReverseStereo;
break;
case ID_SOUND_16BIT:
Settings.SixteenBitSound = !Settings.SixteenBitSound;
ReInitSound();
break;
case ID_SOUND_SYNC: case ID_SOUND_SYNC:
Settings.SoundSync = !Settings.SoundSync; Settings.SoundSync = !Settings.SoundSync;
S9xDisplayStateChange (WINPROC_SYNC_SND, Settings.SoundSync); S9xDisplayStateChange (WINPROC_SYNC_SND, Settings.SoundSync);
@ -3758,8 +3747,6 @@ static void CheckMenuStates ()
if (Settings.SoundPlaybackRate == 0 || GUI.Mute) if (Settings.SoundPlaybackRate == 0 || GUI.Mute)
mii.fState |= MFS_DISABLED; mii.fState |= MFS_DISABLED;
SetMenuItemInfo (GUI.hMenu, ID_SOUND_16BIT, FALSE, &mii);
SetMenuItemInfo (GUI.hMenu, ID_SOUND_STEREO, FALSE, &mii);
SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii);
SetMenuItemInfo (GUI.hMenu, ID_SOUND_INTERPOLATED, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_SOUND_INTERPOLATED, FALSE, &mii);
@ -3777,11 +3764,6 @@ static void CheckMenuStates ()
SetMenuItemInfo (GUI.hMenu, ID_SOUND_194MS, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_SOUND_194MS, FALSE, &mii);
SetMenuItemInfo (GUI.hMenu, ID_SOUND_210MS, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_SOUND_210MS, FALSE, &mii);
if (!Settings.Stereo)
mii.fState |= MFS_DISABLED;
SetMenuItemInfo (GUI.hMenu, ID_SOUND_REVERSE_STEREO, FALSE, &mii);
mii.fState = MFS_CHECKED; mii.fState = MFS_CHECKED;
if (GUI.AVIOut) if (GUI.AVIOut)
mii.fState |= MFS_DISABLED; mii.fState |= MFS_DISABLED;
@ -3821,18 +3803,9 @@ static void CheckMenuStates ()
} }
SetMenuItemInfo (GUI.hMenu, id, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, id, FALSE, &mii);
if (Settings.SixteenBitSound)
SetMenuItemInfo (GUI.hMenu, ID_SOUND_16BIT, FALSE, &mii);
if (Settings.Stereo)
SetMenuItemInfo (GUI.hMenu, ID_SOUND_STEREO, FALSE, &mii);
if (Settings.SoundSync) if (Settings.SoundSync)
SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_SOUND_SYNC, FALSE, &mii);
if (!Settings.Stereo)
mii.fState |= MFS_DISABLED;
if (Settings.ReverseStereo)
SetMenuItemInfo (GUI.hMenu, ID_SOUND_REVERSE_STEREO, FALSE, &mii);
#ifdef DEBUGGER #ifdef DEBUGGER
mii.fState = (CPU.Flags & TRACE_FLAG) ? MFS_CHECKED : MFS_UNCHECKED; mii.fState = (CPU.Flags & TRACE_FLAG) ? MFS_CHECKED : MFS_UNCHECKED;
SetMenuItemInfo (GUI.hMenu, ID_DEBUG_TRACE, FALSE, &mii); SetMenuItemInfo (GUI.hMenu, ID_DEBUG_TRACE, FALSE, &mii);
@ -4475,11 +4448,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
if (Settings.DynamicRateControl) if (Settings.DynamicRateControl)
SendDlgItemMessage(hDlg, IDC_DYNRATECONTROL, BM_SETCHECK, BST_CHECKED, 0); SendDlgItemMessage(hDlg, IDC_DYNRATECONTROL, BM_SETCHECK, BST_CHECKED, 0);
if (Settings.Stereo)
SendDlgItemMessage(hDlg, IDC_STEREO, BM_SETCHECK, BST_CHECKED, 0);
else EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), FALSE);
if (Settings.ReverseStereo)
SendDlgItemMessage(hDlg, IDC_REV_STEREO, BM_SETCHECK, BST_CHECKED, 0);
if (GUI.Mute) if (GUI.Mute)
SendDlgItemMessage(hDlg, IDC_MUTE, BM_SETCHECK, BST_CHECKED, 0); SendDlgItemMessage(hDlg, IDC_MUTE, BM_SETCHECK, BST_CHECKED, 0);
@ -4539,8 +4507,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hDlg, IDC_DRIVER, CB_GETCURSEL, 0,0),0); SendDlgItemMessage(hDlg, IDC_DRIVER, CB_GETCURSEL, 0,0),0);
Settings.DynamicRateControl=IsDlgButtonChecked(hDlg, IDC_DYNRATECONTROL); Settings.DynamicRateControl=IsDlgButtonChecked(hDlg, IDC_DYNRATECONTROL);
Settings.SoundSync=IsDlgButtonChecked(hDlg, IDC_SYNC_TO_SOUND_CPU); Settings.SoundSync=IsDlgButtonChecked(hDlg, IDC_SYNC_TO_SOUND_CPU);
Settings.Stereo=IsDlgButtonChecked(hDlg, IDC_STEREO);
Settings.ReverseStereo=IsDlgButtonChecked(hDlg, IDC_REV_STEREO);
GUI.Mute=IsDlgButtonChecked(hDlg, IDC_MUTE); GUI.Mute=IsDlgButtonChecked(hDlg, IDC_MUTE);
GUI.FAMute=IsDlgButtonChecked(hDlg, IDC_FAMT)!=0; GUI.FAMute=IsDlgButtonChecked(hDlg, IDC_FAMT)!=0;
@ -4646,20 +4612,6 @@ INT_PTR CALLBACK DlgSoundConf(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
return true; return true;
} }
else return false; else return false;
case IDC_STEREO:
{
if(BN_CLICKED==HIWORD(wParam)||BN_DBLCLK==HIWORD(wParam))
{
if(IsDlgButtonChecked(hDlg,IDC_STEREO))
{
EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), TRUE);
}
else EnableWindow(GetDlgItem(hDlg, IDC_REV_STEREO), FALSE);
return true;
}
else return false;
}
case IDC_INRATEEDIT: case IDC_INRATEEDIT:
if(HIWORD(wParam)==EN_UPDATE) { if(HIWORD(wParam)==EN_UPDATE) {
Edit_GetText(GetDlgItem(hDlg,IDC_INRATEEDIT),valTxt,10); Edit_GetText(GetDlgItem(hDlg,IDC_INRATEEDIT),valTxt,10);