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


C++ DialogEnableWindow函数代码示例

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


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

示例1: DialogEnableWindow

LRESULT	CGitProgressDlg::OnCmdStart(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
	DialogEnableWindow(IDOK, FALSE);
	DialogEnableWindow(IDCANCEL, TRUE);

	return 0;
}
开发者ID:3F,项目名称:tortoisegit-mdc,代码行数:7,代码来源:GitProgressDlg.cpp

示例2: DialogEnableWindow

void CEditPropExternals::OnLvnItemchangedExternalslist(NMHDR * /*pNMHDR*/, LRESULT *pResult)
{
    //LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
    DialogEnableWindow(IDC_REMOVE, m_ExtList.GetSelectedCount());
    DialogEnableWindow(IDC_EDIT, m_ExtList.GetSelectedCount() == 1);
    *pResult = 0;
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:7,代码来源:EditPropExternals.cpp

示例3: SetModified

void CSettingsProgsDiff::OnBnClickedExtdiffpropsOff()
{
    m_iExtDiffProps = 0;
    SetModified();
    DialogEnableWindow(IDC_EXTDIFFPROPS, false);
    DialogEnableWindow(IDC_EXTDIFFPROPSBROWSE, false);
    CheckProgCommentProps();
}
开发者ID:yuexiaoyun,项目名称:tortoisesvn,代码行数:8,代码来源:SettingsProgsDiff.cpp

示例4: DialogEnableWindow

void CInputLogDlg::UpdateOKButton()
{
	CString sTemp = m_cInput.GetText();
	if (!m_pProjectProperties || sTemp.GetLength() >= m_pProjectProperties->nMinLogSize)
		DialogEnableWindow(IDOK, TRUE);
	else
		DialogEnableWindow(IDOK, FALSE);
}
开发者ID:tribis,项目名称:TortoiseGit,代码行数:8,代码来源:InputLogDlg.cpp

示例5: DialogEnableWindow

BOOL CSetMainPage::OnInitDialog()
{
	CMFCFontComboBox::m_bDrawUsingFont = true;

	CPropertyPage::OnInitDialog();

	m_bBackup = m_regBackup;
	m_bFirstDiffOnLoad = m_regFirstDiffOnLoad;
	m_bFirstConflictOnLoad = m_regFirstConflictOnLoad;
	m_nTabSize = m_regTabSize;
	m_bIgnoreEOL = m_regIgnoreEOL;
	m_bOnePane = m_regOnePane;
	m_sFontName = m_regFontName;
	m_dwFontSize = m_regFontSize;
	m_bViewLinenumbers = m_regViewLinenumbers;
	m_bCaseInsensitive = m_regCaseInsensitive;
	m_bUTF8Default = m_regUTF8Default;
	m_bAutoAdd = m_regAutoAdd;
	m_nMaxInline = m_regMaxInline;
	m_bUseRibbons = m_regUseRibbons;
	m_bUseTaskDialog = m_regUseTaskDialog;

	DialogEnableWindow(IDC_FIRSTCONFLICTONLOAD, m_bFirstDiffOnLoad);
	DialogEnableWindow(IDC_USETASKDIALOG, CTaskDialog::IsSupported());

	CString temp;
	int count = 0;
	for (int i=6; i<32; i=i+2)
	{
		temp.Format(_T("%d"), i);
		m_cFontSizes.AddString(temp);
		m_cFontSizes.SetItemData(count++, i);
	}
	BOOL foundfont = FALSE;
	for (int i=0; i<m_cFontSizes.GetCount(); i++)
	{
		if (m_cFontSizes.GetItemData(i) == m_dwFontSize)
		{
			m_cFontSizes.SetCurSel(i);
			foundfont = TRUE;
		}
	}
	if (!foundfont)
	{
		temp.Format(_T("%d"), m_dwFontSize);
		m_cFontSizes.SetWindowText(temp);
	}
	m_cFontNames.Setup(DEVICE_FONTTYPE|RASTER_FONTTYPE|TRUETYPE_FONTTYPE, 1, FIXED_PITCH);
	m_cFontNames.SelectFont(m_sFontName);

	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:heyanshukla,项目名称:TortoiseGit,代码行数:54,代码来源:SetMainPage.cpp

示例6: DialogEnableWindow

void CInputDlg::OnEnChangeLogmessage()
{
	CString sTemp = m_cInput.GetText();
	if ((!m_bUseLogWidth)||((m_pProjectProperties==NULL)||(sTemp.GetLength() >= m_pProjectProperties->nMinLogSize)))
	{
		DialogEnableWindow(IDOK, TRUE);
	}
	else
	{
		DialogEnableWindow(IDOK, FALSE);
	}
}
开发者ID:murank,项目名称:TortoiseGitMod,代码行数:12,代码来源:InputDlg.cpp

示例7: GetDlgItemText

void CLockDlg::OnEnChangeLockmessage()
{
    CString sTemp;
    GetDlgItemText(IDC_LOCKMESSAGE, sTemp);
    if ((m_ProjectProperties == NULL)||((m_ProjectProperties)&&(sTemp.GetLength() >= m_ProjectProperties->nMinLockMsgSize)))
    {
        if (!m_bBlock)
            DialogEnableWindow(IDOK, TRUE);
    }
    else
    {
        DialogEnableWindow(IDOK, FALSE);
    }
}
开发者ID:Kasper8660,项目名称:tortoisesvn,代码行数:14,代码来源:LockDlg.cpp

示例8: InterlockedExchange

UINT CChangedDlg::ChangedStatusThread()
{
	InterlockedExchange(&m_bBlock, TRUE);

	g_Git.RefreshGitIndex();

	m_bCanceled = false;
	SetDlgItemText(IDOK, CString(MAKEINTRESOURCE(IDS_MSGBOX_CANCEL)));
	DialogEnableWindow(IDC_REFRESH, FALSE);
	DialogEnableWindow(IDC_SHOWUNVERSIONED, FALSE);
	DialogEnableWindow(IDC_SHOWUNMODIFIED, FALSE);
	DialogEnableWindow(IDC_SHOWIGNORED, FALSE);
	DialogEnableWindow(IDC_SHOWUSERPROPS, FALSE);
	CString temp;
	m_FileListCtrl.Clear();
	if (!m_FileListCtrl.GetStatus(&m_pathList, m_bRemote, m_bShowIgnored != FALSE, m_bShowUnversioned != FALSE))
	{
		if (!m_FileListCtrl.GetLastErrorMessage().IsEmpty())
			m_FileListCtrl.SetEmptyString(m_FileListCtrl.GetLastErrorMessage());
	}
	unsigned int dwShow = GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALS | GITSLC_SHOWLOCKS | GITSLC_SHOWSWITCHED | GITSLC_SHOWINCHANGELIST;
	dwShow |= m_bShowUnversioned ? GITSLC_SHOWUNVERSIONED : 0;
	dwShow |= m_iShowUnmodified ? GITSLC_SHOWNORMAL : 0;
	dwShow |= m_bShowIgnored ? GITSLC_SHOWIGNORED : 0;
	dwShow |= m_bShowExternals ? GITSLC_SHOWEXTERNAL | GITSLC_SHOWINEXTERNALS | GITSLC_SHOWEXTERNALFROMDIFFERENTREPO : 0;
	m_FileListCtrl.Show(dwShow);
	UpdateStatistics();

	bool bIsDirectory = false;

	CTGitPath commonDir = m_FileListCtrl.GetCommonDirectory(false);
	if (m_pathList.GetCount() == 1)
	{
		if (m_pathList[0].IsEmpty())
			CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, m_sTitle);
		else
			CAppUtils::SetWindowTitle(m_hWnd, (g_Git.m_CurrentDir + _T("\\") + m_pathList[0].GetWinPathString()).TrimRight('\\'), m_sTitle);
		bIsDirectory = m_pathList[0].IsDirectory() || m_pathList[0].IsEmpty(); // if it is empty it is g_Git.m_CurrentDir which is a directory
	}
	else
		CAppUtils::SetWindowTitle(m_hWnd, commonDir.GetWinPathString(), m_sTitle);

	SetDlgItemText(IDOK, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)));
	DialogEnableWindow(IDC_REFRESH, TRUE);
	DialogEnableWindow(IDC_SHOWUNVERSIONED, bIsDirectory);
	//DialogEnableWindow(IDC_SHOWUNMODIFIED, bIsDirectory);
	DialogEnableWindow(IDC_SHOWIGNORED, bIsDirectory);
	DialogEnableWindow(IDC_SHOWUSERPROPS, TRUE);
	InterlockedExchange(&m_bBlock, FALSE);
	// revert the remote flag back to the default
	m_bRemote = !!(DWORD)CRegDWORD(_T("Software\\TortoiseGit\\CheckRepo"), FALSE);
	RefreshCursor();
	return 0;
}
开发者ID:3F,项目名称:tortoisegit-mdc,代码行数:54,代码来源:ChangedDlg.cpp

