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


C++ CUpDownCtrl::Detach方法代码示例

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


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

示例1: OnInitDialog

LRESULT DlgSettingsBehavior::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_behaviorSettings.Load(m_pOptionsRoot);

	m_nCopyNewlineChar	= static_cast<int>(m_behaviorSettings.copyPasteSettings.copyNewlineChar);
	m_nScrollPageType	= m_behaviorSettings.scrollSettings.dwPageScrollRows ? 1 : 0;
	m_bFlashInactiveTab	= (m_behaviorSettings.tabHighlightSettings.dwFlashes > 0);
	m_strLeftDelimiters	= m_behaviorSettings.copyPasteSettings.strLeftDelimiters.c_str();
	m_strRightDelimiters	= m_behaviorSettings.copyPasteSettings.strRightDelimiters.c_str();

	CUpDownCtrl	spin;
	UDACCEL		udAccel;

	spin.Attach(GetDlgItem(IDC_SPIN_SCROLL_PAGE_ROWS));
	spin.SetRange(1, 500);
	udAccel.nSec = 2;
	udAccel.nInc = 1;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_TAB_FLASHES));
	spin.SetRange(1, 500);
	udAccel.nSec = 2;
	udAccel.nInc = 1;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	DoDataExchange(DDX_LOAD);

	EnableScrollControls();
	EnableFlashTabControls();

	return TRUE;
}
开发者ID:McShauno,项目名称:console,代码行数:34,代码来源:DlgSettingsBehavior.cpp

示例2: OnInitDialog

LRESULT DlgSettingsFont::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_comboFontSmoothing.Attach(GetDlgItem(IDC_COMBO_SMOOTHING));
	Helpers::LoadCombo(m_comboFontSmoothing, IDC_COMBO_SMOOTHING);

	m_fontSettings.Load(m_pOptionsRoot);

	m_strFontName	= m_fontSettings.strName.c_str();

	m_comboFontSmoothing.SetCurSel(static_cast<int>(m_fontSettings.fontSmoothing));

	CUpDownCtrl	spin;

	spin.Attach(GetDlgItem(IDC_SPIN_FONT_SIZE));
	spin.SetRange(5, 36);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_FONT_EXTRAWIDTH));
	spin.SetRange(0, 30);
	spin.Detach();

	EnableControls();

	DoDataExchange(DDX_LOAD);
	return TRUE;
}
开发者ID:Ecareyu,项目名称:console,代码行数:26,代码来源:DlgSettingsFont.cpp

示例3: onInitDialog

LRESULT QueuePage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate(texts);
	PropPage::read(items);
	PropPage::readCheckBoxList(optionItems, GetDlgItem(IDC_OTHER_QUEUE_OPTIONS));

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_SEG_NUMBER_SPIN));
	spin.SetRange32(1, 200);  //[!]PPA
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SEARCH_SPIN));
	spin.SetRange32(2, 60);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_BEGIN_SPIN));
	spin.SetRange32(2, 100000);
	spin.Detach();

	ctrlMultiSource.Attach(GetDlgItem(IDC_MULTISOURCE_COMBO));
	ctrlMultiSource.AddString(CTSTRING(DISABLED));
	ctrlMultiSource.AddString(CTSTRING(AUTOMATIC));
	ctrlMultiSource.SetCurSel(SETTING(MULTI_CHUNK));
    
	::EnableWindow(GetDlgItem(IDC_DONTBEGIN), FALSE); //[+]PPA
	::EnableWindow(GetDlgItem(IDC_BEGIN_EDIT), FALSE); //[+]PPA
	
	// Do specialized reading here
	return TRUE;
}
开发者ID:inetra,项目名称:peers1,代码行数:30,代码来源:QueuePage.cpp

示例4: OnInitDialog

LRESULT DlgSettingsBehavior::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_behaviorSettings.Load(m_pOptionsRoot);

	m_nCopyNewlineChar	= static_cast<int>(m_behaviorSettings.copyPasteSettings.copyNewlineChar);
	m_nScrollPageType	= m_behaviorSettings.scrollSettings.dwPageScrollRows ? 1 : 0;
	m_bFlashInactiveTab	= (m_behaviorSettings.tabHighlightSettings.dwFlashes > 0);
	// vds: >>
	m_nAllowMultipleInstances = m_behaviorSettings.oneInstanceSettings.bAllowMultipleInstances ? 1 : 0;
	m_nReuseTab = m_behaviorSettings.oneInstanceSettings.bReuseTab ? 1 : 0;
	m_nReuseBusyTab = m_behaviorSettings.oneInstanceSettings.bReuseBusyTab ? 1 : 0;

	m_nIntegrateWithExplorer = m_behaviorSettings.shellSettings.IsConsoleIntegratedWithExplorer();
	m_nRunConsoleMenuItem = m_behaviorSettings.shellSettings.bRunConsoleMenItem ? 1 : 0;
	m_nRunConsoleTabMenuItem = m_behaviorSettings.shellSettings.bRunConsoleTabMenuItem ? 1 : 0;
	m_nPostConsoleMenuItem = m_behaviorSettings.shellSettings.bPostConsoleMenItem ? 1 : 0;
	m_nPostConsoleTabMenuItem = m_behaviorSettings.shellSettings.bPostConsoleTabMenuItem ? 1 : 0;
	// vds: <<

	CUpDownCtrl	spin;
	UDACCEL		udAccel;

	spin.Attach(GetDlgItem(IDC_SPIN_SCROLL_PAGE_ROWS));
	spin.SetRange(1, 500);
	udAccel.nSec = 2;
	udAccel.nInc = 1;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_TAB_FLASHES));
	spin.SetRange(1, 500);
	udAccel.nSec = 2;
	udAccel.nInc = 1;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	DoDataExchange(DDX_LOAD);

	EnableScrollControls();
	EnableFlashTabControls();

	// vds: >>
	if (!m_behaviorSettings.shellSettings.CouldIntegrateConsoleWithExplorer()) {
		GetDlgItem(IDC_INTEGRATE_WITH_EXPLORER).EnableWindow(False);
	}
	EnableOnInstanceControls();
	// vds: <<

	return TRUE;
}
开发者ID:john-peterson,项目名称:console-devel,代码行数:50,代码来源:DlgSettingsBehavior.cpp

示例5: OnInitDialog

LRESULT DlgSettingsBehavior::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_behaviorSettings.Load(m_pOptionsRoot);

	m_nCopyOnSelect	= m_behaviorSettings.copyPasteSettings.bCopyOnSelect ? 1 : 0;
	m_nNoWrap		= m_behaviorSettings.copyPasteSettings.bNoWrap ? 1 : 0;
	m_nTrimSpaces	= m_behaviorSettings.copyPasteSettings.bTrimSpaces ? 1 : 0;

	m_nScrollPageType= m_behaviorSettings.scrollSettings.dwPageScrollRows ? 1 : 0;

	CUpDownCtrl	spin;
	UDACCEL		udAccel;

	spin.Attach(GetDlgItem(IDC_SPIN_SCROLL_PAGE_ROWS));
	spin.SetRange(1, 500);
	udAccel.nSec = 2;
	udAccel.nInc = 1;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	EnableScrollControls();
	
	DoDataExchange(DDX_LOAD);
	return TRUE;
}
开发者ID:pombredanne,项目名称:Depth,代码行数:25,代码来源:DlgSettingsBehavior.cpp

示例6: OnInitDialog

LRESULT DlgSettingsStyles::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
    m_controlsSettings.Load(m_pOptionsRoot);
    m_stylesSettings.Load(m_pOptionsRoot);
    m_transparencySettings.Load(m_pOptionsRoot);

    CUpDownCtrl	spin;
    UDACCEL udAccel;

    spin.Attach(GetDlgItem(IDC_SPIN_INSIDE_BORDER));
    spin.SetRange(0, 10);
    spin.Detach();

    spin.Attach(GetDlgItem(IDC_SPIN_QUAKE_ANIMATION_TIME));
    spin.SetRange(10, 20000);
    udAccel.nSec = 0;
    udAccel.nInc = 10;
    spin.SetAccel(1, &udAccel);
    spin.Detach();

    m_sliderActiveAlpha.Attach(GetDlgItem(IDC_ACTIVE_ALPHA));
    m_sliderActiveAlpha.SetRange(0, 255 - TransparencySettings::minAlpha);
    m_sliderActiveAlpha.SetTicFreq(5);
    m_sliderActiveAlpha.SetPageSize(5);

    m_sliderInactiveAlpha.Attach(GetDlgItem(IDC_INACTIVE_ALPHA));
    m_sliderInactiveAlpha.SetRange(0, 255 - TransparencySettings::minAlpha);
    m_sliderInactiveAlpha.SetTicFreq(5);
    m_sliderInactiveAlpha.SetPageSize(5);

    m_sliderActiveAlpha.SetPos(255 - m_transparencySettings.byActiveAlpha);
    m_sliderInactiveAlpha.SetPos(255 - m_transparencySettings.byInactiveAlpha);

    UpdateSliderText(m_sliderActiveAlpha.m_hWnd);
    UpdateSliderText(m_sliderInactiveAlpha.m_hWnd);

    EnableTabControls();
    EnableScrollbarControls();
    EnableQuakeControls();
    EnableTransparencyControls();

    DoDataExchange(DDX_LOAD);
    return TRUE;
}
开发者ID:heroboy,项目名称:console,代码行数:44,代码来源:DlgSettingsStyles.cpp

示例7: onInitDialog

LRESULT DownloadPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items);
	
	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_FILESPIN));
	spin.SetRange32(0, 100);
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_SLOTSSPIN));
	spin.SetRange32(0, 100);
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_SPEEDSPIN));
	spin.SetRange32(0, 10000);
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_EXTRASLOTSSPIN));
	spin.SetRange32(0, 100);
	spin.Detach();
	// Do specialized reading here
	return TRUE;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:21,代码来源:DownloadPage.cpp

示例8: onInitDialog

LRESULT QueuePage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items, 0, 0);
	PropPage::read((HWND)*this, items, optionItems, GetDlgItem(IDC_OTHER_QUEUE_OPTIONS));

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_SEG_NUMBER_SPIN));
	spin.SetRange32(2, 10);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SEARCH_SPIN));
	spin.SetRange32(5, 60);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_BEGIN_SPIN));
	spin.SetRange32(2, 100000);
	spin.Detach();

	// Do specialized reading here
	return TRUE;
}
开发者ID:strogo,项目名称:StrongDC,代码行数:22,代码来源:QueuePage.cpp

示例9: onInitDialog

LRESULT FileListDetectorPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items);

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_SDL_SPEED_SPIN));
	spin.SetRange32(1, 10*1024); //max 10 kB/s
	spin.Detach(); 
	spin.Attach(GetDlgItem(IDC_SDL_TIME_SPIN));
	spin.SetRange32(15, 3600); //an hour would be fine ;]
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_MINIMUM_FILELIST_SIZE_SPIN));
	spin.SetRange32(0, 1024*1024*1024);
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_MAXIMUM_FILELIST_SIZE_SPIN));
	spin.SetRange32(0, 1024*1024*1024);
	spin.Detach();
	spin.Attach(GetDlgItem(IDC_PERCENT_FAKE_SHARE_TOLERATED_SPIN));
	spin.SetRange32(0, 100);
	spin.Detach();
	CRect rc;

	ctrlProfiles.Attach(GetDlgItem(IDC_FILELIST_DETECTOR_LIST));
	ctrlProfiles.GetClientRect(rc);

	ctrlProfiles.InsertColumn(0, CTSTRING(CLIENTID),				LVCFMT_LEFT, (rc.Width() / 7)*2, 0);
	ctrlProfiles.InsertColumn(1, CTSTRING(CHEATING_DESCRIPTION),	LVCFMT_LEFT, (rc.Width() / 7)*3, 1);
	ctrlProfiles.InsertColumn(2, CTSTRING(ACTION),					LVCFMT_LEFT, (rc.Width() / 7)*2, 3);
	ctrlProfiles.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT);

	/*FileListDetectorProfile::List& lst = ClientProfileManager::getInstance()->getFileListDetectors();
	for(FileListDetectorProfile::List::const_iterator i = lst.begin(); i != lst.end(); ++i) {
		const FileListDetectorProfile& fd = *i;	
		addEntry(fd, ctrlProfiles.GetItemCount());
	}*/
	fixControls();
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:rsxplusplus-svn,代码行数:38,代码来源:FileListDetectorPage.cpp

