本文整理汇总了C++中OnApply函数的典型用法代码示例。如果您正苦于以下问题:C++ OnApply函数的具体用法?C++ OnApply怎么用?C++ OnApply使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OnApply函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 ();
}
示例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;
}
示例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;
}
示例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
}
示例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;
}
示例6: OnApply
void PHPProjectSettingsDlg::OnOK(wxCommandEvent& event)
{
if(IsDirty()) {
OnApply(event);
}
EndModal(wxID_OK);
}
示例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;
}
示例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()));
}
示例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;
}
示例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);
}
示例11: OnApply
void
PlayerDlg::ExecFrame()
{
if (Keyboard::KeyDown(VK_RETURN)) {
OnApply(0);
}
}
示例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;
}
}
示例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();
}
示例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;
}
}
示例15: OnApply
//------------------------------------------------------------------------------
// virtual bool PrepareObjectNameChange()
//------------------------------------------------------------------------------
bool GroundTrackPlotPanel::PrepareObjectNameChange()
{
// Save GUI data
wxCommandEvent event;
OnApply(event);
return GmatPanel::PrepareObjectNameChange();
}