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. How to change caption of Property Page

How to change caption of Property Page

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
5 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.
  • A Offline
    A Offline
    Alois Kraus
    wrote on last edited by
    #1

    Hello, I want to change the caption of my Property Page at runtime. SetWindowText does not the trick. The Caption Text specified in the Dialog editor is always used, no change after a SetWindowText call in OnInitDialog. Any Idea ?

    N A 3 Replies Last reply
    0
    • A Alois Kraus

      Hello, I want to change the caption of my Property Page at runtime. SetWindowText does not the trick. The Caption Text specified in the Dialog editor is always used, no change after a SetWindowText call in OnInitDialog. Any Idea ?

      N Offline
      N Offline
      Navin
      wrote on last edited by
      #2

      Wow - deja vu, I am having the EXACT SAME PROBLEM. Although my scenario is a little different - my property page is in Wizard mode. If you know the new title when the constructor of the property page is called, you can put this in the property page constructor: m_psp.dwFlags |= PSP_USETITLE; m_psp.pszTitle = "Some New Title"; BUT... this will NOT work after the property page has already been created! If anyone knows of a way to change the property page title (especailly in a wizard-mode property page) at run-time (NOT in the constructor) that actually works, I'm all ears. I hate property sheets.. one of these days I'll write my own custom version of them and avoid all the silly restrictions they have. Even a broken clock is right twice a day.

      1 Reply Last reply
      0
      • A Alois Kraus

        Hello, I want to change the caption of my Property Page at runtime. SetWindowText does not the trick. The Caption Text specified in the Dialog editor is always used, no change after a SetWindowText call in OnInitDialog. Any Idea ?

        N Offline
        N Offline
        Navin
        wrote on last edited by
        #3

        Check out this knowledge base item: http://support.microsoft.com/default.aspx?scid=KB;en-us;q141487[^] I was able to use the third method and it works. Woohoo! Even a broken clock is right twice a day.

        A 1 Reply Last reply
        0
        • A Alois Kraus

          Hello, I want to change the caption of my Property Page at runtime. SetWindowText does not the trick. The Caption Text specified in the Dialog editor is always used, no change after a SetWindowText call in OnInitDialog. Any Idea ?

          A Offline
          A Offline
          Andrew Hafen
          wrote on last edited by
          #4

          There is a PROPSHEETPAGE pointed to by the m_psp class member of a property. This contains a field pszTitle which contains the the title of the property page. Yoy will need to set the PSP_USETITLE flag in the dwflags of the property sheet to use this. You might give this a try.

          1 Reply Last reply
          0
          • N Navin

            Check out this knowledge base item: http://support.microsoft.com/default.aspx?scid=KB;en-us;q141487[^] I was able to use the third method and it works. Woohoo! Even a broken clock is right twice a day.

            A Offline
            A Offline
            Alois Kraus
            wrote on last edited by
            #5

            Cool, it works for me too. Thanks

            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