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


C++ Button_SetCheck函数代码示例

本文整理汇总了C++中Button_SetCheck函数的典型用法代码示例。如果您正苦于以下问题:C++ Button_SetCheck函数的具体用法?C++ Button_SetCheck怎么用?C++ Button_SetCheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: OnInitDialog

void OnInitDialog(HWND hW) {
	char *dev;
	//int i;

	LoadConf();

	ComboBox_AddString(GetDlgItem(hW, IDC_BAYTYPE), "Expansion");
	ComboBox_AddString(GetDlgItem(hW, IDC_BAYTYPE), "PC Card");
	for (int j=0;j<2;j++)
	{
	for (int i=0; i<pcap_io_get_dev_num(); i++) {
		dev = pcap_io_get_dev_desc(i,j);
		int itm=ComboBox_AddString(GetDlgItem(hW, IDC_ETHDEV), dev);
		ComboBox_SetItemData(GetDlgItem(hW, IDC_ETHDEV),itm,strdup(pcap_io_get_dev_name(i,j)));
		if (strcmp(pcap_io_get_dev_name(i,j), config.Eth) == 0) {
			ComboBox_SetCurSel(GetDlgItem(hW, IDC_ETHDEV), itm);
		}
	}
	}
	vector<tap_adapter> * al=GetTapAdapters();
	for (size_t i=0; i<al->size(); i++) {
		
		int itm=ComboBox_AddString(GetDlgItem(hW, IDC_ETHDEV), al[0][i].name.c_str());
		ComboBox_SetItemData(GetDlgItem(hW, IDC_ETHDEV),itm,strdup( al[0][i].guid.c_str()));
		if (strcmp(al[0][i].guid.c_str(), config.Eth) == 0) {
			ComboBox_SetCurSel(GetDlgItem(hW, IDC_ETHDEV), itm);
		}
	}

	Edit_SetText(GetDlgItem(hW, IDC_HDDFILE), config.Hdd);

	Button_SetCheck(GetDlgItem(hW, IDC_ETHENABLED), config.ethEnable);
	Button_SetCheck(GetDlgItem(hW, IDC_HDDENABLED), config.hddEnable);
}
开发者ID:Aced14,项目名称:pcsx2,代码行数:34,代码来源:Win32.cpp

示例2: Button_SetCheck

void
ds3t::UI::CheckBox::set_value_str (std::wstring str)
{
  if (str.length () == 1 &&
      str [0] == L'1') {
    Button_SetCheck (handle, true);
    numeric = true;
  }
  else if (str.length () == 1 &&
           str [0] == L'0') {
    Button_SetCheck (handle, false);
    numeric = true;
  }

  else if (str.length () == 4 &&
      towlower (str [0]) == L't' &&
      towlower (str [1]) == L'r' &&
      towlower (str [2]) == L'u' &&
      towlower (str [3]) == L'e') {
    Button_SetCheck (handle, true);
    numeric = false;
  }
  else {
    Button_SetCheck (handle, false);
    numeric = false;
  }
}
开发者ID:Kaldaien,项目名称:ds3t,代码行数:27,代码来源:parameter.cpp

示例3: SetWindowText

void WinAdvSet::init_setting(const Action& act_)
{
    SetWindowText(hwnd_gst, act_.get_gesture().c_str());
    SetWindowText(hwnd_tgt, act_.get_target_name().c_str());

    if (act_.get_cmd_size())
    { SetWindowText(hwnd_cmd, act_.get_cmd(0).get_name().c_str()); }
    else { SetWindowText(hwnd_cmd, _T("---")); }

    Button_SetCheck(hwnd_rb_sndonce, BST_UNCHECKED);
    Button_SetCheck(hwnd_rb_sndrepeat, BST_UNCHECKED);
    Button_SetCheck(hwnd_rb_sndhold, BST_UNCHECKED);
    Button_SetCheck(hwnd_rb_classuse, BST_UNCHECKED);
    Button_SetCheck(hwnd_rb_classavoid, BST_UNCHECKED);

    if (act_.get_send_type() == ACT_SEND_HOLD)
    { Button_SetCheck(hwnd_rb_sndhold, BST_CHECKED); }
    else if (act_.get_send_type() == ACT_SEND_REPEAT)
    { Button_SetCheck(hwnd_rb_sndrepeat, BST_CHECKED); }
    else // SEND_ONCE or other (default)
    { Button_SetCheck(hwnd_rb_sndonce, BST_CHECKED); }

    if (act_.is_class_enabled())
    { Button_SetCheck(hwnd_rb_classuse, BST_CHECKED); }
    else { Button_SetCheck(hwnd_rb_classavoid, BST_CHECKED); }
}
开发者ID:szk,项目名称:Ki2Key,代码行数:26,代码来源:WinAdvSet.cpp

