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. Hiding text in a CStatic control

Hiding text in a CStatic control

Scheduled Pinned Locked Moved C / C++ / MFC
questiondiscussionworkspace
6 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.
  • W Offline
    W Offline
    work_to_live
    wrote on last edited by
    #1

    It would be nice if I could hide some text in a static control. I experimented a bit, and it looks like anything inserted after a \n is not displayed. I'm wondering if that's a predictable behaviour, or might it be a function of my particular setup. If it's predictable, and safe, I'll go ahead and use it. Any thoughts?

    S D 2 Replies Last reply
    0
    • W work_to_live

      It would be nice if I could hide some text in a static control. I experimented a bit, and it looks like anything inserted after a \n is not displayed. I'm wondering if that's a predictable behaviour, or might it be a function of my particular setup. If it's predictable, and safe, I'll go ahead and use it. Any thoughts?

      S Offline
      S Offline
      Stefan Pedersen
      wrote on last edited by
      #2

      Why not use a hidden static? Though I must say that trying to "hide" something in the GUI sounds like a bad idea... "was wir auch tun, wohin wir gehen die illuminaten sind im system sie kontrollieren überall und 23 ist ihre zahl!" 23, welle: erdball

      1 Reply Last reply
      0
      • W work_to_live

        It would be nice if I could hide some text in a static control. I experimented a bit, and it looks like anything inserted after a \n is not displayed. I'm wondering if that's a predictable behaviour, or might it be a function of my particular setup. If it's predictable, and safe, I'll go ahead and use it. Any thoughts?

        D Offline
        D Offline
        Dave Bryant
        wrote on last edited by
        #3

        It's not really hidden - your static control is probably only high enough to see the first line. Try expanding it, and you'll probably see the rest. Dave

        W 1 Reply Last reply
        0
        • D Dave Bryant

          It's not really hidden - your static control is probably only high enough to see the first line. Try expanding it, and you'll probably see the rest. Dave

          W Offline
          W Offline
          work_to_live
          wrote on last edited by
          #4

          You're right! It's probably reasonably predictable behaviour. Thanks.

          D 1 Reply Last reply
          0
          • W work_to_live

            You're right! It's probably reasonably predictable behaviour. Thanks.

            D Offline
            D Offline
            Dave Bryant
            wrote on last edited by
            #5

            But it's still not really hidden. If the user has Spy (or something similar) installed, they can trivially retrieve the hidden text. The GetWindowText() API will also return the full text in the control, even if called from another process. Dave

            W 1 Reply Last reply
            0
            • D Dave Bryant

              But it's still not really hidden. If the user has Spy (or something similar) installed, they can trivially retrieve the hidden text. The GetWindowText() API will also return the full text in the control, even if called from another process. Dave

              W Offline
              W Offline
              work_to_live
              wrote on last edited by
              #6

              The intent was not to hide it as much as it was to encode some additional information in the text that the user wouldn't want to see. It's a long story... :)

              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