• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OnApply函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: OnApply

// **************************************************************************
// SelectItem ()
//
// Description:
//	Called to select an item.
//
// Parameters:
//  int			nIndex		Index of item to select.
//
// Returns:
//  void
// **************************************************************************
void CKItemPropertiesDlg::SelectItem (int nIndex)
	{
	// Apply changes to currently selected item:
	OnApply ();

	// Select the new item:
	CKItem *pItem = NULL;

	m_nSelIndex = nIndex;
	ASSERT (m_nSelIndex <= m_cnItems);

	// Item list object array gives us a pointer to the CKItem object 
	// assocated with the selection:
	pItem = (CKItem *) m_pItemList->GetAt (m_nSelIndex);
	ASSERT (pItem != NULL);

	// Update the member variables associated with controls:
	m_strAccessPath = pItem->GetAccessPath ();
	m_bActive = pItem->IsActive ();
	m_vtDataType = pItem->GetDataType ();
	m_strItemID = pItem->GetItemID ();

	// Update control status:
	UpdateStatus ();
	}
开发者ID:wfmdyh,项目名称:wecan,代码行数:37,代码来源:itempropertiesdlg.cpp


示例2: UpdateData

LRESULT COptionsSystem::OnQuerySiblings(WPARAM wParam, LPARAM )
{
  UpdateData(TRUE);

  // Have any of my fields been changed?
  switch (wParam) {
    case PP_DATA_CHANGED:
      if (M_UseSystemTray()     != m_UseSystemTray     ||
          M_HideSystemTray()    != m_HideSystemTray    ||
          (m_UseSystemTray      == TRUE &&
           M_MaxREItems()       != m_MaxREItems)       ||
          M_Startup()           != m_Startup           ||
          M_MaxMRUItems()       != m_MaxMRUItems       ||
          M_MRUOnFileMenu()     != m_MRUOnFileMenu     ||
          M_DefaultOpenRO()     != m_DefaultOpenRO     ||
          M_MultipleInstances() != m_MultipleInstances ||
          m_saveDeleteRegistry  != m_DeleteRegistry    ||
          m_saveMigrate2Appdata != m_Migrate2Appdata)
        return 1L;
      break;
    case PP_UPDATE_VARIABLES:
      // Since OnOK calls OnApply after we need to verify and/or
      // copy data into the entry - we do it ourselfs here first
      if (OnApply() == FALSE)
        return 1L;
  }
  return 0L;
}
开发者ID:wcremeika,项目名称:thesis,代码行数:28,代码来源:OptionsSystem.cpp


示例3: PropPageDlgProc

BOOL CALLBACK PropPageDlgProc ( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
BOOL bRet = FALSE;

    switch ( uMsg )
        {
        case WM_INITDIALOG:
            bRet = OnInitDialog ( hwnd, lParam );
        break;

        case WM_NOTIFY:
            {
            NMHDR* phdr = (NMHDR*) lParam;

            switch ( phdr->code )
                {
                case PSN_APPLY:
                    bRet = OnApply ( hwnd, (PSHNOTIFY*) phdr );
                break;

                case DTN_DATETIMECHANGE:
                    // If the user changes any of the DTP controls, enable
                    // the Apply button.

                    SendMessage ( GetParent(hwnd), PSM_CHANGED, (WPARAM) hwnd, 0 );
                break;
                }
            }
        break;
        }

    return bRet;
}
开发者ID:KnowNo,项目名称:test-code-backup,代码行数:33,代码来源:FileTimeShlExt.cpp


示例4: switch

/**
 * フレームワークは、イベントがコントロールに発生する場合や、コントロールが一部の種類の情報を要求するコントロールを親ウィンドウに通知するために、このメンバー関数を呼び出します
 * @param[in] wParam メッセージがコントロールからそのメッセージを送信するコントロールを識別します
 * @param[in] lParam 通知コードと追加情報を含む通知メッセージ (NMHDR) の構造体へのポインター
 * @param[out] pResult メッセージが処理されたとき結果を格納するコードする LRESULT の変数へのポインター
 * @retval TRUE メッセージを処理した
 * @retval FALSE メッセージを処理しなかった
 */
BOOL CPropPageProc::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
	NMHDR* pNMHDR = reinterpret_cast<NMHDR*>(lParam);

	// allow message map to override
	if (CDlgProc::OnNotify(wParam, lParam, pResult))
	{
		return TRUE;
	}

	// don't handle messages not from the page/sheet itself
	if (pNMHDR->hwndFrom != m_hWnd && pNMHDR->hwndFrom != ::GetParent(m_hWnd))
	{
		return FALSE;
	}

	// handle default
	switch (pNMHDR->code)
	{
		case PSN_APPLY:
			*pResult = OnApply() ? PSNRET_NOERROR : PSNRET_INVALID_NOCHANGEPAGE;
			break;

		case PSN_RESET:
			OnReset();
			break;

		default:
			return FALSE;   // not handled
	}

	return TRUE;    // handled
}
开发者ID:MaddTheSane,项目名称:np2,代码行数:41,代码来源:PropProc.cpp


示例5: UpdateData

LRESULT COptionsBackup::OnQuerySiblings(WPARAM wParam, LPARAM )
{
  UpdateData(TRUE);

  // Have any of my fields been changed?
  switch (wParam) {
    case PP_DATA_CHANGED:
      if (M_UserBackupPrefix()        != m_UserBackupPrefix        ||
          M_UserBackupOtherLocation() != m_UserBackupOtherLocation ||
          M_SaveImmediately()         != m_SaveImmediately         ||
          M_BackupBeforeSave()        != m_BackupBeforeSave        ||
          M_BackupPrefix()            != m_BackupPrefix            ||
          M_BackupSuffix()            != m_BackupSuffix            ||
          M_BackupLocation()          != m_BackupLocation          ||
          M_MaxNumIncBackups()        != m_MaxNumIncBackups)
        return 1L;
      break;
    case PP_UPDATE_VARIABLES:
      // Since OnOK calls OnApply after we need to verify and/or
      // copy data into the entry - we do it ourselfs here first
      if (OnApply() == FALSE)
        return 1L;
  }
  return 0L;
}
开发者ID:NonPlayerCharactor,项目名称:PasswordSafeFork,代码行数:25,代码来源:OptionsBackup.cpp


示例6: OnApply

void PHPProjectSettingsDlg::OnOK(wxCommandEvent& event)
{
    if(IsDirty()) {
        OnApply(event);
    }
    EndModal(wxID_OK);
}
开发者ID:anatooly,项目名称:codelite,代码行数:7,代码来源:php_project_settings_dlg.cpp


示例7: UpdateData

LRESULT COptionsDisplay::OnQuerySiblings(WPARAM wParam, LPARAM )
{
  UpdateData(TRUE);
  // Have any of my fields been changed?
  switch (wParam) {
    case PP_DATA_CHANGED:
      if (M_AlwaysOnTop()             != m_AlwaysOnTop             ||
          M_ShowUsernameInTree()      != m_ShowUsernameInTree      ||
          M_ShowPasswordInTree()      != m_ShowPasswordInTree      ||
          M_ShowNotesAsTipsInViews()  != m_ShowNotesAsTipsInViews  ||
          M_ExplorerTypeTree()        != m_ExplorerTypeTree        ||
          M_EnableGrid()              != m_EnableGrid              ||
          M_ShowPasswordInEdit()      != m_ShowPasswordInEdit      ||
          M_NotesShowInEdit()         != m_ShowNotesInEdit         ||
          M_WordWrapNotes()           != m_WordWrapNotes           ||
          M_PreExpiryWarn()           != m_PreExpiryWarn           ||
          (m_PreExpiryWarn            == TRUE &&
           M_PreExpiryWarnDays()      != m_PreExpiryWarnDays)      ||
          M_TreeDisplayStatusAtOpen() != m_TreeDisplayStatusAtOpen ||
          M_TrayIconColour()          != m_TrayIconColour          ||
          M_HighlightChanges()        != m_HighlightChanges)
        return 1L;
      break;
    case PP_UPDATE_VARIABLES:
      // Since OnOK calls OnApply after we need to verify and/or
      // copy data into the entry - we do it ourselves here first
      if (OnApply() == FALSE)
        return 1L;
  }
  return 0L;
}
开发者ID:anagram,项目名称:pwsafe,代码行数:31,代码来源:OptionsDisplay.cpp


示例8: setWindowTitle

