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. Text Wrap in Static control

Text Wrap in Static control

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
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.
  • P Offline
    P Offline
    Pushkar Tamboli
    wrote on last edited by
    #1

    Hi All, I am using static control on a dialog box in MFC.The text which is to be shown in the static control is to big to fit in it so its gets crop (half text displayed).Is there any way by which i can acheive text wrapping in the static control? Thanks Pushkar

    A 1 Reply Last reply
    0
    • P Pushkar Tamboli

      Hi All, I am using static control on a dialog box in MFC.The text which is to be shown in the static control is to big to fit in it so its gets crop (half text displayed).Is there any way by which i can acheive text wrapping in the static control? Thanks Pushkar

      A Offline
      A Offline
      A T I F
      wrote on last edited by
      #2

      The text is automatically wrapped in a static control. Increase the rectangle size vertically in the resource editor. You can try to do that at run-time too and for that you will have to increase the static box size w.r.t the number of possible lines.

      P 1 Reply Last reply
      0
      • A A T I F

        The text is automatically wrapped in a static control. Increase the rectangle size vertically in the resource editor. You can try to do that at run-time too and for that you will have to increase the static box size w.r.t the number of possible lines.

        P Offline
        P Offline
        Pushkar Tamboli
        wrote on last edited by
        #3

        Thanks Genius_Logics, I tried the solution given by you but it is not working. I increased the size of static control vertically but still text gets cropped :( Any guess? Thanks Pushkar

        N 1 Reply Last reply
        0
        • P Pushkar Tamboli

          Thanks Genius_Logics, I tried the solution given by you but it is not working. I increased the size of static control vertically but still text gets cropped :( Any guess? Thanks Pushkar

          N Offline
          N Offline
          namaskaaram
          wrote on last edited by
          #4

          well..... :doh:this idea might sound stupid(and there might be a better way to do it,well anyway.....) u c the CStatic control doent seem to have function that could change itz size......BUT it happenz to be derived from the CWnd class(aaaahaa!!!!!).....lol.....so u can try to use the function.....

          mystaticobject.SetWindowPos(.....)

          where mystaticobject is an object of CStatic.....so based on the lenght u can make a code that could keep changing the height of the static window tis just a suggestion.....and hope it will help..... happy programmin..... cheerz..... :-D

          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