void CMainFrame::OnUpdateTransportPlay(CCmdUI* pCmdUI) { pCmdUI->Enable(IsOpen()); pCmdUI->SetCheck(IsPlaying()); ShowButton(m_TransportBar, ID_TRANSPORT_PLAY, !IsPlaying()); ShowButton(m_TransportBar, ID_TRANSPORT_PAUSE, IsPlaying()); }
int CTransCtrl::DoHitTest( int nShowButton ) { int test = TestDesktop( ); if( test != 0 ) return test; POINT mouse; GetCursorPos( &mouse ); if( SendMessage( m_hDeskListViewWnd, WM_NCHITTEST, 0, MAKELPARAM( mouse.x, mouse.y) ) != HTNOWHERE ) { if( CheckPoint( mouse ) ) { if( !IsWindowVisible( m_hDeskListViewWnd ) ) { if( nShowButton ) { ShowButton( true ); } else ShowWindow( m_hDeskListViewWnd, SW_SHOWNA ); } } else { if( nShowButton ) { ShowButton( false ); } if( IsWindowVisible( m_hDeskListViewWnd ) ) ShowWindow( m_hDeskListViewWnd, SW_HIDE ); } } else{ if( nShowButton ) { ShowButton( false ); } if( IsWindowVisible( m_hDeskListViewWnd ) ) { ShowWindow( m_hDeskListViewWnd, SW_HIDE ); } } return 0; }
void CAclSub::ShowButtonCase(BYTE bSelectButton) { switch(bSelectButton) { case ACL_BUTTON_APP: case ACL_BUTTON_WEB: case ACL_BUTTON_NNB: case ACL_BUTTON_ICMP: case ACL_BUTTON_NET: ShowButton(ACL_BUTTON_SHOW_ALL); break; case ACL_BUTTON_TIME: ShowButton(ACL_BUTTON_SHOW_APPLY_GROUP); break; case ACL_BUTTON_TORJAN: ShowButton(ACL_BUTTON_HIDE_ALL); break; default: break; } }
OP_STATUS OpButtonStrip::SetButtonInfo(int id, OpInputAction* action, const OpStringC& text, BOOL enabled, BOOL visible, const OpStringC8& name) { OP_ASSERT(0 <= id && (unsigned)id < m_buttons.GetCount()); SetButtonAction(id, action); RETURN_IF_ERROR(SetButtonText(id, text)); EnableButton(id, enabled); ShowButton(id, visible); SetButtonName(id, name); return OpStatus::OK; }
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) return -1; if (!m_StatusBar.Create(this) || !m_StatusBar.SetIndicators(indicators, _countof(indicators))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } EnableDocking(CBRS_ALIGN_ANY); m_pFloatingFrameClass = RUNTIME_CLASS(CSCBMiniDockFrameWnd); // custom dock frame if (!CreateToolbars()) { TRACE0("Failed to create tool bar\n"); return -1; // fail to create } ShowButton(m_TransportBar, ID_TRANSPORT_PAUSE, FALSE); // avoids gap after bar if (!CreateDialogBars()) { TRACE0("Failed to create dialog bar\n"); return -1; // fail to create } if (!CreateSizingBars()) { TRACE0("Failed to create sizing control bar\n"); return -1; // fail to create } if (VerifyBarState(REG_SETTINGS)) { for (int iBar = 0; iBar < SIZING_BARS; iBar++) { CSizingControlBarG *pBar = STATIC_DOWNCAST(CSizingControlBarG, GetBarAtOffset(m_SizingBarInfo[iBar].Offset)); pBar->LoadState(REG_SETTINGS); } LoadBarState(REG_SETTINGS); } SetTimer(TIMER_ID, 1000 / TIMER_FREQUENCY, NULL); // start timer DragAcceptFiles(); SetCursorWavePos(_T("")); ApplyOptions(COptionsInfo::m_Defaults); if (m_Options.m_CheckForUpdates) // if automatically checking for updates AfxBeginThread(CheckForUpdatesThreadFunc, this); // launch thread to check AfxBeginThread(IteratePluginsThread, this); return 0; }
void ShowEditorButtons( INT32 iFirstEditorButtonID, INT32 iLastEditorButtonID ) { INT32 i; for( i = iFirstEditorButtonID; i <= iLastEditorButtonID; i++ ) ShowButton( iEditorButton[ i ] ); }
void ShowEditorButton( INT32 iEditorButtonID ) { ShowButton( iEditorButton[ iEditorButtonID ] ); }