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. CToolBar Button Flickers. [modified]

CToolBar Button Flickers. [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
1 Posts 1 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.
  • J Offline
    J Offline
    janaswamy uday
    wrote on last edited by
    #1

    Hi All, I am getting flicker when Disable the CToolBar Buttons when ON_UPDATE_COMMAND_UI message with CmdUI->Enable(FALSE) twice depending on some condition. But everytime I move my mouse the grayed-out button flickers. Un-grayed buttons do not flicker. Any Prolem whith this. Code ------- void CMainFrame::OnUpdateFileDeleteplans(CCmdUI* pCmdUI) { bool bExecuteSQLWin = false; if(bExecuteSQLWin) pCmdUI->Enable(FALSE); else pCmdUI->Enable(); pCmdUI->Enable(CheckOpenPlans()); --> Here i added with a Function CheckOpenPlans().......>==========// } bool CMainFrame::CheckOpenPlans() { CMDIChildWnd* MyWnd = NULL; MyWnd = MDIGetActive(); CView* pView = NULL; if(MyWnd != NULL) { pView = (CView*) MyWnd->GetActiveView(); if((pView->IsKindOf(RUNTIME_CLASS(CSelectQueryView)) || pView->IsKindOf(RUNTIME_CLASS(OpenPlansTreeView)))) { MyWnd = NULL; pView = NULL; return false; } else { MyWnd = NULL; pView = NULL; return true; } } return true; }

    modified on Monday, December 20, 2010 12:29 AM

    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