示例9: ExtendFrameIntoClientArea

BOOL CPromptDlg::OnInitDialog()
{
    CStandAloneDialog::OnInitDialog();

    ExtendFrameIntoClientArea(IDC_PASSEDIT);
    m_aeroControls.SubclassControl(this, IDC_SAVECHECK);
    m_aeroControls.SubclassOkCancel(this);

    BOOL bAllowAuthSave = (BOOL)(DWORD)CRegDWORD(L"Software\\TortoiseSVN\\AllowAuthSave", TRUE);
    DialogEnableWindow(IDC_SAVECHECK, bAllowAuthSave);
    if (bAllowAuthSave)
        CheckDlgButton(IDC_SAVECHECK, SVNConfig::Instance().ConfigGetBool(SVN_CONFIG_SECTION_AUTH, SVN_CONFIG_OPTION_STORE_PASSWORDS, true) ? BST_CHECKED : BST_UNCHECKED);

    if (m_hide)
    {
        m_pass.SetPasswordChar('*');
        GetDlgItem(IDC_SAVECHECK)->ShowWindow(SW_SHOW);
    }
    else
    {
        m_pass.SetPasswordChar('\0');
        GetDlgItem(IDC_SAVECHECK)->ShowWindow(SW_HIDE);
    }

    m_pass.SetFocus();
    if ((m_hParentWnd==NULL)&&(GetExplorerHWND()))
        CenterWindow(CWnd::FromHandle(m_hParentWnd));
    return FALSE;
}
开发者ID:TortoiseGit,项目名称:tortoisesvn,代码行数:29,代码来源:PromptDlg.cpp

