Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Hiding DialogBar of Mainframe [Solved]

Hiding DialogBar of Mainframe [Solved]

Scheduled Pinned Locked Moved C / C++ / MFC
helpdebugging
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anu_Bala
    wrote on last edited by
    #1

    HI, In my application im having one Dialogbar contains Listbox and editbox and i attached this DialogBar to Mainframe. But i want to display this DialogBar only when some childviews are active.Otherwise this DialgoBar should be in hiding.TO get this in OnTImer() of Mainframe class.I did this..

    void CMainFrame::OnTimer(UINT_PTR nIDEvent)
    {
    CMDIFrameWnd *pMainWnd = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd ;
    CMDIChildWnd *fChWnd = (CMDIChildWnd*)pMainWnd->GetActiveFrame();
    CView *pView = (CView*)fChWnd->GetActiveView ();

        if(NULL != pView)
        {
         if(pView->IsKindOf(RUNTIME\_CLASS(CGraphView)))
             m\_RecentAlarms.ShowWindow(SW\_SHOW);
         else
             m\_RecentAlarms.ShowWindow(SW\_HIDE);
        }
        m\_RecentAlarms.Invalidate();
    CMDIFrameWnd::OnTimer(nIDEvent);
    

    }

    m_RecentAlarms is DialogBar. It works for one time only.First when i go to CTuningView(I dont want dialogbar),the dialogbar gets hided.When i go to CGraphView,it shows. But when again go to tuning view its not get hided.When i debug,the cursor goes to OnTimer() and it goes to SW_HIDE also..but even its showing here. Pls help me in this issue.

    Anu

    modified on Friday, August 12, 2011 5:28 AM

    V 1 Reply Last reply
    0
    • A Anu_Bala

      HI, In my application im having one Dialogbar contains Listbox and editbox and i attached this DialogBar to Mainframe. But i want to display this DialogBar only when some childviews are active.Otherwise this DialgoBar should be in hiding.TO get this in OnTImer() of Mainframe class.I did this..

      void CMainFrame::OnTimer(UINT_PTR nIDEvent)
      {
      CMDIFrameWnd *pMainWnd = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd ;
      CMDIChildWnd *fChWnd = (CMDIChildWnd*)pMainWnd->GetActiveFrame();
      CView *pView = (CView*)fChWnd->GetActiveView ();

          if(NULL != pView)
          {
           if(pView->IsKindOf(RUNTIME\_CLASS(CGraphView)))
               m\_RecentAlarms.ShowWindow(SW\_SHOW);
           else
               m\_RecentAlarms.ShowWindow(SW\_HIDE);
          }
          m\_RecentAlarms.Invalidate();
      CMDIFrameWnd::OnTimer(nIDEvent);
      

      }

      m_RecentAlarms is DialogBar. It works for one time only.First when i go to CTuningView(I dont want dialogbar),the dialogbar gets hided.When i go to CGraphView,it shows. But when again go to tuning view its not get hided.When i debug,the cursor goes to OnTimer() and it goes to SW_HIDE also..but even its showing here. Pls help me in this issue.

      Anu

      modified on Friday, August 12, 2011 5:28 AM

      V Offline
      V Offline
      venkatmakam
      wrote on last edited by
      #2

      Try Using ShowcontrolBar to show\hide the controlbar.

      http://www.mono-project.com/Main\_Page

      A 1 Reply Last reply
      0
      • V venkatmakam

        Try Using ShowcontrolBar to show\hide the controlbar.

        http://www.mono-project.com/Main\_Page

        A Offline
        A Offline
        Anu_Bala
        wrote on last edited by
        #3

        It Works. Thank You.

        Anu

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups