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. a Dialog Bar Question !

a Dialog Bar Question !

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++docker
2 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.
  • R Offline
    R Offline
    Renjith Ramachandran
    wrote on last edited by
    #1

    hi all now i am doing a SDI project, all of the views are CFormview Derived , and switching the formviews according to the menu commands. i want to implement a Dialogbar to my container, in such a way that i can show the status messages on that. i created the dialogbar from a dialog template and attached with the dialogbar object. i need a static control in the dialog bar inorder to show the status in each forms. how can i set the static text in dialogbar ??? like static_Control_variable_in_dialogbar.SetWindowText("test "); Any idea..?? programming in VB is like riding a kiddy bike, while programming in C++ is like driving a Formula 1 racing car

    B 1 Reply Last reply
    0
    • R Renjith Ramachandran

      hi all now i am doing a SDI project, all of the views are CFormview Derived , and switching the formviews according to the menu commands. i want to implement a Dialogbar to my container, in such a way that i can show the status messages on that. i created the dialogbar from a dialog template and attached with the dialogbar object. i need a static control in the dialog bar inorder to show the status in each forms. how can i set the static text in dialogbar ??? like static_Control_variable_in_dialogbar.SetWindowText("test "); Any idea..?? programming in VB is like riding a kiddy bike, while programming in C++ is like driving a Formula 1 racing car

      B Offline
      B Offline
      Bhaskar
      wrote on last edited by
      #2

      Since the dialogbar object is a member of frame class. You need to get the dialog bar object through AfxGetMainWnd. Check this void CTestView::OnBnClickedButton1() { CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd(); if (pFrame) { pFrame->m_wndDialogBar.SetDlgItemText(IDC_MYSTATIC, "Hello"); } } This is a message handler of a form view class The m_wndDialogBar is a public member of CMainFrame class IDC_MYSTATIC is the id of the static control in the dialog bar. You must change the id of a static control from IDC_STATIC to another.

      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