示例10: DialogEnableWindow

UINT CRevertDlg::RevertThread()
{
	// get the status of all selected file/folders recursively
	// and show the ones which can be reverted to the user
	// in a list control.
	DialogEnableWindow(IDOK, false);
	m_bCancelled = false;

	m_RevertList.Clear();

	if (!m_RevertList.GetStatus(&m_pathList))
	{
		m_RevertList.SetEmptyString(m_RevertList.GetLastErrorMessage());
	}
	m_RevertList.Show(GITSLC_SHOWVERSIONEDBUTNORMALANDEXTERNALSFROMDIFFERENTREPOS | GITSLC_SHOWDIRECTFILES | GITSLC_SHOWEXTERNALFROMDIFFERENTREPO,
						// do not select all files, only the ones the user has selected directly
						GITSLC_SHOWDIRECTFILES|GITSLC_SHOWADDED);

	if (m_RevertList.HasUnversionedItems())
	{
		if (DWORD(CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE)))
		{
			GetDlgItem(IDC_UNVERSIONEDITEMS)->ShowWindow(SW_SHOW);
		}
		else
			GetDlgItem(IDC_UNVERSIONEDITEMS)->ShowWindow(SW_HIDE);
	}
	else
		GetDlgItem(IDC_UNVERSIONEDITEMS)->ShowWindow(SW_HIDE);

	InterlockedExchange(&m_bThreadRunning, FALSE);
	RefreshCursor();

	return 0;
}
开发者ID:chengn,项目名称:TortoiseGit,代码行数:35,代码来源:RevertDlg.cpp

示例11: ExtendFrameIntoClientArea

