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


C++ DoDataExchange函数代码示例

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


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

示例1: DoDataExchange

LRESULT DlgSettingsAppearance::OnClickedBtnBrowseFont(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	DoDataExchange(DDX_SAVE);

	LOGFONT	lf;
	::ZeroMemory(&lf, sizeof(LOGFONT));

	wcsncpy_s(lf.lfFaceName, _countof(lf.lfFaceName), LPCTSTR(m_strFontName), 32);
	lf.lfHeight	= -MulDiv(m_fontSettings.dwSize, GetDeviceCaps(::GetDC(NULL), LOGPIXELSY), 72);
	lf.lfWeight	= (m_nFontBold > 0) ? FW_BOLD : FW_NORMAL;
	lf.lfItalic	= static_cast<BYTE>(m_nFontItalic);

	CFontDialog	fontDlg(&lf, CF_FIXEDPITCHONLY|CF_SCREENFONTS);


	if (fontDlg.DoModal() == IDOK)
	{
		m_strFontName							= fontDlg.GetFaceName();// fontDlg.m_lf.lfFaceName;
		m_fontSettings.dwSize= static_cast<DWORD>(static_cast<double>(-fontDlg.m_lf.lfHeight*72)/static_cast<double>(GetDeviceCaps(::GetDC(NULL), LOGPIXELSY)) + 0.5);
		m_nFontBold								= fontDlg.IsBold() ? 1 : 0; //(fontDlg.m_lf.lfWeight == FW_BOLD) ? 1 : 0;
		m_nFontItalic							= fontDlg.IsItalic() ? 1 : 0; // fontDlg.m_lf.lfItalic;

		DoDataExchange(DDX_LOAD);
	}

	return 0;
}
开发者ID:milang,项目名称:Console,代码行数:27,代码来源:DlgSettingsAppearance.cpp

示例2: RefreshGlobal

	void RefreshGlobal()
	{
		DoDataExchange(true);
		boost::filesystem::path configFile;
		GetConfigPath(static_cast<const TCHAR *>(m_ConfigLabel), configFile);
		CComPtr<IConfig> config = CreateIConfig(QUERYBUILDER_CFG, configFile);
		CString accountServer = config->Get(GLOBAL_SERVER_ACCOUNT);
		if (accountServer.IsEmpty())
		{
			GetDlgItem(IDC_EDIT_USER).EnableWindow(false);
			GetDlgItem(IDC_EDIT_PASSWORD).EnableWindow(false);
			m_User = _T("");
			m_Password = _T("");
		}
		else
		{
			GetDlgItem(IDC_EDIT_USER).EnableWindow(true);
			GetDlgItem(IDC_EDIT_PASSWORD).EnableWindow(true);
			m_User = config->Get(GLOBAL_USER);
			m_Password = config->Get(GLOBAL_PASSWORD);
		}
		if (m_configPrefs)
			GetDlgItem(IDC_LOGIN_PREFS).EnableWindow(m_ConfigLabel.IsEmpty()==false);
		DoDataExchange();
		m_autoUpdateLink.ShowWindow(SW_HIDE);
		if (!(bool)m_IniFile->Get(GLOBAL_DISABLEAUTOUPDATE))
			clib::thread run(__FUNCTION__, boost::bind(&thread_CheckForUpdates, this, m_autoupdate));

	}
开发者ID:dehilsterlexis,项目名称:eclide-1,代码行数:29,代码来源:LoginDlg.cpp

示例3: ATLASSERT