GL3DScales::GL3DScales(QWidget *parent)
{
	setWindowTitle(tr("3D Scales Settings"));

	SetupLayout();

	SetControls();

	connect(ApplyButton, SIGNAL(clicked()),this, SLOT(OnApply()));

	connect(m_pctrlAutoCpScale, SIGNAL(clicked()), this, SLOT(OnCpScale()));
	connect(m_pctrlLegendMin, SIGNAL(editingFinished()), this, SLOT(OnCpScale()));
	connect(m_pctrlLegendMax, SIGNAL(editingFinished()), this, SLOT(OnCpScale()));

	connect(m_pctrlLiftScaleSlider, SIGNAL(sliderMoved(int)), this, SLOT(OnLiftScale(int)));
	connect(m_pctrlDragScaleSlider, SIGNAL(sliderMoved(int)), this, SLOT(OnDragScale(int)));
	connect(m_pctrlVelocityScaleSlider, SIGNAL(sliderMoved(int)), this, SLOT(OnVelocityScale(int)));
	connect(m_pctrlVelocityScaleSlider, SIGNAL(sliderReleased()), this, SLOT(OnVelocitySet()));

	connect(m_pctrlLE,   SIGNAL(clicked()), this, SLOT(OnStreamParams()));
	connect(m_pctrlTE,   SIGNAL(clicked()), this, SLOT(OnStreamParams()));
	connect(m_pctrlYLine, SIGNAL(clicked()), this, SLOT(OnStreamParams()));
	connect(m_pctrlZLine, SIGNAL(clicked()), this, SLOT(OnStreamParams()));
	connect(m_pctrlXOffset, SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
	connect(m_pctrlYOffset, SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
	connect(m_pctrlZOffset, SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
	connect(m_pctrlNXPoint, SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
	connect(m_pctrlDeltaL,  SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
	connect(m_pctrlXFactor, SIGNAL(editingFinished()), this, SLOT(OnStreamParams()));
}
开发者ID:kolzar,项目名称:sail7,代码行数:30,代码来源:GL3DScales.cpp


示例9: UpdateData

LRESULT COptionsSecurity::OnQuerySiblings(WPARAM wParam, LPARAM lParam)
{
  UpdateData(TRUE);

  // Misc has asked for ClearClipboardOnMinimize value
  switch (wParam) {
    case PPOPT_GET_CCOM:
    {
      BOOL *pCCOM = (BOOL *)lParam;
      ASSERT(pCCOM != NULL);
      *pCCOM = (BOOL)m_ClearClipboardOnMinimize;
      return 1L;
    }
    case PP_DATA_CHANGED:
      if (M_ClearClipboardOnMinimize() != m_ClearClipboardOnMinimize ||
          M_ClearClipboardOnExit()     != m_ClearClipboardOnExit     ||
          M_LockOnMinimize()           != m_LockOnMinimize           ||
          M_ConfirmCopy()              != m_ConfirmCopy              ||
          M_LockOnWindowLock()         != m_LockOnWindowLock         ||
          M_LockOnIdleTimeout()        != m_LockOnIdleTimeout        ||
          M_CopyPswdBrowseURL()        != m_CopyPswdBrowseURL        ||
          (m_LockOnIdleTimeout         == TRUE &&
           M_IdleTimeOut()             != m_IdleTimeOut))
        return 1L;
      break;
    case PP_UPDATE_VARIABLES:
      // Since OnOK calls OnApply after we need to verify and/or
      // copy data into the entry - we do it ourselves here first
      if (OnApply() == FALSE)
        return 1L;
    default:
      break;
  }
  return 0L;
}
开发者ID:anagram,项目名称:pwsafe,代码行数:35,代码来源:OptionsSecurity.cpp


示例10: OnApply

void CSettingGitRemote::OnLbnSelchangeListRemote()
{
    CWaitCursor wait;

    if(m_ChangedMask)
    {
        if(CMessageBox::Show(NULL, IDS_PROC_GITCONFIG_SAVEREMOTE, IDS_APPNAME, 1, IDI_QUESTION, IDS_SAVEBUTTON, IDS_DISCARDBUTTON) == 1)
            OnApply();
    }
    SetModified(FALSE);

    CString cmd,output;
    int index;
    index = this->m_ctrlRemoteList.GetCurSel();
    if(index<0)
    {
        m_strUrl.Empty();
        m_strRemote.Empty();
        m_strPuttyKeyfile.Empty();
        this->UpdateData(FALSE);
        return;
    }
    CString remote;
    m_ctrlRemoteList.GetText(index,remote);
    this->m_strRemote=remote;

    cmd.Format(_T("remote.%s.url"),remote);
    m_strUrl.Empty();
    m_strUrl = g_Git.GetConfigValue(cmd);

    cmd.Format(_T("remote.%s.puttykeyfile"),remote);

    this->m_strPuttyKeyfile = g_Git.GetConfigValue(cmd);

    m_ChangedMask=0;


    cmd.Format(_T("remote.%s.tagopt"), remote);
    CString tagopt = g_Git.GetConfigValue(cmd);
    index = 0;
    if (tagopt == "--no-tags")
        index = 1;
    else if (tagopt == "--tags")
        index = 2;
    m_ctrlTagOpt.SetCurSel(index);

    CString pushDefault = g_Git.GetConfigValue(_T("remote.pushdefault"));
    m_bPushDefault = pushDefault == remote ? TRUE : FALSE;
    cmd.Format(_T("remote.%s.prune"), remote);
    CString prune = g_Git.GetConfigValue(cmd);
    m_bPrune = prune == _T("true") ? TRUE : prune == _T("false") ? FALSE : 2;
    CString pruneAll = g_Git.GetConfigValue(_T("fetch.prune"));
    m_bPruneAll = pruneAll == _T("true") ? TRUE : FALSE;

    GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(TRUE);
    GetDlgItem(IDC_BUTTON_REMOVE)->EnableWindow(TRUE);
    GetDlgItem(IDC_BUTTON_RENAME_REMOTE)->EnableWindow(TRUE);
    this->UpdateData(FALSE);

}
开发者ID:KindDragon,项目名称:TortoiseGit,代码行数:60,代码来源:SettingGitRemote.cpp


示例11: OnApply

void
PlayerDlg::ExecFrame()
{
	if (Keyboard::KeyDown(VK_RETURN)) {
		OnApply(0);
	}
}
开发者ID:The-E,项目名称:Starshatter-Experimental,代码行数:7,代码来源:PlayerDlg.cpp


示例12: switch

void TwoDPanelDlg::keyPressEvent(QKeyEvent *event)
{
	// Prevent Return Key from closing App
	switch (event->key())
	{
		case Qt::Key_Escape:
		{
			done(0);
			return;
		}
		case Qt::Key_Return:
		case Qt::Key_Enter:
		{
			if(!OKButton->hasFocus() && !CancelButton->hasFocus())
			{
				OnApply();
				OKButton->setFocus();
				m_bApplied  = true;
			}
			else
			{
				event->ignore();
			}
			break;
		}
		default:
			event->ignore();
			break;
	}
}
开发者ID:subprotocol,项目名称:xflr5,代码行数:30,代码来源:TwoDPanelDlg.cpp


示例13: InsureApplyAndInitializeEncConverter

IEncConverter*  CAutoConfigDlg::InsureApplyAndInitializeEncConverter()
{
	// in case it wasn't done, update the variables now (i.e. do "OnApply")
	if( IsModified() && !OnApply() )
		return NULL;

	return InitializeEncConverter();
}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:8,代码来源:AutoConfigDlg.cpp


示例14: OnApply

void
CmdMsgDlg::ExecFrame()
{
    if (Keyboard::KeyDown(VK_RETURN)) {
        OnApply(0);
    }

    if (Keyboard::KeyDown(VK_ESCAPE)) {
        if (!exit_latch)
        OnApply(0);

        exit_latch = true;
    }
    else {
        exit_latch = false;
    }
}
开发者ID:Banbury,项目名称:starshatter-open,代码行数:17,代码来源:CmdMsgDlg.cpp


示例15: OnApply

//------------------------------------------------------------------------------
// virtual bool PrepareObjectNameChange()
//------------------------------------------------------------------------------
bool GroundTrackPlotPanel::PrepareObjectNameChange()
{
   // Save GUI data
   wxCommandEvent event;
   OnApply(event);
   
   return GmatPanel::PrepareObjectNameChange();
}
开发者ID:rockstorm101,项目名称:GMAT,代码行数:11,代码来源:GroundTrackPlotPanel.cpp


示例16: GetDlgItem

	UINT_PTR FontDialog::CFHookProc(HWND hdlg,UINT uiMsg,WPARAM wParam,LPARAM lParam)
	{
		if((uiMsg==WM_COMMAND)&&(HIWORD(wParam)==BN_CLICKED)&&(LOWORD(wParam)==0x402))//点关闭按钮也会触发取消BTN按下的消息.
		{
			wchar_t name[32],shap[4],size[4];
			HWND h = GetDlgItem(hdlg,0x470);
			::GetWindowText(h,name,32);
			WcsCopy(LogFont->lfFaceName,name,32);

			h = GetDlgItem(hdlg,0x471);
			::GetWindowText(h,shap,4);
			if(WcsEqual(shap,L"斜体"))LogFont->lfItalic = 1,LogFont->lfWeight = 400;
			else if(WcsEqual(shap,L"粗体"))LogFont->lfItalic = 0,LogFont->lfWeight = 900;
			else if(WcsEqual(shap,L"粗斜体"))LogFont->lfItalic = 1,LogFont->lfWeight = 900;
			else LogFont->lfItalic = 0,LogFont->lfWeight = 0;

			h = GetDlgItem(hdlg,0x472);
			::GetWindowText(h,size,4);
			if(WcsEqual(size,L"初号")) LogFont->lfHeight = -56;
			else if(WcsEqual(size,L"小初")) LogFont->lfHeight = -48; 
			else if(WcsEqual(size,L"一号")) LogFont->lfHeight = -35; 
			else if(WcsEqual(size,L"小一")) LogFont->lfHeight = -32; 
			else if(WcsEqual(size,L"二号")) LogFont->lfHeight = -29; 
			else if(WcsEqual(size,L"小二")) LogFont->lfHeight = -24; 
			else if(WcsEqual(size,L"三号")) LogFont->lfHeight = -21; 
			else if(WcsEqual(size,L"小三")) LogFont->lfHeight = -20; 
			else if(WcsEqual(size,L"四号")) LogFont->lfHeight = -19; 
			else if(WcsEqual(size,L"小四")) LogFont->lfHeight = -16; 
			else if(WcsEqual(size,L"五号")) LogFont->lfHeight = -14; 
			else if(WcsEqual(size,L"小五")) LogFont->lfHeight = -12; 
			else if(WcsEqual(size,L"六号")) LogFont->lfHeight = -10; 
			else if(WcsEqual(size,L"小六")) LogFont->lfHeight = -9; 
			else if(WcsEqual(size,L"七号")) LogFont->lfHeight = -7; 
			else if(WcsEqual(size,L"八号")) LogFont->lfHeight = -7; 
			else{
				String str(size);
				LogFont->lfHeight = str.ToInt32(10);
			}
			if(LogFont->lfHeight==0) LogFont->lfHeight = 9;

			h = GetDlgItem(hdlg,0x411);
			if(BST_CHECKED==SendMessage(h,BM_GETCHECK,0,0)) LogFont->lfUnderline = 1;
			else LogFont->lfUnderline = 0;

			h = GetDlgItem(hdlg,0x410);
			if(BST_CHECKED==SendMessage(h,BM_GETCHECK,0,0)) LogFont->lfStrikeOut = 1;
			else LogFont->lfStrikeOut = 0;

			LogFont->lfCharSet = DEFAULT_CHARSET;

			OnApply(LogFont.Handle(),this);
			return 1;
		}else if(uiMsg==WM_INITDIALOG){
			HWND h = GetDlgItem(hdlg,0x470);
			::SetWindowText(h,LogFont->lfFaceName);
		}
		return 0;
	}
开发者ID:Redi0,项目名称:jucpp,代码行数:58,代码来源:comdlg.cpp


示例17: SendPSChanged

static inline void SendPSChanged(HWND hDlg){
	if(m_transition==-1) return;
	g_bApplyClock = 1;
	g_bApplyTaskbar = 1;
	SendMessage(GetParent(hDlg), PSM_CHANGED, (WPARAM)(hDlg), 0);
	
	OnApply(hDlg,1);
	SendMessage(g_hwndClock, CLOCKM_REFRESHCLOCKPREVIEW, 0, 0);
}
开发者ID:heicks,项目名称:T-Clock,代码行数:9,代码来源:pagecolor.c


示例18: OnApply

// virtual 
void UC_RenderLightDlg::OnOK()
{
	// Apply the setting
	OnApply();

	ASSERT(m_pCmd);
	// UC_RenderLightCmd::OnTerminate will destroy the window
	m_pCmd->OnTerminate();
}
开发者ID:KnowNo,项目名称:backup,代码行数:10,代码来源:UC_RenderLightDlg.cpp


示例19: OnApply

BOOL CPPageAccelTbl::PreTranslateMessage(MSG* pMsg)
{
	if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN
			&& (pMsg->hwnd == m_WinLircEdit.m_hWnd || pMsg->hwnd == m_UIceEdit.m_hWnd)) {
		OnApply();
		return TRUE;
	}

	return __super::PreTranslateMessage(pMsg);
}
开发者ID:WinnerSoftLab,项目名称:WinnerMediaPlayer,代码行数:10,代码来源:PPageAccelTbl.cpp


示例20: OnApply

void CNetDragonDlg::OnFileClose()
{
	if(GetDlgItem(IDC_APPLY)->IsWindowEnabled())
	{
		if(AfxMessageBox("要保存所做的修改吗?", MB_YESNO) == IDYES)
		{
			OnApply();
		}
	}
	Shell_NotifyIcon(NIM_DELETE,&nid);	//在托盘区删除图标
	exit(0);
}
开发者ID:HACKPRO,项目名称:NetDragon,代码行数:12,代码来源:Net+DragonDlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OnCancel函数代码示例发布时间:2022-05-30
下一篇:
C++ OnApplicationLook函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap