void CMainFrame::OnViewCards() { if (IsReBarSupported()) { m_ShowCards = !m_ShowCards; ShowCards(m_ShowCards); } }
int ResourceEntry( void ) { struct ISAPNPBase* ISAPNPBase; struct RDArgs* rdargs; int rc = -1; struct { ULONG m_ShowConfig; ULONG m_ShowOptions; /* ULONG m_Remove;*/ } args = { FALSE, FALSE/*, FALSE*/ }; if( ! OpenLibs() ) { CloseLibs(); return RETURN_FAIL; } ISAPNPBase = (struct ISAPNPBase* ) OpenResource( ISAPNPNAME ); if( ISAPNPBase == NULL ) { Printf( ISAPNPNAME " not found.\n" ); CloseLibs(); return RETURN_FAIL; } rdargs = ReadArgs( TEMPLATE, (LONG *) &args, NULL ); if( rdargs != NULL ) { if( ! args.m_ShowConfig && args.m_ShowOptions ) { Printf( "SHOWOPTIONS can only be used together with SHOWCONFIG\n" ); rc = RETURN_ERROR; } else { if( args.m_ShowConfig ) { ShowCards( args.m_ShowOptions, ISAPNPBase ); rc = RETURN_OK; } /* if( args.m_Remove ) { // Dangerous! Only for debugging FreeISAPNPBase( ISAPNPBase ); ISAPNPBase->m_ConfigDev->cd_Flags |= CDF_CONFIGME; ISAPNPBase->m_ConfigDev->cd_Driver = NULL; RemResource( ISAPNPBase ); rc = RETURN_OK; }*/ } FreeArgs( rdargs ); } if( rc == -1 ) { Printf( "Usage: ISA-PnP [ SHOWCONFIG [ SHOWOPTIONS ] ] [ REMOVE ]\n" ); rc = RETURN_ERROR; } CloseLibs(); return rc; }
int CMainFrame::OnCreate(LPCREATESTRUCT pcs) { // OnCreate controls the way the frame is created. // Overriding CFrame::Oncreate is optional. // The default for the following variables is TRUE // m_UseIndicatorStatus = FALSE; // Don't show keyboard indicators in the StatusBar // m_UseMenuStatus = FALSE; // Don't show menu descriptions in the StatusBar // m_UseReBar = FALSE; // Don't use a ReBar // m_UseThemes = FALSE; // Don't use themes // m_UseToolBar = FALSE; // Don't use a ToolBar // call the base class function CFrame::OnCreate(pcs); if (IsReBarSupported()) { //Set our theme colors ChooseColor(m_nColor); // Set the band styles and positions for (int i = 0; i < GetReBar()->GetBandCount(); ++i) { if (i < (int)m_vBandStyles.size()) { // Move the band to the correct position int iFrom = GetReBar()->IDToIndex(m_vBandIDs[i]); GetReBar()->MoveBand(iFrom, i); // Set the band's style REBARBANDINFO rbbi; ZeroMemory(&rbbi, sizeof(REBARBANDINFO)); rbbi.fMask = RBBIM_STYLE; rbbi.fStyle = m_vBandStyles[i]; GetReBar()->SetBandInfo(i, rbbi); } if (i < (int)m_vBandSizes.size()) { // Set the band's size REBARBANDINFO rbbi; ZeroMemory(&rbbi, sizeof(REBARBANDINFO)); rbbi.fMask = RBBIM_SIZE; rbbi.cx = m_vBandSizes[i]; GetReBar()->SetBandInfo(i, rbbi); } } // Set the MenuBar's position and gripper int nBand = GetReBar()->GetBand(GetMenuBar()->GetHwnd()); GetReBar()->ShowGripper(nBand, !m_LockMenuBand); if (m_LockMenuBand) GetReBar()->MoveBand(nBand, 0); ShowArrows(m_ShowArrows); ShowCards(m_ShowCards); } else MessageBox(_T("Some Theme features are not supported on this Operating System"), _T("Warning"), MB_ICONWARNING); return 0; }