本文整理汇总了C++中FConfigFile::GetValueForKey方法的典型用法代码示例。如果您正苦于以下问题:C++ FConfigFile::GetValueForKey方法的具体用法?C++ FConfigFile::GetValueForKey怎么用?C++ FConfigFile::GetValueForKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FConfigFile
的用法示例。
在下文中一共展示了FConfigFile::GetValueForKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main_ConnectDialogCallback
//.........这里部分代码省略.........
g_hTrayMenu = CreatePopupMenu( );
AppendMenu( g_hTrayMenu, MF_STRING, IDR_TOGGLE, "Show/Hide" );
AppendMenu( g_hTrayMenu, MF_STRING|MF_POPUP, (UINT)g_hFavoritesMenu, "Favorites");
AppendMenu( g_hTrayMenu, MF_SEPARATOR, 0, 0 );
AppendMenu( g_hTrayMenu, MF_STRING, IDR_EXIT, "Exit" );
// Create the file menu.
HMENU hFileMenu = CreatePopupMenu( );
AppendMenu( hFileMenu, MF_STRING, IDR_EXIT, "Exit" );
// Create the file menu.
HMENU hHelpMenu = CreatePopupMenu( );
AppendMenu( hHelpMenu, MF_STRING, IDR_ABOUT, "About..." );
// Create the main menu.
g_hMainMenu = CreateMenu( );
AppendMenu( g_hMainMenu, MF_STRING|MF_POPUP, (UINT)hFileMenu, "File" );
AppendMenu( g_hMainMenu, MF_STRING|MF_POPUP, (UINT)g_hFavoritesMenu, "Favorites");
AppendMenu( g_hMainMenu, MF_STRING|MF_POPUP, (UINT)hHelpMenu, "Help");
AppendMenu( g_hMainMenu, MF_SEPARATOR, 0, 0 );
SetMenu( hDlg, g_hMainMenu );
// Set up the status bar.
g_hDlgStatusBar = CreateStatusWindow( WS_CHILD | WS_VISIBLE, (LPCTSTR)NULL, hDlg, IDC_STATIC );
// Set up the top, white section.
SendMessage( GetDlgItem( g_hDlg, IDC_INTROTEXT ), WM_SETFONT, (WPARAM) CreateFont( 13, 0, 0, 0, 600, 0, 0, 0, 0, 0, 0, 0, 0, "Tahoma" ), (LPARAM) 1 );
LOGBRUSH LogBrush;
LogBrush.lbStyle = BS_SOLID;
LogBrush.lbColor = RGB( 255, 255, 255 );
g_hWhiteBrush = CreateBrushIndirect( &LogBrush );
// Load the server address that was used last time.
if ( g_Config.HaveSections( ) && g_Config.SetSection( "Settings", true ) && g_Config.GetValueForKey( "LastServer" ) )
SetDlgItemText( hDlg, IDC_SERVERIP, g_Config.GetValueForKey( "LastServer" ) );
}
break;
case WM_COMMAND:
// Selecting a favorite from the menu?
if ( LOWORD( wParam ) > IDR_DYNAMIC_MENU && LOWORD( wParam ) <= IDR_DYNAMIC_MENU + g_Favorites.size( ))
{
main_ConnectToFavorite( LOWORD( wParam ) - IDR_DYNAMIC_MENU - 1 );
return TRUE;
}
switch ( LOWORD( wParam ))
{
// This also occurs when esc is pressed.
case IDCANCEL:
if ( g_State == STATE_CONNECTING )
{
main_SetState( STATE_WAITING );
main_EnableConnectionButtons( TRUE );
main_UpdateStatusbar( "Cancelled." );
}
else
main_Quit( );
break;
// The "connect" button.
case IDOK:
// Disable all the inputs.
main_EnableConnectionButtons( FALSE );