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. Strange edit control problem

Strange edit control problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
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.
  • A Offline
    A Offline
    Alexander M
    wrote on last edited by
    #1

    Hi everyone, I'm creating an edit box as child window of a list view ctrl to edit a subitem's text. When the edit box is created, it is invisible, although it has the WS_VISIBLE style set... I have to press some key to change the text of the edit box to make it visible. What is wrong? Regards, Alex Don't try it, just do it! ;-)

    N 1 Reply Last reply
    0
    • A Alexander M

      Hi everyone, I'm creating an edit box as child window of a list view ctrl to edit a subitem's text. When the edit box is created, it is invisible, although it has the WS_VISIBLE style set... I have to press some key to change the text of the edit box to make it visible. What is wrong? Regards, Alex Don't try it, just do it! ;-)

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

      Add the WS_BORDER style, debug the CreateWindow function, if no error succed, and the problem persist, try using ShowWindow function.

      A 1 Reply Last reply
      0
      • N neliocc

        Add the WS_BORDER style, debug the CreateWindow function, if no error succed, and the problem persist, try using ShowWindow function.

        A Offline
        A Offline
        Alexander M
        wrote on last edited by
        #3

        I did, but that didn't change anything :( CreateWindow does succeed, but the control is still hidden until I press a button to change it's text. Don't try it, just do it! ;-)

        E 1 Reply Last reply
        0
        • A Alexander M

          I did, but that didn't change anything :( CreateWindow does succeed, but the control is still hidden until I press a button to change it's text. Don't try it, just do it! ;-)

          E Offline
          E Offline
          eli15021979
          wrote on last edited by
          #4

          Hi, Try the SetWindowPos() function,and set its position on top of your listbox:

          YourEditBox.SetWindowPos(&CWnd::wndBottom, 0, 0, 0, 0,
          SWP_NOMOVE|SWP_NOSIZE);

          Regards, Eli

          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