示例10: OnInitDialog

LRESULT CFavTabOp::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
	::CheckDlgButton(*this, IDC_CHECK_ON_CONNECT, hub->getCheckOnConnect()	? BST_CHECKED : BST_UNCHECKED);
	::CheckDlgButton(*this, IDC_CHECK_CLIENTS, hub->getCheckClients()		? BST_CHECKED : BST_UNCHECKED);
	::CheckDlgButton(*this, IDC_CHECK_FILELISTS, hub->getCheckFilelists()	? BST_CHECKED : BST_UNCHECKED);
	::CheckDlgButton(*this, IDC_CHECK_MYINFO, hub->getCheckMyInfo()			? BST_CHECKED : BST_UNCHECKED);
	SetDlgItemText(IDC_CHECK_PROTECTED_USER, Text::toT(hub->getProtectedUsers()).c_str());
	SetDlgItemText(IDC_FAV_MIN_USERS_LIMIT, Util::toStringW(hub->getUsersLimit()).c_str());

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_FAV_MIN_USERS_LIMIT_SPIN));
	spin.SetRange32(0, 1024*1024);
	spin.Detach();
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:rsxplusplus-svn,代码行数:14,代码来源:FavTabPages.cpp

示例11: OnInitDialog

LRESULT DlgSettingsStyles::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_controlsSettings.Load(m_pOptionsRoot);
	m_stylesSettings.Load(m_pOptionsRoot);
	m_transparencySettings.Load(m_pOptionsRoot);

	m_nShowMenu		= m_controlsSettings.bShowMenu ? 1 : 0;
	m_nShowToolbar	= m_controlsSettings.bShowToolbar ? 1 : 0;
	m_nShowStatusbar= m_controlsSettings.bShowStatusbar ? 1 : 0;
	m_nShowTabs		= m_controlsSettings.bShowTabs ? 1 : 0;
	m_nHideSingleTab= m_controlsSettings.bHideSingleTab ? 1 : 0;
	m_nTabsOnBottom	= m_controlsSettings.bTabsOnBottom ? 1 : 0;
	m_nShowScrollbars= m_controlsSettings.bShowScrollbars ? 1 : 0;
	m_nFlatScrollbars= m_controlsSettings.bFlatScrollbars ? 1 : 0;

	m_nShowCaption	= m_stylesSettings.bCaption ? 1 : 0;
	m_nResizable	= m_stylesSettings.bResizable ? 1 : 0;
	m_nTaskbarButton= m_stylesSettings.bTaskbarButton ? 1 : 0;
	m_nBorder		= m_stylesSettings.bBorder ? 1 : 0;
	m_nTrayIcon		= m_stylesSettings.bTrayIcon ? 1 : 0;
	
	CUpDownCtrl	spin;

	spin.Attach(GetDlgItem(IDC_SPIN_INSIDE_BORDER));
	spin.SetRange(0, 10);
	spin.Detach();

	m_sliderActiveAlpha.Attach(GetDlgItem(IDC_ACTIVE_ALPHA));
	m_sliderActiveAlpha.SetRange(0, 255);
	m_sliderActiveAlpha.SetTicFreq(5);
	m_sliderActiveAlpha.SetPageSize(5);

	m_sliderInactiveAlpha.Attach(GetDlgItem(IDC_INACTIVE_ALPHA));
	m_sliderInactiveAlpha.SetRange(0, 255);
	m_sliderInactiveAlpha.SetTicFreq(5);
	m_sliderInactiveAlpha.SetPageSize(5);

	m_sliderActiveAlpha.SetPos(255 - m_transparencySettings.byActiveAlpha);
	m_sliderInactiveAlpha.SetPos(255 - m_transparencySettings.byInactiveAlpha);

	UpdateSliderText(m_sliderActiveAlpha.m_hWnd);
	UpdateSliderText(m_sliderInactiveAlpha.m_hWnd);

	EnableTabControls();
	EnableTransparencyControls();

	DoDataExchange(DDX_LOAD);
	return TRUE;
}
开发者ID:baczus,项目名称:Console2,代码行数:49,代码来源:DlgSettingsStyles.cpp

示例12: OnInitDialog

