Results 1 to 3 of 3

Thread: String Conversion? Should be simple.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Unhappy String Conversion? Should be simple.

    Hi.

    I'm trying to populate a BSTR variable with a value from an edit control on a form that I have created a variable for (m_Edit). m_Edit is a CString object, but I keep getting a conversion error.

    Does anyone know how to do this?

    Also, a web reference for data type conversations in Visual C++ would be handy also.

    Thanks in advance.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    BSTR str = m_Text.AlllocSysString(); ???
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Thumbs up Thanks CornedBee!

    That's just what I was looking for. Your example did the trick!

    Thanks, again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width