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. mfc edit box

mfc edit box

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorialquestion
4 Posts 4 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.
  • S Offline
    S Offline
    swaapu
    wrote on last edited by
    #1

    hi! i am working on an MFC SDI Application. I have an EditBox on a dialog for dispalying path of files. I hav also used a Button for browsing files. My Browse button is working , but, i also want that "the path of the file can be entered directly into the edit box." How to do it? But, I had not used EditBox earlier as i am new to mfc programming. can anybody help me at this issue. Thanx for providing me help

    T P T 3 Replies Last reply
    0
    • S swaapu

      hi! i am working on an MFC SDI Application. I have an EditBox on a dialog for dispalying path of files. I hav also used a Button for browsing files. My Browse button is working , but, i also want that "the path of the file can be entered directly into the edit box." How to do it? But, I had not used EditBox earlier as i am new to mfc programming. can anybody help me at this issue. Thanx for providing me help

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      use CWnd::SetWindowText(CString) for this:

      ((CEdit*)GetDlgItem(IDC_MY_EDIT))->SetWindowText(strFileName);
      ((CEdit*)GetDlgItem(IDC_MY_EDIT))->GetWindowText(strFileName);
      or

      m_MyEdit.SetWindowText(strFileName);
      m_MyEdit.GetWindowText(strFileName);


      TOXCCT >>> GEII power
      [toxcct][VisualCalc]

      1 Reply Last reply
      0
      • S swaapu

        hi! i am working on an MFC SDI Application. I have an EditBox on a dialog for dispalying path of files. I hav also used a Button for browsing files. My Browse button is working , but, i also want that "the path of the file can be entered directly into the edit box." How to do it? But, I had not used EditBox earlier as i am new to mfc programming. can anybody help me at this issue. Thanx for providing me help

        P Offline
        P Offline
        P Rex
        wrote on last edited by
        #3

        CString strPath GetDlgItemText(IDC_EDIT_PATH, strPath); P.

        1 Reply Last reply
        0
        • S swaapu

          hi! i am working on an MFC SDI Application. I have an EditBox on a dialog for dispalying path of files. I hav also used a Button for browsing files. My Browse button is working , but, i also want that "the path of the file can be entered directly into the edit box." How to do it? But, I had not used EditBox earlier as i am new to mfc programming. can anybody help me at this issue. Thanx for providing me help

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          swaapu wrote: But, I had not used EditBox earlier as i am new to mfc programming. can anybody help me at this issue. Thanx for providing me help

          Using ClassWizard(Ctrl + W ) associate a CString Variable with the Edit Box.. When ever you need the value from the Edit Box

          From Edit Box
          UpdateData(TRUE);
          MessageBox( m_strEditBox,"Data in Edit Box");

          TO Edit Box
          m_strEditBox="codeproject";
          UpdateData(FALSE);

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV

          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