LRESULT DlgSettingsConsole::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_consoleSettings.Load(m_pOptionsRoot);
	m_strShell		= m_consoleSettings.strShell.c_str();
	m_strInitialDir	= m_consoleSettings.strInitialDir.c_str();

	m_nStartHidden	= m_consoleSettings.bStartHidden ? 1 : 0;
	m_nSaveSize		= m_consoleSettings.bSaveSize ? 1 : 0;

	CUpDownCtrl	spin;
	UDACCEL udAccel;

	spin.Attach(GetDlgItem(IDC_SPIN_CHANGE_REFRESH));
	spin.SetRange(5, 200);
	udAccel.nSec = 0;
	udAccel.nInc = 5;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_REFRESH));
	spin.SetRange(50, 2000);
	udAccel.nSec = 0;
	udAccel.nInc = 10;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_ROWS));
	spin.SetRange(10, 200);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_BUFFER_ROWS));
	spin.SetRange(10, 9999);
	udAccel.nSec = 0;
	udAccel.nInc = 10;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_COLUMNS));
	spin.SetRange(10, 200);
	spin.Detach();

	spin.Attach(GetDlgItem(IDC_SPIN_BUFFER_COLUMNS));
	spin.SetRange(10, 200);
	udAccel.nSec = 0;
	udAccel.nInc = 5;
	spin.SetAccel(1, &udAccel);
	spin.Detach();

	DoDataExchange(DDX_LOAD);
	return TRUE;
}
开发者ID:atsuoishimoto,项目名称:console2-ime-old,代码行数:51,代码来源:DlgSettingsConsole.cpp

示例13: onInitDialog

// При инициализации.
LRESULT RSSPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	if (m_CodeingList.empty())
	{
		m_CodeingList.insert(CodeingMapPair(TSTRING(RSS_CODEING_AUTO), RSSManager::getInstance()->getCodeing(0)));
		m_CodeingList.insert(CodeingMapPair(TSTRING(RSS_CODEING_UTF8), RSSManager::getInstance()->getCodeing(1)));
		m_CodeingList.insert(CodeingMapPair(TSTRING(RSS_CODEING_CP1251), RSSManager::getInstance()->getCodeing(2)));
	}
	
	PropPage::translate((HWND)(*this), texts);
	PropPage::read((HWND)*this, items);
	
	CRect rc;
	
	ctrlCommands.Attach(GetDlgItem(IDC_RSS_ITEMS));
	ctrlCommands.GetClientRect(rc);
	
	ctrlCommands.InsertColumn(0, CTSTRING(RSS_URL), LVCFMT_LEFT, rc.Width() / 3, 0);
	ctrlCommands.InsertColumn(1, CTSTRING(RSS_TITLE), LVCFMT_LEFT, rc.Width() / 3, 1);
	ctrlCommands.InsertColumn(2, CTSTRING(RSS_CODEING), LVCFMT_LEFT, rc.Width() / 3, 1);
	SET_EXTENDENT_LIST_VIEW_STYLE(ctrlCommands);
#ifdef USE_SET_LIST_COLOR_IN_SETTINGS
	SET_LIST_COLOR_IN_SETTING(ctrlCommands);
#endif
	
	
	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_RSS_AUTO_REFRESH_TIME_SPIN));
	spin.SetRange(1, 10);
	spin.Detach();
	
	// Do specialized reading here
	const RSSManager::FeedList& lst = RSSManager::getInstance()->lockFeedList();
	auto cnt = ctrlCommands.GetItemCount();
	for (auto i = lst.cbegin(); i != lst.cend(); ++i)
	{
		addEntry((*i), cnt++);
	}
	RSSManager::getInstance()->unlockFeedList();
	
	return TRUE;
}
开发者ID:snarkus,项目名称:flylinkdc-r5xx,代码行数:43,代码来源:RSSPage.cpp

示例14: OnInitDialog

