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. simple multiline edit ctrl

simple multiline edit ctrl

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • J Offline
    J Offline
    Jake Palmer
    wrote on last edited by
    #1

    Here's an easy one that's been bugging me: I've got some edit controls in a dialog, and I checked the multiline box, and I'm hoping that when the user types past the end of a line, it will wrap around, much as it is doing while I type at this precise moment;) Anyway, even if there are some dwStyle flags I could use, how can I set those since Create is never called for dialog controls? thanks, Jake

    M P 2 Replies Last reply
    0
    • J Jake Palmer

      Here's an easy one that's been bugging me: I've got some edit controls in a dialog, and I checked the multiline box, and I'm hoping that when the user types past the end of a line, it will wrap around, much as it is doing while I type at this precise moment;) Anyway, even if there are some dwStyle flags I could use, how can I set those since Create is never called for dialog controls? thanks, Jake

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      You can change control styles in OnInitDialog() - the controls are all created at that point, just not visible yet. --Mike-- http://home.inreach.com/mdunn/ "Make sure that if you are using a blow torch that you don't set anything on fire."   -- Chris Maunder

      J 1 Reply Last reply
      0
      • M Michael Dunn

        You can change control styles in OnInitDialog() - the controls are all created at that point, just not visible yet. --Mike-- http://home.inreach.com/mdunn/ "Make sure that if you are using a blow torch that you don't set anything on fire."   -- Chris Maunder

        J Offline
        J Offline
        Jake Palmer
        wrote on last edited by
        #3

        Right, but how do I change the control styles? CEditCtrl didn't seem to have a SetStyle function, but if it did I would try to add the ES_WANTRETURN style? A little more specific please? X| thanks, Jake

        1 Reply Last reply
        0
        • J Jake Palmer

          Here's an easy one that's been bugging me: I've got some edit controls in a dialog, and I checked the multiline box, and I'm hoping that when the user types past the end of a line, it will wrap around, much as it is doing while I type at this precise moment;) Anyway, even if there are some dwStyle flags I could use, how can I set those since Create is never called for dialog controls? thanks, Jake

          P Offline
          P Offline
          Paolo Messina
          wrote on last edited by
          #4

          Set "Multiline", but remove "Auto HScroll". If you want to change style bits at runtime, add a CEdit variable associated with the edit control to your dialog class, and use ModifyStyle() function. Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

          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