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. Changing Text in Statics and controls at run time ?

Changing Text in Statics and controls at run time ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
2 Posts 2 Posters 2 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
    Ariel
    wrote on last edited by
    #1

    Hi there All, Changing Text in Statics and controls at run time ? Well i'm trying to do something which i'm sure its possible and i dont know how. Actually i want to make a loop (which loop ??)through all the Controls and Windows under an SDI project and change all the labels of the controls\windows (including the static ones). How can this be done, I'll apritiate any help, Ariel.

    C 1 Reply Last reply
    0
    • A Ariel

      Hi there All, Changing Text in Statics and controls at run time ? Well i'm trying to do something which i'm sure its possible and i dont know how. Actually i want to make a loop (which loop ??)through all the Controls and Windows under an SDI project and change all the labels of the controls\windows (including the static ones). How can this be done, I'll apritiate any help, Ariel.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      When you say all the controls, what controls ? An SDI app has toolbar(s), a menu, but do you have controls embedded into your view, or in your toolbars ? Do you want to change YOUR items, or those provided by MFC ? The way to change the text is SetWindowText, the way to get ahold of an item you don't own ( for example if you subclass a common dialog ), is GetDlgItem, but I'm not sure how you would iterate through a dialog in a loop, unless you called GetDlgItem for ALL possible ID's and check for a valid return before calling SetWindowText. Christian The content of this post is not necessarily the opinion of my yadda yadda yadda. To understand recursion, we must first understand recursion.

      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