当前位置: 首页>>代码示例>>C++>>正文


C++ Param::Button方法代码示例

本文整理汇总了C++中Param::Button方法的典型用法代码示例。如果您正苦于以下问题:C++ Param::Button方法的具体用法?C++ Param::Button怎么用?C++ Param::Button使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Param的用法示例。


在下文中一共展示了Param::Button方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnCmdMenuColorChange

		ibool Preferences::OnCmdMenuColorChange(Param& param)
		{
			if (param.Button().Clicked())
			{
				static COLORREF customColors[16] = {0};

				Object::Pod<CHOOSECOLOR> cc;

				MenuColorWindow& type = menuColorWindows[param.Button().GetId() == IDC_PREFERENCES_MENUCOLOR_FULLSCREEN_CHANGE];

				cc.lStructSize  = sizeof(cc);
				cc.hwndOwner    = dialog;
				cc.lpCustColors = customColors;
				cc.rgbResult    = type.color;
				cc.Flags        = CC_FULLOPEN|CC_RGBINIT;

				if (::ChooseColor( &cc ))
				{
					type.color = cc.rgbResult;
					UpdateColors();
				}
			}

			return true;
		}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:25,代码来源:NstDialogPreferences.cpp

示例2:

		ibool Launcher::List::Paths::OnCmdRemove(Param& param)
		{
			if (param.Button().Clicked())
				dialog.ListView( IDC_LAUNCHER_PATHS_LIST ).Selection().Delete();

			return true;
		}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:7,代码来源:NstDialogLauncherPaths.cpp

示例3: OnCmdStyle

		ibool Preferences::OnCmdStyle(Param& param)
		{
			if (param.Button().Clicked())
				UpdateIconStyle();

			return true;
		}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:7,代码来源:NstDialogPreferences.cpp

示例4:

