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. Question...

Question...

Scheduled Pinned Locked Moved C / C++ / MFC
questionios
2 Posts 2 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.
  • N Offline
    N Offline
    NewbieStats
    wrote on last edited by
    #1

    Okay Alok, ive realized maybe itll be easier using the idea you said... But i gotta try what i thought... Dont ask why, its driving me crazy... void CNewAccountDlg::OnOK() { CString strUsername; CString strPassword; CString strTest; GetDlgItemText(IDC_USERNAME,strUsername); GetDlgItemText(IDC_PASSWORD,strPassword); m_USERNAME.SetSel(0,1); m_USERNAME.Copy(); ofstream a_file ( "data/account.dat", ios::ate, ios::app); a_file<< strUsername + " " + strPassword + "\n"; a_file.close(); AfxMessageBox("Account Created."); } Paste is not a member of CString. So how would i paste m_USERNAME to strTest? Or is there a way to just m_USERNAME.SetSel(0,1) and tranfer to char test[02];? /* Just a Human Trying to Live in a Computers World. */

    T 1 Reply Last reply
    0
    • N NewbieStats

      Okay Alok, ive realized maybe itll be easier using the idea you said... But i gotta try what i thought... Dont ask why, its driving me crazy... void CNewAccountDlg::OnOK() { CString strUsername; CString strPassword; CString strTest; GetDlgItemText(IDC_USERNAME,strUsername); GetDlgItemText(IDC_PASSWORD,strPassword); m_USERNAME.SetSel(0,1); m_USERNAME.Copy(); ofstream a_file ( "data/account.dat", ios::ate, ios::app); a_file<< strUsername + " " + strPassword + "\n"; a_file.close(); AfxMessageBox("Account Created."); } Paste is not a member of CString. So how would i paste m_USERNAME to strTest? Or is there a way to just m_USERNAME.SetSel(0,1) and tranfer to char test[02];? /* Just a Human Trying to Live in a Computers World. */

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

      have a look at CWnd::UpdateData()


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

      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