示例4: MainBoxDisplay

void MainBoxDisplay()
{
	LoadConf();
	// Adjust window position?
	// We held off setting the name until now... so description would show.
	SetDlgItemText(mainboxwindow, IDC_0202, conf.isoname);
	if (conf.startconfigure == 0)
	{
		Button_SetCheck(GetDlgItem(mainboxwindow, IDC_0209), BST_UNCHECKED);
	}
	else
	{
		Button_SetCheck(GetDlgItem(mainboxwindow, IDC_0209), BST_CHECKED);
	} // ENDIF- Do we need to uncheck this box?
	if (conf.restartconfigure == 0)
	{
		Button_SetCheck(GetDlgItem(mainboxwindow, IDC_0210), BST_UNCHECKED);
	}
	else
	{
		Button_SetCheck(GetDlgItem(mainboxwindow, IDC_0210), BST_CHECKED);
	} // ENDIF- Do we need to uncheck this box?
	// First Time - Show the window
	ShowWindow(mainboxwindow, SW_SHOWNORMAL);
} // END MainBoxDisplay()
开发者ID:madnessw,项目名称:thesnow,代码行数:25,代码来源:mainbox.c

示例5: InitInstance

/*!
	インスタンス ハンドルを保存して、メイン ウィンドウを作成します。
		この関数で、グローバル変数でインスタンス ハンドルを保存し、
		メイン プログラム ウィンドウを作成および表示します。
	@param[in]	hInstance	インスタンスハンドル
	@param[in]	nCmdShow	起動時の表示状態
*/
BOOL InitInstance( HINSTANCE hInstance, int nCmdShow )
{
	HWND	hWnd;
	INT		xxx, yyy;
	RECT	rect;

	BOOL	bHotRslt;

	ghInst = hInstance;	//	グローバル変数にインスタンス処理を格納します。


	//	設定ファイル位置確認
	GetModuleFileName( hInstance, gatIniPath, MAX_PATH );
	PathRemoveFileSpec( gatIniPath );
	PathAppend( gatIniPath, INI_FILE );

	//	ここらで初期設定確保
	gbClipSteal   = InitParamValue( INIT_LOAD, VL_COLLECT_AON,  0 );	//	コピペ保存・デフォは起動時OFF
	gGetMsgOn     = InitParamValue( INIT_LOAD, VL_USE_BALLOON,  1 );
	gbUniRadixHex = InitParamValue( INIT_LOAD, VL_UNIRADIX_HEX, 0 );

	//	初期設定は Ctrl+Shift+C
	gbHotMod      = InitParamValue( INIT_LOAD, VL_COLHOT_MODY, (MOD_CONTROL | MOD_SHIFT) );
	gbHotVkey     = InitParamValue( INIT_LOAD, VL_COLHOT_VKEY, VK_C );


	hWnd = GetDesktopWindow(  );
	GetWindowRect( hWnd, &rect );
	xxx = ( rect.right  - WCL_WIDTH ) / 2;
	yyy = ( rect.bottom - WCL_HEIGHT ) / 2;

	hWnd = CreateWindowEx( WS_EX_TOOLWINDOW | WS_EX_APPWINDOW, gatWindowClass, gatTitle, WS_CAPTION | WS_POPUPWINDOW, xxx, yyy, WCL_WIDTH, WCL_HEIGHT, NULL, NULL, hInstance, NULL);

	if( !hWnd ){	return FALSE;	}


	//	タスクトレイがあぼ〜んしたときの再起動メッセージ番号を確保
	grdTaskbarResetID = RegisterWindowMessage( TEXT("TaskbarCreated") );

	//	クリップボードチェーンに自分を登録
	ghNextViewer = SetClipboardViewer( hWnd );


	FileListViewInit( hWnd );	//	リスト初期化
	FileListViewGet( hWnd, 0, gatClipFile );	//	取り込みファイルを確保しておく
	FileTypeCheck( gatClipFile );	//	ASTかそうでないかを確認

	if( gGetMsgOn ){		Button_SetCheck( GetDlgItem(hWnd,IDB_CLIP_USE_BALLOON)  , BST_CHECKED );	}
	if( gbUniRadixHex ){	Button_SetCheck( GetDlgItem(hWnd,IDB_CLIP_UNIRADIX_HEX) , BST_CHECKED );	}
	if( gbClipSteal ){		Button_SetCheck( GetDlgItem(hWnd,IDB_CLIP_STEAL_ACT_ON) , BST_CHECKED );	}

	TasktrayIconAdd( hWnd );

	//	とりあえず、Ctrl+Shift+C
	bHotRslt = RegisterHotKey( hWnd, IDHK_CLIPSTEAL_FILECHANGE, gbHotMod, gbHotVkey );

	ShowWindow( hWnd, SW_HIDE );	//	SW_HIDE

	return TRUE;
}
开发者ID:16in,项目名称:OrinrinEditor,代码行数:67,代码来源:OrinrinCollector.cpp

示例6: OptionsDlgProc

INT_PTR CALLBACK OptionsDlgProc(
    _In_ HWND hwndDlg,
    _In_ UINT uMsg,
    _In_ WPARAM wParam,
    _In_ LPARAM lParam
    )
{
    switch (uMsg)
    {
    case WM_INITDIALOG:
        {
            Button_SetCheck(GetDlgItem(hwndDlg, IDC_ENABLEETWMONITOR), PhGetIntegerSetting(SETTING_NAME_ENABLE_ETW_MONITOR) ? BST_CHECKED : BST_UNCHECKED);
            Button_SetCheck(GetDlgItem(hwndDlg, IDC_ENABLEGPUMONITOR), PhGetIntegerSetting(SETTING_NAME_ENABLE_GPU_MONITOR) ? BST_CHECKED : BST_UNCHECKED);
            Button_SetCheck(GetDlgItem(hwndDlg, IDC_ENABLESYSINFOGRAPHS), PhGetIntegerSetting(SETTING_NAME_ENABLE_SYSINFO_GRAPHS) ? BST_CHECKED : BST_UNCHECKED);
        }
        break;
    case WM_DESTROY:
        {
            PhSetIntegerSetting(SETTING_NAME_ENABLE_ETW_MONITOR, Button_GetCheck(GetDlgItem(hwndDlg, IDC_ENABLEETWMONITOR)) == BST_CHECKED);
            PhSetIntegerSetting(SETTING_NAME_ENABLE_GPU_MONITOR, Button_GetCheck(GetDlgItem(hwndDlg, IDC_ENABLEGPUMONITOR)) == BST_CHECKED);
            PhSetIntegerSetting(SETTING_NAME_ENABLE_SYSINFO_GRAPHS, Button_GetCheck(GetDlgItem(hwndDlg, IDC_ENABLESYSINFOGRAPHS)) == BST_CHECKED);
        }
        break;
    }

    return FALSE;
}
开发者ID:PKRoma,项目名称:ProcessHacker,代码行数:27,代码来源:options.c

示例7: DisableFilterControls

