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. Property Pages

Property Pages

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestionlearning
4 Posts 3 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.
  • D Offline
    D Offline
    De Nardis Andrea
    wrote on last edited by
    #1

    Hi folks, does anyone know how to change the property page caption inside a Property sheet in MFC? the PropertyPage::SetWindowText does not work, neither changing LPCREATESTRUCT in PropertyPage::OnCreate. This caption is inherited by the property page dialog resource but there should be a way to change it at run-time... Thanx a lot. Regards, andrea

    J G 2 Replies Last reply
    0
    • D De Nardis Andrea

      Hi folks, does anyone know how to change the property page caption inside a Property sheet in MFC? the PropertyPage::SetWindowText does not work, neither changing LPCREATESTRUCT in PropertyPage::OnCreate. This caption is inherited by the property page dialog resource but there should be a way to change it at run-time... Thanx a lot. Regards, andrea

      J Offline
      J Offline
      Joan M
      wrote on last edited by
      #2

      I'm using this before adding the property page to the property sheet...

      MyPP.m_psp.dwFlags |= PSP_USETITLE;
      MyPP.m_psp.pszTitle = "The new title...";

      Hope this helps

      https://www.robotecnik.com freelance robots, PLC and CNC programmer.

      D 1 Reply Last reply
      0
      • D De Nardis Andrea

        Hi folks, does anyone know how to change the property page caption inside a Property sheet in MFC? the PropertyPage::SetWindowText does not work, neither changing LPCREATESTRUCT in PropertyPage::OnCreate. This caption is inherited by the property page dialog resource but there should be a way to change it at run-time... Thanx a lot. Regards, andrea

        G Offline
        G Offline
        G Steudtel
        wrote on last edited by
        #3

        Hi, well in the constructor of your derived CPropertyPage try this code: m_strCaption = m_aToolText.Anzeige(1); m_psp.pszTitle = m_strCaption; m_psp.dwFlags |= PSP_USETITLE; m_strCaption is a CString variable you must provide. The text to dbe displayed comes from elsewhere or you put in directly. m_psp is variable/struct for the proprety sheet, and is already defined in the base class by the MFC. I think you can change m_strCaption afterwards any way you want. But havn't tried this one out. hope this helps G. Steudtel

        1 Reply Last reply
        0
        • J Joan M

          I'm using this before adding the property page to the property sheet...

          MyPP.m_psp.dwFlags |= PSP_USETITLE;
          MyPP.m_psp.pszTitle = "The new title...";

          Hope this helps

          D Offline
          D Offline
          De Nardis Andrea
          wrote on last edited by
          #4

          UAO IT WORKS!!! Thanx a lot Regards andrea:):)

          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