BOOL CCheckForUpdatesDlg::OnInitDialog()
{
    CStandAloneDialog::OnInitDialog();
    CAppUtils::MarkWindowAsUnpinnable(m_hWnd);

    ExtendFrameIntoClientArea(0, 0, 0, 0);
    m_aeroControls.SubclassControl(this, IDC_INFO);
    m_aeroControls.SubclassControl(this, IDC_YOURVERSION);
    m_aeroControls.SubclassControl(this, IDC_CURRENTVERSION);
    m_aeroControls.SubclassControl(this, IDC_CHECKRESULT);
    m_aeroControls.SubclassControl(this, IDC_LINK);
    m_aeroControls.SubclassControl(this, IDOK);

    CString temp;
    temp.Format(IDS_CHECKNEWER_YOURVERSION, TSVN_VERMAJOR, TSVN_VERMINOR, TSVN_VERMICRO, TSVN_VERBUILD);
    SetDlgItemText(IDC_YOURVERSION, temp);

    DialogEnableWindow(IDOK, FALSE);

    if (AfxBeginThread(CheckThreadEntry, this)==NULL)
    {
        TaskDialog(this->m_hWnd, AfxGetResourceHandle(), MAKEINTRESOURCE(IDS_APPNAME), MAKEINTRESOURCE(IDS_ERR_ERROROCCURED), MAKEINTRESOURCE(IDS_ERR_THREADSTARTFAILED), TDCBF_OK_BUTTON, TD_ERROR_ICON, NULL);
    }

    SetTimer(100, 1000, NULL);
    return TRUE;
}
开发者ID:fatterbetter,项目名称:ZTools,代码行数:27,代码来源:CheckForUpdatesDlg.cpp

示例12: CString

void CDeleteRemoteTagDlg::Refresh()
{
	m_ctrlTags.DeleteAllItems();
	m_SelectAll.SetCheck(BST_UNCHECKED);
	m_taglist.clear();

	CSysProgressDlg sysProgressDlg;
	sysProgressDlg.SetTitle(CString(MAKEINTRESOURCE(IDS_APPNAME)));
	sysProgressDlg.SetLine(1, CString(MAKEINTRESOURCE(IDS_LOADING)));
	sysProgressDlg.SetLine(2, CString(MAKEINTRESOURCE(IDS_PROGRESSWAIT)));
	sysProgressDlg.SetShowProgressBar(false);
	sysProgressDlg.ShowModal(this, true);
	if (g_Git.GetRemoteTags(m_sRemote, m_taglist))
	{
		sysProgressDlg.Stop();
		MessageBox(g_Git.GetGitLastErr(L"Could not retrieve remote tags.", CGit::GIT_CMD_FETCH), L"TortoiseGit", MB_ICONERROR);
	}
	sysProgressDlg.Stop();
	BringWindowToTop();

	for (int i = 0; i < (int)m_taglist.size(); ++i)
		m_ctrlTags.InsertItem(i, m_taglist[i]);

	DialogEnableWindow(IDOK, FALSE);
}
开发者ID:AJH16,项目名称:TortoiseGit,代码行数:25,代码来源:DeleteRemoteTagDlg.cpp

示例13: AdjustControlSize

BOOL CSubmoduleUpdateDlg::OnInitDialog()
{
	CResizableStandAloneDialog::OnInitDialog();
	CAppUtils::MarkWindowAsUnpinnable(m_hWnd);

	AdjustControlSize(IDC_CHECK_SUBMODULE_INIT);
	AdjustControlSize(IDC_CHECK_SUBMODULE_RECURSIVE);
	AdjustControlSize(IDC_CHECK_SUBMODULE_NOFETCH);
	AdjustControlSize(IDC_CHECK_SUBMODULE_MERGE);
	AdjustControlSize(IDC_CHECK_SUBMODULE_REBASE);

	AddAnchor(IDOK, BOTTOM_RIGHT);
	AddAnchor(IDCANCEL, BOTTOM_RIGHT);
	AddAnchor(IDHELP, BOTTOM_RIGHT);
	AddAnchor((UINT)IDC_STATIC, TOP_LEFT);
	AddAnchor(IDC_LIST_PATH, TOP_LEFT, BOTTOM_RIGHT);
	AddAnchor(IDC_SELECTALL, BOTTOM_LEFT);
	AddAnchor(IDC_WHOLE_PROJECT, BOTTOM_LEFT);
	AddAnchor(IDC_GROUP_INFO, BOTTOM_LEFT, BOTTOM_RIGHT);
	AddAnchor(IDC_CHECK_SUBMODULE_INIT, BOTTOM_LEFT);
	AddAnchor(IDC_CHECK_SUBMODULE_RECURSIVE, BOTTOM_LEFT);
	AddAnchor(IDC_FORCE, BOTTOM_LEFT);
	AddAnchor(IDC_CHECK_SUBMODULE_REMOTE, BOTTOM_LEFT);
	AddAnchor(IDC_CHECK_SUBMODULE_NOFETCH, BOTTOM_RIGHT);
	AddAnchor(IDC_CHECK_SUBMODULE_MERGE, BOTTOM_RIGHT);
	AddAnchor(IDC_CHECK_SUBMODULE_REBASE, BOTTOM_RIGHT);

	CString str(g_Git.m_CurrentDir);
	str.Replace(L':', L'_');
	m_regShowWholeProject = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\ShowWholeProject\\" + str, FALSE);
	m_bWholeProject = m_regShowWholeProject;

	m_regInit = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\init", TRUE);
	m_bInit = m_regInit;
	m_regRecursive = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\recursive", FALSE);
	m_bRecursive = m_regRecursive;
	m_regForce = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\force", FALSE);
	m_bForce = m_regForce;
	m_regRemote = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\remote", FALSE);
	m_bRemote = m_regRemote;
	m_regNoFetch = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\nofetch", FALSE);
	m_bNoFetch = m_regNoFetch;
	m_regMerge = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\merge", FALSE);
	m_bMerge = m_regMerge;
	m_regRebase = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\rebase", FALSE);
	m_bRebase = m_regRebase;

	DialogEnableWindow(IDC_WHOLE_PROJECT, !(m_PathFilterList.empty() || (m_PathFilterList.size() == 1 && m_PathFilterList[0].IsEmpty())));

	SetDlgTitle();

	EnableSaveRestore(L"SubmoduleUpdateDlg");

	Refresh();
	UpdateData(FALSE);

	return TRUE;
}
开发者ID:YueLinHo,项目名称:TortoiseGit,代码行数:58,代码来源:SubmoduleUpdateDlg.cpp