static void DisableFilterControls(HWND hWnd, LPCFOLDERDATA lpFilterRecord,
								  LPCFILTER_ITEM lpFilterItem, DWORD dwFlags)
{
	HWND  hWndCtrl = GetDlgItem(hWnd, lpFilterItem->m_dwCtrlID);
	DWORD dwFilterType = lpFilterItem->m_dwFilterType;

	/* Check the appropriate control */
	if (dwFilterType & dwFlags)
		Button_SetCheck(hWndCtrl, MF_CHECKED);

	/* No special rules for this folder? */
	if (!lpFilterRecord)
		return;

	/* If this is an excluded filter */
	if (lpFilterRecord->m_dwUnset & dwFilterType)
	{
		/* uncheck it and disable the control */
		Button_SetCheck(hWndCtrl, MF_UNCHECKED);
		EnableWindow(hWndCtrl, FALSE);
	}

	/* If this is an implied filter, check it and disable the control */
	if (lpFilterRecord->m_dwSet & dwFilterType)
	{
		Button_SetCheck(hWndCtrl, MF_CHECKED);
		EnableWindow(hWndCtrl, FALSE);
	}
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:29,代码来源:dialogs.c

示例8: f_set

void structGuiRadioButton :: f_set () {
	/*
	 * The value should be set without calling the valueChanged callback.
	 */
	#if gtk
		g_signal_handler_disconnect (GTK_TOGGLE_BUTTON (d_widget), d_valueChangedHandlerId);
		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (d_widget), TRUE);
		d_valueChangedHandlerId = g_signal_connect (GTK_TOGGLE_BUTTON (d_widget), "toggled", G_CALLBACK (_GuiGtkRadioButton_handleToggle), this);
	#elif cocoa
	#elif win
		Button_SetCheck (d_widget -> window, BST_CHECKED);
		/*
		 * Deselect the sister buttons.
		 */
		for (GuiRadioButton sibling = d_previous; sibling != NULL; sibling = sibling -> d_previous) {
			Button_SetCheck (sibling -> d_widget -> window, BST_UNCHECKED);
		}
		for (GuiRadioButton sibling = d_next; sibling != NULL; sibling = sibling -> d_next) {
			Button_SetCheck (sibling -> d_widget -> window, BST_UNCHECKED);
		}
	#elif mac
		SetControlValue (d_widget -> nat.control.handle, true);
		/*
		 * Deselect the sister buttons.
		 */
		for (GuiRadioButton sibling = d_previous; sibling != NULL; sibling = sibling -> d_previous) {
			SetControlValue (sibling -> d_widget -> nat.control.handle, false);
		}
		for (GuiRadioButton sibling = d_next; sibling != NULL; sibling = sibling -> d_next) {
			SetControlValue (sibling -> d_widget -> nat.control.handle, false);
		}
	#endif
}
开发者ID:dellison,项目名称:APILPraat,代码行数:33,代码来源:GuiRadioButton.cpp

示例9: switch