LRESULT CRecoverDlg::OnInitDialog(HWND /*hWndCtl*/, LPARAM /*lParam*/)
{
	ATLASSERT( m_pDevice.get() != NULL );
	CenterWindow();
	m_progBar.SubclassWindow( GetDlgItem(IDC_PROGBAR) );
	m_btnOK.Attach( GetDlgItem(IDOK) );
	m_btnCancel.Attach( GetDlgItem(IDCANCEL) );

	WTL :: CString strBtnFace;
	strBtnFace.LoadString( IDS_RECOVER_BTN_CLOSE );
	m_btnCancel.SetWindowText( strBtnFace );

	DoDataExchange(TRUE);
	m_strBindType.LoadString(m_id_bind_type);
	m_strDevice = m_pDevice->GetTitle();
	DoDataExchange(FALSE);

	WTL::CString strCaption;
	strCaption.LoadString(m_id_caption);
	SetWindowText(strCaption);

	SetPhaseText(IDS_RECOVERDLG_PHASE_READY);

	if(m_bForceStart)
		Start();

	return 0;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:28,代码来源:nbrecoverdlgs.cpp

示例4: DoDataExchange

LRESULT CSelectDialog::OnSFX(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
    //DDX情報アップデート
    DoDataExchange(TRUE);
    if(BN_CLICKED==wNotifyCode) {
        ::EnableWindow(GetDlgItem(IDC_CHECK_COMPRESS_SPLIT),!bSFX);
        bSplit=false;
    }
    DoDataExchange(FALSE);
    return 0;
}
开发者ID:Claybird,项目名称:lhaforge,代码行数:11,代码来源:SelectDlg.cpp

示例5: DoDataExchange

LRESULT CPlayerDlg::OnBnClickedButtonDef(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	DoDataExchange(TRUE);
	TCHAR szFilePath[MAX_PATH + 1];
	::GetCurrentDirectory(MAX_PATH,szFilePath);
	CString csFolder;
	if(SelectFolder(m_hWnd, csFolder))
		m_def = csFolder;
	::SetCurrentDirectory(szFilePath);
	DoDataExchange();
	return 0;
}
开发者ID:william0wang,项目名称:meditor,代码行数:12,代码来源:PlayerDlg.cpp

示例6: _T

LRESULT CUpdateDlg::OnFinished(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	m_down_index = -1;
	m_progress.ShowWindow(SW_HIDE);

	m_info2 = _T("");
	if(lParam) {
		KillTimer(0);
		GetDlgItem(IDC_BUTTON_UN7ZIP).ShowWindow(SW_SHOW);
		GetDlgItem(IDC_CHECK_INI).ShowWindow(SW_SHOW);

		m_info1 = str_downloadok;
		DoDataExchange();
	} else {
		m_failtime++;
		if(m_failtime < MAX_DOWNLOAD_SERVER) {
			wstring server;
			switch(m_failtime)
			{
			case 1:
				server = L"http://ncu";
				break;
			case 2:
				server = L"http://surfnet";
				break;
			case 3:
				server = L"http://jaist";
				break;
			case 4:
				server = L"http://softlayer";
				break;
			case 5:
				server = L"http://nchc";
				break;
			default:
				server = L"http://kent";
				break;
			}
			wstring url_x =  server + m_urlbase;
			m_progress.ShowWindow(SW_SHOW);
			m_down_index = StartDownloaderW(url_x.c_str(), m_path.c_str(), m_filename.c_str(),
				(FUNC_CallBack)Callback_Download, DOWNLOAD_WPARAM);

		} else {
			GetDlgItem(IDC_BUTTON_UPDATE).ShowWindow(SW_SHOW);
			m_info1 = str_downloadfail;
			DoDataExchange();
		}
	}
	
	return 0;
}
开发者ID:william0wang,项目名称:meditor,代码行数:52,代码来源:UpdateDlg.cpp

示例7: folderDialog

LRESULT PageSettingsTabs1::OnClickedBtnBrowseDir(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	CFolderDialog folderDialog(m_hWnd, Helpers::LoadStringW(MSG_SETTINGS_INIT_DIR).c_str());

	if (folderDialog.DoModal() == IDOK)
	{
		DoDataExchange(DDX_SAVE);
		m_strInitialDir = folderDialog.m_szFolderPath;
		DoDataExchange(DDX_LOAD);
	}

	return 0;
}
开发者ID:adinath,项目名称:console,代码行数:13,代码来源:PageSettingsTabs1.cpp

示例8: DoDataExchange

LRESULT DlgSettingsControls::OnTabItemChanged(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
{
	// save FULLSCREEN or WINDOWED settings
	DoDataExchange(DDX_SAVE);

	// switch FULLSCREEN <-> WINDOWED
	m_controlsSettings.bIsFullScreen = m_tabCtrl.GetCurSel() == 1;

	DoDataExchange(DDX_LOAD);
	EnableTabControls();

	return 0;
}
开发者ID:cbucher,项目名称:console,代码行数:13,代码来源:DlgSettingsControls.cpp

示例9: switch

LRESULT CChecksumDialog::OnAsyncProgress(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	ProgressInfo info = static_cast<ProgressInfo>(wParam);

	switch (info)
	{
		case ProgressInfo_Inititialize:
		{
			ATLTRACE(_T("[CChecksumDialog] ::OnAsyncProgress - Calculation started...\n"));
			GetDlgItem(IDC_BTN_SELECTFILE).EnableWindow(FALSE);
			GetDlgItem(IDC_BTN_CALCULATECHECKSUM).EnableWindow(FALSE);
			GetDlgItem(IDC_BTN_COPYCHECKSUM).EnableWindow(FALSE);
			GetDlgItem(IDC_PGS_CALCULATION).ShowWindow(SW_SHOWNORMAL);
		} break;

		case ProgressInfo_Percentage:
		{
			GetDlgItem(IDC_PGS_CALCULATION).SendMessage(PBM_SETPOS, lParam);
		} break;

		case ProgressInfo_EndError:
		{
			ATLTRACE(_T("[CChecksumDialog] ::OnAsyncProgress - Calculation finished with error!\n"));
			GetDlgItem(IDC_PGS_CALCULATION).ShowWindow(SW_HIDE);
			GetDlgItem(IDC_BTN_SELECTFILE).EnableWindow(TRUE);
			GetDlgItem(IDC_BTN_CALCULATECHECKSUM).EnableWindow(TRUE);
			GetDlgItem(IDC_BTN_COPYCHECKSUM).EnableWindow(TRUE);

			m_hAsyncOp = NULL;
			m_sChecksum = _T("");
			DoDataExchange(FALSE);

			::AtlMessageBox(m_hWnd, IDS_ERR_WINDOWS);
		} break;

		case ProgressInfo_EndSuccess:
		{
			ATLTRACE(_T("[CChecksumDialog] ::OnAsyncProgress - Calculation finished.\n"));
			GetDlgItem(IDC_PGS_CALCULATION).ShowWindow(SW_HIDE);
			GetDlgItem(IDC_BTN_SELECTFILE).EnableWindow(TRUE);
			GetDlgItem(IDC_BTN_CALCULATECHECKSUM).EnableWindow(TRUE);
			GetDlgItem(IDC_BTN_COPYCHECKSUM).EnableWindow(TRUE);

			m_hAsyncOp = NULL;
			DoDataExchange(FALSE);
		} break;
	}

	return 0;
}
开发者ID:Chrisso,项目名称:Tools,代码行数:50,代码来源:ChecksumDialog.cpp

示例10: Invalidate

void PageSettingsTabsColors::Load(std::shared_ptr<TabData>& tabData)
{
	m_tabData = tabData;

	Invalidate();
	DoDataExchange(DDX_LOAD);
}
开发者ID:Ashod,项目名称:Console2,代码行数:7,代码来源:PageSettingsTabsColors.cpp

示例11: DoDataExchange

LRESULT CMainFramePage::OnNotify(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	LPPSHNOTIFY lppsn = (LPPSHNOTIFY) lParam;
	if (lppsn->hdr.code == PSN_APPLY)
	{
		
		DoDataExchange(TRUE);
		if (g_config.bLaunchAtStartup!=bLaunchAtStartup /*|| g_nMainFrameState != m_cbFrameState.GetCurSel()*/)
		{
			g_config.bLaunchAtStartup=bLaunchAtStartup;
			SetLaunchStrategy(bLaunchAtStartup);
		}
		if (nSaveAllElapse > 3600)
			nSaveAllElapse = 3600;
		if (nSaveAllElapse < 1)
			nSaveAllElapse = 1;
		int nChecked = IsDlgButtonChecked(IDC_CHECK_WORK_DIR);
		if (nChecked!=BST_CHECKED)
		{
			//Detect Storage Root
			int nRootStorageDirLen = _tcsclen(g_config.szRootStorageDir);
			if (nRootStorageDirLen>0 && _T(':') == g_config.szRootStorageDir[1] && INVALID_FILE_ATTRIBUTES != GetFileAttributes(g_config.szRootStorageDir))
			{
				int len = _tcsclen(g_config.szRootStorageDir);
				for (int i=len-1; i>=0; --i)
				{
					if (_T('\\') == g_config.szRootStorageDir[i])
					{
						g_config.szRootStorageDir[i] = _T('\0');
					}
					else
					{
						break;
					}
				}
				g_config.bUseWorkingDirAsRootStrorageDir = false;
				WritePrivateProfileString(_T("MainFrame"),_T("UseWorkingDirAsRootStrorageDir"),_T("00"),g_config.strConfigFileName);
				WritePrivateProfileString(_T("MainFrame"),_T("RootStorageDir"),g_config.szRootStorageDir,g_config.strConfigFileName);
			}
			else
			{
				MessageBox( _T("无效“相对路径起始”,使用BooguNote.exe所在路径作为“相对路径起始”"), _T("警告"), MB_OK|MB_ICONEXCLAMATION);
				g_config.bUseWorkingDirAsRootStrorageDir = true;
				WritePrivateProfileString(_T("MainFrame"),_T("UseWorkingDirAsRootStrorageDir"),_T("01"),g_config.strConfigFileName);
				g_config.szRootStorageDir[0]=_T('\0');
				WritePrivateProfileString(_T("MainFrame"),_T("RootStorageDir"),_T(""),g_config.strConfigFileName);
			}
			
		}
		else
		{
			g_config.bUseWorkingDirAsRootStrorageDir = true;
			WritePrivateProfileString(_T("MainFrame"),_T("UseWorkingDirAsRootStrorageDir"),_T("01"),g_config.strConfigFileName);
			g_config.szRootStorageDir[0]=_T('\0');
			WritePrivateProfileString(_T("MainFrame"),_T("RootStorageDir"),_T(""),g_config.strConfigFileName);
		}
	}
	bHandled = FALSE;
	return 0;
}
开发者ID:boogunote,项目名称:bn1,代码行数:60,代码来源:MainFramePage.cpp

示例12: GetDlgItem

//////////////////////////////////////////////////////////////////////
// Message handlers
BOOL CMainFramePage::OnInitDialog ( HWND hwndFocus, LPARAM lParam )
{
	//m_cbFrameState = GetDlgItem(IDC_COMBO_FRAME_STATE);
	//m_cbFrameState.InsertString(0,_T("Normal"));
	//m_cbFrameState.InsertString(1,_T("Dock"));
	//m_cbFrameState.InsertString(2,_T("Dock&AutoHide"));
	//m_cbFrameState.InsertString(3,_T("Hiden"));
	m_cbTxtEncoding = GetDlgItem(IDC_COMBO_TXT_ENCODING);
	m_cbTxtEncoding.InsertString(0,_T("ANSI"));
	m_cbTxtEncoding.InsertString(1,_T("UTF-8"));
	//m_cbTxtEncoding.SetCurSel(g_nMainFrameState);
	//if (bLaunchAtStartup)
	//{
	//	//GetDlgItem(IDC_COMBO_FRAME_STATE).EnableWindow(TRUE);
	//}
	//else
	//{
	//	//GetDlgItem(IDC_COMBO_FRAME_STATE).EnableWindow(FALSE);
	//}

	if (g_config.bUseWorkingDirAsRootStrorageDir)
	{
		GetDlgItem(IDC_EDIT_STORAGE_ROOT).EnableWindow(FALSE);
		GetDlgItem(IDC_EDIT_STORAGE_ROOT).SetWindowText(_T(""));
	}
	else
	{
		GetDlgItem(IDC_EDIT_STORAGE_ROOT).EnableWindow(TRUE);
		GetDlgItem(IDC_EDIT_STORAGE_ROOT).SetWindowText(g_config.szRootStorageDir);
	}
	DoDataExchange();

	return TRUE;
}
开发者ID:boogunote,项目名称:bn1,代码行数:36,代码来源:MainFramePage.cpp

示例13: DoDataExchange

LRESULT CSyntaxView::OnReset(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	DoDataExchange();
	m_list.DeleteAllItems();
	m_prevSyntaxMarker = NULL;
	return 0;
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:7,代码来源:SyntaxView.cpp

示例14: SetMsgHandled

LRESULT CRepositoryView::OnInitDialog(HWND /*hWnd*/, LPARAM /*lParam*/)
{
    SetMsgHandled(false);
    DlgResize_Init(false,false);

    WTL::CImageList img, state;
    img.CreateFromImage(IDB_REP,16,0,RGB(255,0,255), IMAGE_BITMAP, LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS);

    img.SetBkColor(GetSysColor(COLOR_WINDOW));
    ATLTRACE(_T("IDB_REP images=%d\n"), img.GetImageCount());

    state.CreateFromImage(IDB_REP_MASK, 8, 0, RGB(255,0,255), IMAGE_BITMAP, LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS);
    state.SetBkColor(GetSysColor(COLOR_WINDOW));

    m_Tree = GetDlgItem(IDC_TREE_REPOSITORY);
    m_Tree.SetImageLists(img, state);

    //::SetWindowTheme(m_Tree, L"explorer", 0);
    //m_Tree.ModifyStyle(TVS_HASLINES, 0);
    //m_Tree.ModifyStyleEx(0, TVS_EX_DOUBLEBUFFER | TVS_EX_FADEINOUTEXPANDOS | TVS_EX_AUTOHSCROLL);

    DoDataExchange();
    //Refresh();

    return 0;
}
开发者ID:hpcc-systems,项目名称:eclide,代码行数:26,代码来源:RepositoryView.cpp

示例15: CreateDirectory

void CUpdateDlg::StartDownload()
{
	m_info1.Format(_T("%s\n\n%s"), str_downloading, m_filename.c_str());

	m_avgbps = 0;
	m_avgnumber = 0;
	m_filesize = 0;
	m_DownSize = 0;
	m_LastTimer = 0;
	m_LastTimerSize = 0;

	if(!FileExist(m_path.c_str()))
		CreateDirectory(m_path.c_str(), NULL);
	else if(!FileIsDirectory(m_path.c_str())) {
		DeleteFile(m_path.c_str());
		CreateDirectory(m_path.c_str(), NULL);
	}

	m_progress.ShowWindow(SW_SHOW);
	DoDataExchange();

	m_failtime = 0;

	m_down_index = StartDownloaderW(m_url.c_str(), m_path.c_str(), m_filename.c_str(),
		(FUNC_CallBack)Callback_Download, DOWNLOAD_WPARAM);
}
开发者ID:william0wang,项目名称:meditor,代码行数:26,代码来源:UpdateDlg.cpp


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