// Initialize dialog
LRESULT ADLSProperties::OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
{
	// Translate the texts
	SetWindowText(CTSTRING(ADLS_PROPERTIES));
	SetDlgItemText(IDC_ADLSP_SEARCH,		CTSTRING(ADLS_SEARCH_STRING));
	SetDlgItemText(IDC_ADLSP_TYPE,			CTSTRING(ADLS_TYPE));
	SetDlgItemText(IDC_ADLSP_SIZE_MIN,		CTSTRING(ADLS_SIZE_MIN));
	SetDlgItemText(IDC_ADLSP_SIZE_MAX,		CTSTRING(ADLS_SIZE_MAX));
	SetDlgItemText(IDC_ADLSP_UNITS,			CTSTRING(ADLS_UNITS));
	SetDlgItemText(IDC_ADLSP_DESTINATION,	CTSTRING(ADLS_DESTINATION));
	SetDlgItemText(IDC_IS_ACTIVE,			CTSTRING(ADLS_ENABLED));
	SetDlgItemText(IDC_AUTOQUEUE,			CTSTRING(ADLS_DOWNLOAD));
	SetDlgItemText(IDC_IS_FORBIDDEN,		CTSTRING(FORBIDDEN));
	SetDlgItemText(IDC_ADLSEARCH_COMMENT,	CTSTRING(COMMENT));

	CUpDownCtrl spin;
	spin.Attach(GetDlgItem(IDC_ADLS_POINTS_SPIN));
	spin.SetRange32(0, 1024*1024);
	spin.Detach();

	cRaw.attach(GetDlgItem(IDC_ADLSEARCH_RAW_ACTION), search->adlsRaw);

	// Initialize combo boxes
	::SendMessage(GetDlgItem(IDC_SOURCE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SourceTypeToDisplayString(ADLSearch::OnlyFile).c_str());
	::SendMessage(GetDlgItem(IDC_SOURCE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SourceTypeToDisplayString(ADLSearch::OnlyDirectory).c_str());
	::SendMessage(GetDlgItem(IDC_SOURCE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SourceTypeToDisplayString(ADLSearch::FullPath).c_str());
	::SendMessage(GetDlgItem(IDC_SOURCE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SourceTypeToDisplayString(ADLSearch::TTHFile).c_str());

	::SendMessage(GetDlgItem(IDC_SIZE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SizeTypeToDisplayString(ADLSearch::SizeBytes).c_str());
	::SendMessage(GetDlgItem(IDC_SIZE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SizeTypeToDisplayString(ADLSearch::SizeKiloBytes).c_str());
	::SendMessage(GetDlgItem(IDC_SIZE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SizeTypeToDisplayString(ADLSearch::SizeMegaBytes).c_str());
	::SendMessage(GetDlgItem(IDC_SIZE_TYPE), CB_ADDSTRING, 0, 
		(LPARAM)search->SizeTypeToDisplayString(ADLSearch::SizeGigaBytes).c_str());

	// Load search data
	char* buf = new char[32];
	SetDlgItemText(IDC_SEARCH_STRING,		Text::toT(search->searchString).c_str());
	SetDlgItemText(IDC_DEST_DIR,			Text::toT(search->destDir).c_str());
	SetDlgItemText(IDC_MIN_FILE_SIZE,		Text::toT(search->minFileSize > 0 ? _i64toa(search->minFileSize, buf, 10) : "").c_str());
	SetDlgItemText(IDC_MAX_FILE_SIZE,		Text::toT(search->maxFileSize > 0 ? _i64toa(search->maxFileSize, buf, 10) : "").c_str());
	SetDlgItemText(IDC_ADLS_KICK_STRING,	Text::toT(search->kickString).c_str());
	SetDlgItemInt(IDC_ADLS_POINTS,			(search->adlsPoints > 0 ? search->adlsPoints : 0));
	SetDlgItemText(IDC_ADLS_COMMENT,		Text::toT(search->adlsComment).c_str());

	::SendMessage(GetDlgItem(IDC_IS_ACTIVE),			BM_SETCHECK,	search->isActive ? 1 : 0, 0L);
	::SendMessage(GetDlgItem(IDC_SOURCE_TYPE),			CB_SETCURSEL,	search->sourceType, 0L);
	::SendMessage(GetDlgItem(IDC_SIZE_TYPE),			CB_SETCURSEL,	search->typeFileSize, 0L);
	::SendMessage(GetDlgItem(IDC_AUTOQUEUE),			BM_SETCHECK,	search->isAutoQueue ? 1 : 0, 0L);
	::SendMessage(GetDlgItem(IDC_IS_FORBIDDEN),			BM_SETCHECK,	search->isForbidden ? 1 : 0, 0L);
//	::SendMessage(GetDlgItem(IDC_IS_REGEXP),			BM_SETCHECK,	search->isRegExp ? 1 : 0, 0L);
	::SendMessage(GetDlgItem(IDC_OVER_RIDE_POINTS),		BM_SETCHECK,	search->overRidePoints ? 1 : 0, 0L);
	::SendMessage(GetDlgItem(IDC_IS_CASE_SENSITIVE),	BM_SETCHECK,	search->isCaseSensitive ? 1 : 0, 0L);

	if (search->fromFavs)
		::SendMessage(GetDlgItem(IDC_OVERRIDE_FAV),		BM_SETCHECK, 1, 0L);
	else
		::SendMessage(GetDlgItem(IDC_OVERRIDE_CUSTOM),	BM_SETCHECK, 1, 0L);


	delete[] buf;
	setControlState();
	setControlOverride();

	// Center dialog
	CenterWindow(GetParent());

	return FALSE;
}
开发者ID:BackupTheBerlios,项目名称:rsxplusplus-svn,代码行数:76,代码来源:ADLSProperties.cpp

示例15: OnInitDialog

LRESULT FavHubProperties::OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
{
	// Translate dialog
	SetWindowText(CTSTRING(FAVORITE_HUB_PROPERTIES));
	SetDlgItemText(IDCANCEL, CTSTRING(CANCEL));
	SetDlgItemText(IDC_FH_HUB, CTSTRING(HUB));
	SetDlgItemText(IDC_FH_IDENT, CTSTRING(FAVORITE_HUB_IDENTITY));
	SetDlgItemText(IDC_FH_NAME, CTSTRING(HUB_NAME));
	SetDlgItemText(IDC_FH_ADDRESS, CTSTRING(HUB_ADDRESS));
	SetDlgItemText(IDC_FH_HUB_DESC, CTSTRING(DESCRIPTION));
	SetDlgItemText(IDC_FH_NICK, CTSTRING(NICK));
	SetDlgItemText(IDC_FH_PASSWORD, CTSTRING(PASSWORD));
	SetDlgItemText(IDC_FH_USER_DESC, CTSTRING(DESCRIPTION));
	SetDlgItemText(IDC_FH_CONN, CTSTRING(FAVORITE_HUB_CONNECTION));
	SetDlgItemText(IDC_STEALTH, CTSTRING(STEALTH_MODE));
	SetDlgItemText(IDC_FAV_NO_PM, CTSTRING(FAV_NO_PM));
	SetDlgItemText(IDC_SHOW_JOIN, CTSTRING(FAV_SHOW_JOIN));
	SetDlgItemText(IDC_HIDE_SHARE, CTSTRING(HIDE_SHARE));
	SetDlgItemText(IDC_FAV_SEARCH_INTERVAL, CTSTRING(MINIMUM_SEARCH_INTERVAL));
	SetDlgItemText(IDC_FAVGROUP, CTSTRING(GROUP));
	SetDlgItemText(IDC_LOGMAINCHAT, CTSTRING(FAV_LOG_CHAT));
	SetDlgItemText(IDC_CHAT_NOTIFY, CTSTRING(CHAT_NOTIFY));
	SetDlgItemText(IDC_FAILOVER, CTSTRING(ACCEPT_FAILOVERS_FAV));
	SetDlgItemText(IDC_AWAY_MSG_LBL, CTSTRING(CUSTOM_AWAY_MESSAGE));

	SetDlgItemText(IDC_LOGMAINCHAT, CTSTRING(FAV_LOG_CHAT));
	SetDlgItemText(IDC_HUBSETTINGS, CTSTRING(GLOBAL_SETTING_OVERRIDES));
	SetDlgItemText(IDC_SEARCH_INTERVAL_DEFAULT, CTSTRING(USE_DEFAULT));

	SetDlgItemText(IDC_FAV_SHAREPROFILE_CAPTION, CTSTRING(SHARE_PROFILE));
	SetDlgItemText(IDC_EDIT_PROFILES, CTSTRING(EDIT_PROFILES));
	SetDlgItemText(IDC_PROFILES_NOTE, CTSTRING(PROFILES_NOTE));

	// Fill in values
	SetDlgItemText(IDC_HUBNAME, Text::toT(entry->getName()).c_str());
	SetDlgItemText(IDC_HUBDESCR, Text::toT(entry->getDescription()).c_str());
	SetDlgItemText(IDC_HUBADDR, Text::toT(entry->getServerStr()).c_str());
	SetDlgItemText(IDC_NICK, Text::toT(entry->get(HubSettings::Nick)).c_str());
	SetDlgItemText(IDC_HUBPASS, Text::toT(entry->getPassword()).c_str());
	SetDlgItemText(IDC_USERDESC, Text::toT(entry->get(HubSettings::Description)).c_str());
	SetDlgItemText(IDC_EMAIL, Text::toT(entry->get(HubSettings::Email)).c_str());

	SetDlgItemText(IDC_AWAY_MSG, Text::toT(entry->get(HubSettings::AwayMsg)).c_str());

	CheckDlgButton(IDC_STEALTH, entry->getStealth() ? BST_CHECKED : BST_UNCHECKED);
	CheckDlgButton(IDC_FAV_NO_PM, entry->getFavNoPM() ? BST_CHECKED : BST_UNCHECKED);

	CheckDlgButton(IDC_SHOW_JOIN, toInt(entry->get(HubSettings::ShowJoins)));
	CheckDlgButton(IDC_SHOW_JOIN_FAV, toInt(entry->get(HubSettings::FavShowJoins)));
	CheckDlgButton(IDC_LOGMAINCHAT, toInt(entry->get(HubSettings::LogMainChat)));
	CheckDlgButton(IDC_CHAT_NOTIFY, toInt(entry->get(HubSettings::ChatNotify)));
	CheckDlgButton(IDC_FAILOVER, toInt(entry->get(HubSettings::AcceptFailovers)));

	CheckDlgButton(IDC_FAV_NO_PM, entry->getFavNoPM() ? BST_CHECKED : BST_UNCHECKED);

	auto searchInterval = entry->get(HubSettings::SearchInterval);
	CheckDlgButton(IDC_SEARCH_INTERVAL_DEFAULT, searchInterval == HubSettings::getMinInt() ? BST_CHECKED : BST_UNCHECKED);
	SetDlgItemText(IDC_FAV_SEARCH_INTERVAL_BOX, Util::toStringW(searchInterval).c_str());

	bool isAdcHub = entry->isAdcHub();

	CComboBox combo;
	combo.Attach(GetDlgItem(IDC_FAVGROUP_BOX));
	combo.AddString(_T("---"));
	combo.SetCurSel(0);

	const FavHubGroups& favHubGroups = FavoriteManager::getInstance()->getFavHubGroups();
	for(const auto& name: favHubGroups | map_keys) {
		int pos = combo.AddString(Text::toT(name).c_str());
		
		if(name == entry->getGroup())
			combo.SetCurSel(pos);
	}

	combo.Detach();

	// TODO: add more encoding into wxWidgets version, this is enough now
	// FIXME: following names are Windows only!
	combo.Attach(GetDlgItem(IDC_ENCODING));
	combo.AddString(_T("System default"));
	combo.AddString(_T("English_United Kingdom.1252"));
	combo.AddString(_T("Czech_Czech Republic.1250"));
	combo.AddString(_T("Russian_Russia.1251"));
	combo.AddString(Text::toT(Text::utf8).c_str());

	ctrlProfile.Attach(GetDlgItem(IDC_FAV_SHAREPROFILE));
	appendProfiles();
	hideShare = entry->getShareProfile() && entry->getShareProfile()->getToken() == SP_HIDDEN;
	CheckDlgButton(IDC_HIDE_SHARE, hideShare ? BST_CHECKED : BST_UNCHECKED);


	if(isAdcHub) {
		combo.SetCurSel(4); // select UTF-8 for ADC hubs
		combo.EnableWindow(false);
		if (hideShare)
			ctrlProfile.EnableWindow(false);
	} else {
		ctrlProfile.EnableWindow(false);
		if(entry->getEncoding().empty()) {
			combo.SetCurSel(0);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:airdc-svn,代码行数:101,代码来源:FavHubProperties.cpp


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