本文整理汇总了C++中std::unique_ptr::About方法的典型用法代码示例。如果您正苦于以下问题:C++ unique_ptr::About方法的具体用法?C++ unique_ptr::About怎么用?C++ unique_ptr::About使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::unique_ptr
的用法示例。
在下文中一共展示了unique_ptr::About方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Plugin_About
// Plugin configuration
void Plugin_About(HWND hwnd)
{
MessageBox(hwnd, _T("About"), _T("My title"), MB_ICONWARNING);
forwarder->About(hwnd);
}
示例2: ConfigurationDialogProc
INT_PTR CALLBACK ConfigurationDialogProc(__in HWND hWnd, __in UINT uMsg, __in WPARAM wParam, __in LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
{
HWND mpdComboHwnd = ::GetDlgItem(hWnd, IDC_MPDOutFormat);
#ifdef STREAMER_PAYD_VERSION
TCHAR *value[] = { _T("WAVE Out"), _T("MP3 92 kbps"), _T("MP3 128 kbps"), _T("MP3 192 kbps"), _T("MP3 256 kbps"), _T("MP3 320 kbps") };
#else
TCHAR *value[] = { _T("WAVE Out"), _T("MP3 64 kbps") };
#endif
for(int i = 0 ; i<_countof(value) ; i++)
{
LONG_PTR index = ComboBox_AddString(mpdComboHwnd, value[i]);
ComboBox_SetItemData(mpdComboHwnd, i, &i);
}
// Load settings
Settings &settings = Global::Settings;
wchar_t buff[0x400] = {};
Button_SetCheck(::GetDlgItem(hWnd, IDC_ForwarderEnable), settings.forward_output_sound);
SetWindowTextA(::GetDlgItem(hWnd, IDC_MPDHost), settings.router_host.c_str());
swprintf_s(buff, _T("%d"), settings.router_port);
Edit_SetText(::GetDlgItem(hWnd, IDC_MPDPort), buff);
//ComboBox_SetCurSel(mpdComboHwnd, settings.PresetType);
}break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_ForwarderAboutBtn:
forwarder->About(hWnd);
break;
case IDC_ForwarderConfigBtn:
forwarder->Config(hWnd);
break;
case IDOK:
{
HWND mpdComboHwnd = ::GetDlgItem(hWnd, IDC_MPDOutFormat);
//Global::Settings. = ComboBox_GetCurSel(mpdComboHwnd);
Global::Settings.write();
}
case IDCANCEL:
return EndDialog(hWnd, TRUE);
}
break;
case WM_QUIT:
return EndDialog(hWnd, TRUE);
}
return FALSE;
}
示例3: ConfigurationDialogProc
INT_PTR CALLBACK ConfigurationDialogProc(__in HWND hWnd, __in UINT uMsg, __in WPARAM wParam, __in LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
{
WCHAR buff[0x400] = {};
HWND mpdComboHwnd = ::GetDlgItem(hWnd, IDC_MPDOutFormat);
for(int i=0 ;i<_countof(Mp3OutputStreamConstants::Presets) ; i++)
{
::swprintf_s(buff, _T("MP3 %d kbps"), Mp3OutputStreamConstants::Presets[i]);
LONG_PTR index = ComboBox_AddString(mpdComboHwnd, buff);
ComboBox_SetItemData(mpdComboHwnd, i, &i);
}
::SendMessage(::GetDlgItem(hWnd, IDC_OutputBuffer), TBM_SETRANGEMIN, FALSE, PrebufferTimeMinValue);
::SendMessage(::GetDlgItem(hWnd, IDC_OutputBuffer), TBM_SETRANGEMAX, FALSE, PrebufferTimeMaxValue);
// Load settings
const Settings &settings = Global::Settings;
#ifdef STREAMER_PAYD_VERSION
Button_SetCheck(::GetDlgItem(hWnd, IDC_ForwarderEnable), settings.forward_output_sound);
ComboBox_SetCurSel(mpdComboHwnd, settings.encoder_preset);
#else
ComboBox_SetCurSel(mpdComboHwnd, 0);
#endif
::SetWindowText(::GetDlgItem(hWnd, IDC_MPDHost), settings.router_host.c_str());
::swprintf_s(buff, _T("%d"), settings.router_port);
Edit_SetText(::GetDlgItem(hWnd, IDC_MPDPort), buff);
::SendMessage(::GetDlgItem(hWnd, IDC_OutputBuffer), TBM_SETPOS, TRUE, settings.output_buffer_lenght);
::swprintf_s(buff, _T("%d ms"), settings.output_buffer_lenght);
::SetWindowText(::GetDlgItem(hWnd, IDC_OutputBufferValue), buff);
}break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_ForwarderAboutBtn:
forwarder->About(hWnd);
break;
case IDC_ForwarderConfigBtn:
forwarder->Config(hWnd);
break;
case IDOK:
{
HWND mpdComboHwnd = ::GetDlgItem(hWnd, IDC_MPDOutFormat);
Settings &settings = Global::Settings;
#ifdef STREAMER_PAYD_VERSION
Global::Settings.encoder_preset = ComboBox_GetCurSel(mpdComboHwnd);
Global::Settings.forward_output_sound = Button_GetCheck(::GetDlgItem(hWnd, IDC_ForwarderEnable)) == TRUE;
#endif
TCHAR buff[0x100] = {};
::GetWindowText(::GetDlgItem(hWnd, IDC_MPDHost), buff, _countof(buff));
Global::Settings.router_host = buff;
::GetWindowText(::GetDlgItem(hWnd, IDC_MPDPort), buff, _countof(buff));
::swscanf_s(buff, _T("%d"), &Global::Settings.router_port);
settings.output_buffer_lenght = static_cast<int>(::SendMessage(::GetDlgItem(hWnd, IDC_OutputBuffer), TBM_GETPOS, 0, 0));
Global::Settings.write();
}
case IDCANCEL:
return EndDialog(hWnd, TRUE);
}
break;
case WM_HSCROLL:
if (LOWORD(wParam) == SB_THUMBTRACK)
{
TCHAR buff[10] = {};
Global::Settings.output_buffer_lenght = HIWORD(wParam);
::swprintf_s(buff, _T("%d ms"), Global::Settings.output_buffer_lenght);
::SetWindowText(::GetDlgItem(hWnd, IDC_OutputBufferValue), buff);
}
break;
case WM_QUIT:
return EndDialog(hWnd, TRUE);
}
return FALSE;
}