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

error

Scheduled Pinned Locked Moved C / C++ / MFC
helpdata-structurestutorialquestion
3 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.
  • K Offline
    K Offline
    keyto
    wrote on last edited by
    #1

    I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?

    H C 2 Replies Last reply
    0
    • K keyto

      I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Why dont use of CString? and you can set Want Return to ture for edit control.

      1 Reply Last reply
      0
      • K keyto

        I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3
        1. See the FAQ[^]. You should also right-click on the control and set the property "Want return" to true (or something like that, don't remember exactly what it was). 2) Why do you pass a pointer to a CSTring object when the function accepts a reference ? The error message is pretty clear. So, just pass the object and get rid of the pointer.

        Cédric Moonen Software developer
        Charting control [v1.2]

        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