BOOL t_config_tab2::DialogProc(HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
{
	switch (msg)
	{
		case WM_INITDIALOG:
		{
			m_initialising = true;
			m_wnd_artwork_string = GetDlgItem(wnd, IDC_ARTWORK_STRING);
			m_wnd_add_artwork = GetDlgItem(wnd, IDC_ADDARTWORK);
			m_wnd_add_gapless = GetDlgItem(wnd, IDC_SCANGAPLESS);
			m_wnd_dummy_gapless = GetDlgItem(wnd, IDC_USEDUMMYGAPLESS);
			m_wnd_video_thumbailer_enabled = GetDlgItem(wnd, IDC_THUMBAILVIDEOS);

			m_wnd_fb2k_artwork = GetDlgItem(wnd, IDC_FB2KARTWORK);

			uSetWindowText(m_wnd_artwork_string, settings::artwork_sources);
			Button_SetCheck(m_wnd_add_artwork, settings::add_artwork ? BST_CHECKED : BST_UNCHECKED);
			Button_SetCheck(m_wnd_add_gapless, settings::add_gapless ? BST_CHECKED : BST_UNCHECKED);
			Button_SetCheck(m_wnd_fb2k_artwork, settings::use_fb2k_artwork ? BST_CHECKED : BST_UNCHECKED);
			Button_SetCheck(m_wnd_dummy_gapless, settings::use_dummy_gapless_data ? BST_CHECKED : BST_UNCHECKED);
			Button_SetCheck(m_wnd_video_thumbailer_enabled, settings::video_thumbnailer_enabled ? BST_CHECKED : BST_UNCHECKED);

			on_add_artwork_change();
			on_add_gapless_change();
			m_initialising = false;
		}
		break;
		case WM_COMMAND:
			switch (wp)
			{
				case IDC_ADDARTWORK | (BN_CLICKED << 16) :
					settings::add_artwork = Button_GetCheck(m_wnd_add_artwork) == BST_CHECKED;
					on_add_artwork_change();
					break;
				case IDC_FB2KARTWORK | (BN_CLICKED << 16) :
					settings::use_fb2k_artwork = Button_GetCheck(m_wnd_fb2k_artwork) == BST_CHECKED;
					break;
				case IDC_THUMBAILVIDEOS | (BN_CLICKED << 16) :
					settings::video_thumbnailer_enabled = Button_GetCheck(m_wnd_video_thumbailer_enabled) == BST_CHECKED;
					break;
				case IDC_SCANGAPLESS | (BN_CLICKED << 16) :
					settings::add_gapless = Button_GetCheck(m_wnd_add_gapless) == BST_CHECKED;
					on_add_gapless_change();
					break;
				case IDC_USEDUMMYGAPLESS | (BN_CLICKED << 16) :
					settings::use_dummy_gapless_data = Button_GetCheck(m_wnd_add_gapless) == BST_CHECKED;
					break;
				case IDC_ARTWORK_STRING | (EN_CHANGE << 16) :
					if (!m_initialising)
						settings::artwork_sources = string_utf8_from_window((HWND)lp);
					break;
			}
			break;
		case WM_DESTROY:
			break;
	}
	return FALSE;
}
开发者ID:reupen,项目名称:ipod_manager,代码行数:58,代码来源:config_features.cpp

示例10: Button_SetCheck

void check::useFlag(unsigned long *_data, unsigned char bit)
{
  data = _data;
  flag = (1 << (bit-1));
  
  if (*data & flag)
    Button_SetCheck(hwnd, checked=true);
  else
    Button_SetCheck(hwnd, checked=false);
}
开发者ID:Almamu,项目名称:crashutils,代码行数:10,代码来源:check.cpp

示例11: Button_SetCheck

/// <summary>
/// Update interface manual map flags
/// </summary>
/// <param name="flags">Flags</param>
/// <returns>Flags</returns>
DWORD MainDlg::MmapFlags( DWORD flags )
{
    Button_SetCheck( GetDlgItem( _hMainDlg, IDC_MANUAL_IMP ),   flags & blackbone::ManualImports );
    Button_SetCheck( GetDlgItem( _hMainDlg, IDC_LDR_REF ),      flags & blackbone::CreateLdrRef );
    Button_SetCheck( GetDlgItem( _hMainDlg, IDC_WIPE_HDR ),     flags & blackbone::WipeHeader );
    Button_SetCheck( GetDlgItem( _hMainDlg, IDC_IGNORE_TLS ),   flags & blackbone::NoTLS );
    Button_SetCheck( GetDlgItem( _hMainDlg, IDC_NOEXCEPT ),     flags & blackbone::NoExceptions );

    return flags;
}
开发者ID:hezzrrah,项目名称:Xenos,代码行数:15,代码来源:Routines.cpp

示例12: GetDlgItem

/*
** Called when tab is displayed.
**
*/
void CDialogManage::CTabSettings::Initialize()
{
	m_Initialized = true;

	// Scan for languages
	HWND item = GetDlgItem(m_Window, IDC_MANAGESETTINGS_LANGUAGE_COMBOBOX);

	std::wstring files = Rainmeter->GetPath() + L"Languages\\*.dll";
	WIN32_FIND_DATA fd;
	HANDLE hSearch = FindFirstFile(files.c_str(), &fd);
	if (hSearch != INVALID_HANDLE_VALUE)
	{
		do
		{
			WCHAR* pos = wcschr(fd.cFileName, L'.');
			if (pos)
			{
				LCID lcid = (LCID)wcstoul(fd.cFileName, &pos, 10);
				if (pos != fd.cFileName &&
					_wcsicmp(pos, L".dll") == 0 &&
					GetLocaleInfo(lcid, LOCALE_SENGLISHLANGUAGENAME, fd.cFileName, MAX_PATH) > 0)
				{
					// Strip brackets in language name
					std::wstring text = fd.cFileName;
					text += L" - ";

					GetLocaleInfo(lcid, LOCALE_SNATIVELANGUAGENAME, fd.cFileName, MAX_PATH);
					text += fd.cFileName;

					int index = ComboBox_AddString(item, text.c_str());
					ComboBox_SetItemData(item, index, (LPARAM)lcid);

					if (lcid == Rainmeter->GetResourceLCID())
					{
						ComboBox_SetCurSel(item, index);
					}
				}
			}
		}
		while (FindNextFile(hSearch, &fd));

		FindClose(hSearch);
	}

	Button_SetCheck(GetDlgItem(m_Window, IDC_MANAGESETTINGS_CHECKUPDATES_CHECKBOX), !Rainmeter->GetDisableVersionCheck());
	Button_SetCheck(GetDlgItem(m_Window, IDC_MANAGESETTINGS_LOCKSKINS_CHECKBOX), Rainmeter->GetDisableDragging());
	Button_SetCheck(GetDlgItem(m_Window, IDC_MANAGESETTINGS_LOGTOFILE_CHECKBOX), Rainmeter->GetLogging());
	Button_SetCheck(GetDlgItem(m_Window, IDC_MANAGESETTINGS_VERBOSELOGGING_CHECKBOX), Rainmeter->GetDebug());

	BOOL isLogFile = (_waccess(Rainmeter->GetLogFile().c_str(), 0) != -1);
	EnableWindow(GetDlgItem(m_Window, IDC_MANAGESETTINGS_SHOWLOGFILE_BUTTON), isLogFile);
	EnableWindow(GetDlgItem(m_Window, IDC_MANAGESETTINGS_DELETELOGFILE_BUTTON), isLogFile);
}
开发者ID:JamesAC,项目名称:rainmeter,代码行数:57,代码来源:DialogManage.cpp

示例13: wppnlUstawieniaDane

LRESULT CALLBACK wppnlUstawieniaDane(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
	switch (uMsg) {
	case WM_COMMAND:

		if (!Okno->Zdarzenia) break;

		if (lParam == (LPARAM)Okno->txtUstJednostka && HIWORD(wParam) == EN_KILLFOCUS) {
			StanProgramu->Zapisany = false;
			if (Bledy->PowyzejZeraNP(Okno->txtUstJednostka, "D³ugoœæ jednostki", &Dane->Ustawienia.Jednostka0)) {
				Okno->ZmienUstawieniaGrafiki();
			}
		}

		if (lParam == (LPARAM)Okno->cboUstJednostka && HIWORD(wParam) == CBN_SELCHANGE) {
			StanProgramu->Zapisany = false;
			int ix = ComboBox_GetCurSel((HWND)lParam);
			if (ix != CB_ERR) {
				Okno->UstawJednostkeSkali(ix);
				Okno->ZmienUstawieniaGrafiki();
			}
		}

		if (lParam == (LPARAM)Okno->txtUstIloscJednostek && HIWORD(wParam) == EN_KILLFOCUS) {
			StanProgramu->Zapisany = false;
			Bledy->PowyzejZeraNP(Okno->txtUstIloscJednostek, "IloϾ jednostek", &Dane->Ustawienia.JednIlosc);
			Okno->ZmienUstawieniaGrafiki();
		}

		if (lParam == (LPARAM)Okno->txtUstJednPodzialka && HIWORD(wParam) == EN_KILLFOCUS) {
			StanProgramu->Zapisany = false;
			Bledy->PowyzejZeraNP(Okno->txtUstJednPodzialka, "Podzia³ka jednostki", &Dane->Ustawienia.UstJednPodzialka);
			Okno->ZmienUstawieniaGrafiki();
		}

		if (lParam == (LPARAM)Okno->cbUstOdbiciaSciany) {
			StanProgramu->Zapisany = false;
			if (Button_GetCheck(Okno->cbUstOdbiciaSciany) == BST_CHECKED) {
				Button_SetCheck(Okno->cbUstOdbiciaSciany, BST_UNCHECKED);
				Dane->Ustawienia.OdbiciaSciany = false;
			}
			else {
				Button_SetCheck(Okno->cbUstOdbiciaSciany, BST_CHECKED);
				Dane->Ustawienia.OdbiciaSciany = true;
			}
		}

		RysujCiala();

		return 0;
	}
	return CallWindowProc(Okno->wpopnlUstawieniaDane, hwnd, uMsg, wParam, lParam);
}
开发者ID:Marcino713,项目名称:PhysicalSimulator2,代码行数:52,代码来源:wndproc.cpp

示例14: wcslen

bool
tzfixcfg_OSD::setup_ui (HWND hDlg)
{
  bool installed = wcslen (TZT_GetRTSSInstallDir ().c_str ()) > 0;

  hWndInstall    = GetDlgItem (hDlg, IDC_RTSS_INSTALL);

  hWndStealth    = GetDlgItem (hDlg, IDC_RTSS_STEALTH);
  hWndCustomD3D  = GetDlgItem (hDlg, IDC_RTSS_CUSTOM3D);
  hWndUseDelay   = GetDlgItem (hDlg, IDC_RTSS_DELAY);
  hWndDelayLabel = GetDlgItem (hDlg, IDC_RTSS_DELAY_LABEL);
  hWndDelayTime  = GetDlgItem (hDlg, IDC_RTSS_DELAY_TIME);

  hWndColorLabel = GetDlgItem (hDlg, IDC_RTSS_COLOR_LABEL);
  hWndColor      = GetDlgItem (hDlg, IDC_RTSS_COLOR);

  ShowWindow (hWndColorLabel, SW_HIDE);
  ShowWindow (hWndColor,      SW_HIDE);

  hWndRTSSGroup  = GetDlgItem (hDlg, IDC_RTSS_GROUP);

  Button_Enable (hWndInstall, (! installed));

  Button_Enable (hWndStealth,   installed);
  Button_Enable (hWndCustomD3D, installed);
  Button_Enable (hWndUseDelay,  installed);
  Button_Enable (hWndColor,     installed);

  if (installed && delay_triggers->get_value ().length ()) {
    EnableWindow    (hWndDelayLabel, installed);
    EnableWindow    (hWndDelayTime,  installed);
    Button_SetCheck (hWndUseDelay,   true);
  } else {
    EnableWindow    (hWndDelayLabel, false);
    EnableWindow    (hWndDelayTime,  false);
    Button_SetCheck (hWndUseDelay,   false);
  }

  EnableWindow (hWndColorLabel, installed);
  EnableWindow (hWndRTSSGroup,  installed);

  stealth_mode->bind_to_control (new tzt::UI::CheckBox (hWndStealth));
  stealth_mode->set_value       (stealth_mode->get_value ());

  custom_d3d->bind_to_control (new tzt::UI::CheckBox (hWndCustomD3D));
  custom_d3d->set_value       (custom_d3d->get_value ());

  delay_ms->bind_to_control (new tzt::UI::EditBox (hWndDelayTime));
  delay_ms->set_value       (delay_ms->get_value () / 1000);

  return true;
}
开发者ID:Kaldaien,项目名称:TZT,代码行数:52,代码来源:tzfix_osd.cpp

示例15: PopulateForm

static void PopulateForm(void)
{
    int32_t i,j;
    char buf[64];
    int32_t mode2d, mode3d;
    HWND hwnd2d, hwnd3d;

    hwnd2d = GetDlgItem(pages[TAB_CONFIG], IDC2DVMODE);
    hwnd3d = GetDlgItem(pages[TAB_CONFIG], IDC3DVMODE);

    mode2d = checkvideomode(&settings.xdim2d, &settings.ydim2d, 8, settings.fullscreen, 1);
    mode3d = checkvideomode(&settings.xdim3d, &settings.ydim3d, settings.bpp3d, settings.fullscreen, 1);
    if (mode2d < 0) mode2d = 0;
    if (mode3d < 0)
    {
        int32_t cd[] = { 32, 24, 16, 15, 8, 0 };
        for (i=0; cd[i];) {
            if (cd[i] >= settings.bpp3d) i++;
            else break;
        }
        for (; cd[i]; i++)
        {
            mode3d = checkvideomode(&settings.xdim3d, &settings.ydim3d, cd[i], settings.fullscreen, 1);
            if (mode3d < 0) continue;
            settings.bpp3d = cd[i];
            break;
        }
    }

    Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED));
    Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));

    (void)ComboBox_ResetContent(hwnd2d);
    (void)ComboBox_ResetContent(hwnd3d);
    for (i=0; i<validmodecnt; i++)
    {
        if (validmode[i].fs != settings.fullscreen) continue;

        // all modes get added to the 3D mode list
        Bsprintf(buf, "%d x %d %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp);
        j = ComboBox_AddString(hwnd3d, buf);
        (void)ComboBox_SetItemData(hwnd3d, j, i);
        if (i == mode3d)(void)ComboBox_SetCurSel(hwnd3d, j);

        // only 8-bit modes get used for 2D
        if (validmode[i].bpp != 8 || validmode[i].xdim < 640 || validmode[i].ydim < 480) continue;
        Bsprintf(buf, "%d x %d", validmode[i].xdim, validmode[i].ydim);
        j = ComboBox_AddString(hwnd2d, buf);
        (void)ComboBox_SetItemData(hwnd2d, j, i);
        if (i == mode2d)(void)ComboBox_SetCurSel(hwnd2d, j);
    }
}
开发者ID:Daedolon,项目名称:erampage,代码行数:52,代码来源:startwin.editor.c


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