--- np2/win9x/dialog/d_sound.cpp 2007/11/11 11:00:02 1.22 +++ np2/win9x/dialog/d_sound.cpp 2011/03/07 09:54:11 1.25 @@ -1,24 +1,35 @@ -#include "compiler.h" -#include -#include -#include "strres.h" -#include "resource.h" -#include "np2.h" -#include "oemtext.h" -#include "dosio.h" -#include "joymng.h" -#include "sysmng.h" -#include "menu.h" -#include "np2class.h" -#include "dialog.h" -#include "dialogs.h" -#include "pccore.h" -#include "iocore.h" -#include "sound.h" -#include "fmboard.h" -#include "s98.h" -#include "dipswbmp.h" - +/** + * @file d_sound.cpp + * @brief Sound configure dialog procedure + * + * @author $Author: yui $ + * @date $Date: 2011/03/07 09:54:11 $ + */ + +#include "compiler.h" +#include +#include +#include "strres.h" +#include "resource.h" +#include "np2.h" +#include "oemtext.h" +#include "dosio.h" +#include "joymng.h" +#include "sysmng.h" +#include "menu.h" +#include "np2class.h" +#include "dialog.h" +#include "dialogs.h" +#include "pccore.h" +#include "iocore.h" +#include "sound.h" +#include "fmboard.h" +#include "s98.h" +#include "dipswbmp.h" + +#if !defined(__GNUC__) +#pragma comment(lib, "comctl32.lib") +#endif // !defined(__GNUC__) static const CBPARAM cpIO26[] = { @@ -69,8 +80,6 @@ static const CBPARAM cpID[] = {MAKEINTRESOURCE(IDS_7X), 0x00}, }; -static const TCHAR str_sndopt[] = _T("Sound board option"); - typedef struct { UINT16 res; @@ -916,19 +925,20 @@ static LRESULT CALLBACK PAD1optDlgProc(H // ---- -void dialog_sndopt(HWND hWnd) { - - HINSTANCE hinst; +void dialog_sndopt(HWND hWnd) +{ + HINSTANCE hInstance; PROPSHEETPAGE psp; PROPSHEETHEADER psh; HPROPSHEETPAGE hpsp[6]; + TCHAR szTitle[128]; - hinst = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE); + hInstance = (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE); ZeroMemory(&psp, sizeof(psp)); psp.dwSize = sizeof(PROPSHEETPAGE); psp.dwFlags = PSP_DEFAULT; - psp.hInstance = hinst; + psp.hInstance = hInstance; psp.pszTemplate = MAKEINTRESOURCE(IDD_SNDMIX); psp.pfnDlgProc = (DLGPROC)SndmixDlgProc; @@ -954,15 +964,17 @@ void dialog_sndopt(HWND hWnd) { psp.pfnDlgProc = (DLGPROC)PAD1optDlgProc; hpsp[5] = CreatePropertySheetPage(&psp); + loadstringresource(IDS_SOUNDOPTION, szTitle, NELEMENTS(szTitle)); + ZeroMemory(&psh, sizeof(psh)); psh.dwSize = sizeof(PROPSHEETHEADER); psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEHICON | PSH_USECALLBACK; psh.hwndParent = hWnd; - psh.hInstance = hinst; - psh.hIcon = LoadIcon(hinst, MAKEINTRESOURCE(IDI_ICON2)); + psh.hInstance = hInstance; + psh.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON2)); psh.nPages = 6; psh.phpage = hpsp; - psh.pszCaption = str_sndopt; + psh.pszCaption = szTitle; psh.pfnCallback = np2class_propetysheet; PropertySheet(&psh); InvalidateRect(hWnd, NULL, TRUE);