ibool Launcher::List::Columns::OnCmdOk(Param& param)
{
    if (param.Button().Clicked())
    {
        HeapString text;

        for (uint i=0; i < 2; ++i)
        {
            Control::ListBox list = dialog.ListBox
                                    (
                                        i ? IDC_LAUNCHER_COLUMNSELECT_SELECTED :
                                        IDC_LAUNCHER_COLUMNSELECT_AVAILABLE
                                    );

            Types& types = (i ? selected : available);
            types.Resize( list.Size() );

            for (uint j=0; j < types.Size(); ++j)
            {
                list[j].Text() >> text;

                for (uint k=0; k < NUM_TYPES; ++k)
                {
                    if (text == Resource::String( IDS_LAUNCHER_COLUMN_FILE + k))
                    {
                        types[j] = k;
                        break;
                    }
                }
            }
        }

        dialog.Close();
    }
开发者ID:BGCX261,项目名称:zlndx-emu-svn-to-git,代码行数:34,代码来源:NstDialogLauncherColumns.cpp

示例5: list

ibool Launcher::List::Columns::OnCmdDefault(Param& param)
{
    if (param.Button().Clicked())
    {
        Control::ListBox list( dialog.ListBox(IDC_LAUNCHER_COLUMNSELECT_SELECTED) );

        list.Clear();

        for (uint i=0; i < NUM_DEFAULT_SELECTED_TYPES; ++i)
            list.Add( Resource::String( IDS_LAUNCHER_COLUMN_FILE + i) );

        list[0].Select();

        list = dialog.ListBox(IDC_LAUNCHER_COLUMNSELECT_AVAILABLE);
        list.Clear();

        for (uint i=0; i < NUM_DEFAULT_AVAILABLE_TYPES; ++i)
            list.Add( Resource::String( IDS_LAUNCHER_COLUMN_FILE + NUM_DEFAULT_SELECTED_TYPES + i) );

        list[0].Select();

        dialog.Control( IDC_LAUNCHER_COLUMNSELECT_REMOVE ).Enable();
        dialog.Control( IDC_LAUNCHER_COLUMNSELECT_ADD    ).Enable();
    }

    return true;
}
开发者ID:BGCX261,项目名称:zlndx-emu-svn-to-git,代码行数:27,代码来源:NstDialogLauncherColumns.cpp

示例6: Add

ibool Launcher::List::Columns::OnCmdRemove(Param& param)
{
    if (param.Button().Clicked())
        Add( IDC_LAUNCHER_COLUMNSELECT_AVAILABLE, IDC_LAUNCHER_COLUMNSELECT_SELECTED );

    return true;
}
开发者ID:BGCX261,项目名称:zlndx-emu-svn-to-git,代码行数:7,代码来源:NstDialogLauncherColumns.cpp

示例7: listView

		ibool Launcher::List::Paths::OnCmdOk(Param& param)
		{
			if (param.Button().Clicked())
			{
				settings.include[ Settings::Include::NES     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_NES         ).Checked();
				settings.include[ Settings::Include::UNF     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_UNF         ).Checked();
				settings.include[ Settings::Include::XML     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_XML         ).Checked();
				settings.include[ Settings::Include::FDS     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_FDS         ).Checked();
				settings.include[ Settings::Include::NSF     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_NSF         ).Checked();
				settings.include[ Settings::Include::PATCH   ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_PATCH       ).Checked();
				settings.include[ Settings::Include::ARCHIVE ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_ARCHIVE     ).Checked();
				settings.include[ Settings::Include::ANY     ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_ALLFILES    ).Checked();
				settings.include[ Settings::Include::UNIQUE  ] = dialog.CheckBox( IDC_LAUNCHER_PATHS_UNIQUEFILES ).Checked();

				const Control::ListView listView( dialog.ListView(IDC_LAUNCHER_PATHS_LIST) );
				settings.folders.resize( listView.Size() );

				for (uint i=0, n=settings.folders.size(); i < n; ++i)
				{
					listView[i].Text() >> settings.folders[i].path;
					settings.folders[i].incSubDir = listView[i].Checked();
				}

				dialog.Close();
			}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:25,代码来源:NstDialogLauncherPaths.cpp

示例8: OnCmdMenuColorDefault

		ibool Preferences::OnCmdMenuColorDefault(Param& param)
		{
			if (param.Button().Clicked())
			{
				uint id;

				if (param.Button().GetId() == IDC_PREFERENCES_MENUCOLOR_FULLSCREEN_DEFAULT)
					id = IDC_PREFERENCES_MENUCOLOR_FULLSCREEN_CHANGE;
				else
					id = IDC_PREFERENCES_MENUCOLOR_DESKTOP_CHANGE;

				dialog.Control( id ).Enable( dialog.CheckBox(param.Button().GetId()).Unchecked() );
			}

			return true;
		}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:16,代码来源:NstDialogPreferences.cpp

示例9: OnFullscreen

		ibool Netplay::OnFullscreen(Param& param)
		{
			if (param.Button().Clicked())
				doFullscreen = dialog.CheckBox( IDC_NETPLAY_PLAY_FULLSCREEN ).Checked();

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:7,代码来源:NstDialogNetPlay.cpp

示例10: OnLaunch

		ibool Netplay::OnLaunch(Param& param)
		{
			if (param.Button().Clicked())
				dialog.Close( LAUNCH );

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:7,代码来源:NstDialogNetPlay.cpp

示例11: OnClear

		ibool Netplay::OnClear(Param& param)
		{
			if (param.Button().Clicked())
				dialog.ListView( IDC_NETPLAY_GAMELIST ).Clear();

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:7,代码来源:NstDialogNetPlay.cpp

示例12: OnRemove

		ibool Netplay::OnRemove(Param& param)
		{
			if (param.Button().Clicked())
				dialog.ListView( IDC_NETPLAY_GAMELIST ).Selection().Delete();

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:7,代码来源:NstDialogNetPlay.cpp

示例13: OnAdd

		ibool Netplay::OnAdd(Param& param)
		{
			if (param.Button().Clicked())
				Add( paths.BrowseLoad(Managers::Paths::File::GAME|Managers::Paths::File::ARCHIVE) );

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:7,代码来源:NstDialogNetPlay.cpp

示例14: OnDefault

		ibool Netplay::OnDefault(Param& param)
		{
			if (param.Button().Clicked())
			{
				doFullscreen = false;
				dialog.CheckBox( IDC_NETPLAY_PLAY_FULLSCREEN ).Check( false );
			}

			return true;
		}
开发者ID:rdanbrook,项目名称:nestopia-win32,代码行数:10,代码来源:NstDialogNetPlay.cpp

示例15: dir

		ibool Launcher::List::Paths::OnCmdAdd(Param& param)
		{
			if (param.Button().Clicked() && dialog.ListView( IDC_LAUNCHER_PATHS_LIST ).Size() < LIMIT)
			{
				const Path dir( Browser::SelectDirectory() );

				if (dir.Length())
					dialog.ListView( IDC_LAUNCHER_PATHS_LIST ).Add( dir );
			}

			return true;
		}
开发者ID:JasonGoemaat,项目名称:NestopiaDx9,代码行数:12,代码来源:NstDialogLauncherPaths.cpp


注:本文中的Param::Button方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。