示例14: DialogEnableWindow

void CDeleteRemoteTagDlg::OnSelchangeTags(NMHDR* /*pNMHDR*/, LRESULT* /*pResult*/)
{
	DialogEnableWindow(IDOK, m_ctrlTags.GetSelectedCount() > 0);
	if (m_ctrlTags.GetSelectedCount() == 0)
		m_SelectAll.SetCheck(BST_UNCHECKED);
	else if ((int)m_ctrlTags.GetSelectedCount() < m_ctrlTags.GetItemCount())
		m_SelectAll.SetCheck(BST_INDETERMINATE);
	else
		m_SelectAll.SetCheck(BST_CHECKED);
}
开发者ID:Teivaz,项目名称:TortoiseGit,代码行数:10,代码来源:DeleteRemoteTagDlg.cpp

示例15: RefreshCursor

LRESULT	CGitProgressDlg::OnCmdEnd(WPARAM /*wParam*/, LPARAM /*lParam*/)
{
    RefreshCursor();

    DialogEnableWindow(IDCANCEL, FALSE);
    DialogEnableWindow(IDOK, TRUE);

    m_PostCmdList.clear();
    if (m_ProgList.m_Command->m_PostCmdCallback)
        m_ProgList.m_Command->m_PostCmdCallback(m_ProgList.DidErrorsOccur() ? 1 : 0, m_PostCmdList);

    if (!m_PostCmdList.empty())
    {
        int i = 0;
        for (const auto& entry : m_PostCmdList)
        {
            ++i;
            m_cMenuButton.AddEntry(entry.icon, entry.label);
            TCHAR accellerator = CStringUtils::GetAccellerator(entry.label);
            if (accellerator == L'\0')
                continue;
            ++m_accellerators[accellerator].cnt;
            if (m_accellerators[accellerator].cnt > 1)
                m_accellerators[accellerator].id = -1;
            else
                m_accellerators[accellerator].id = i - 1;
        }

        if (m_accellerators.size())
        {
            LPACCEL lpaccelNew = (LPACCEL)LocalAlloc(LPTR, m_accellerators.size() * sizeof(ACCEL));
            SCOPE_EXIT { LocalFree(lpaccelNew); };
            i = 0;
            for (auto& entry : m_accellerators)
            {
                lpaccelNew[i].cmd = (WORD)(WM_USER + 1 + entry.second.id);
                lpaccelNew[i].fVirt = FVIRTKEY | FALT;
                lpaccelNew[i].key = entry.first;
                entry.second.wmid = lpaccelNew[i].cmd;
                ++i;
            }
            m_hAccel = CreateAcceleratorTable(lpaccelNew, (int)m_accellerators.size());
        }
开发者ID:paulogeneses,项目名称:TortoiseGit,代码行数:43,代码来源:GitProgressDlg.cpp


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