Results 1 to 2 of 2

Thread: How to assign a textbox control in cpp?

  1. #1
    Junior Member Xarzu's Avatar
    Join Date
    Jan 2008
    Posts
    15

    How to assign a textbox control in cpp?

    I have a silverlight app that uses TextBox XAML controls.

    In the c++ code-behind, IXRTextBoxPtr types are associated with these textboxes using "FindName" like this:

    FindName(L"ColNum3", &m_pColNum3);

    (where ColNum3 corresponds with the XAML CODE like this: )

    Then, the code assigns the pointer like this:

    std::wstring wsTransfer; // gets the wstring from imput
    const WCHAR * wpszInput;
    wpszInput = wsTransfer.c_str();
    m_pColNum3->SetText(wpszInput);
    but the display does not show the text data.

    What am I missing? What steps am I missing to have this text modification display on the screen?

    If I did not ask this question completely or left something off, please let me know.

    Do I have to some sort of databinding?

  2. #2
    Junior Member
    Join Date
    Sep 2015
    Posts
    2
    I don't see where it gets the text either.

    This code:
    std::wstring wsTransfer; // gets the wstring from imput
    creates a wstring object named wsTransfer using the default constructor of wstring--which does not get text.
    Then I see:
    const WCHAR * wpszInput;
    wpszInput = wsTransfer.c_str();
    This fetches the contents of wsTransfer as a C-style string.

Similar Threads

  1. Can't Assign AP's
    By jm459 in forum Site Feedback/Questions/Suggestions
    Replies: 0
    Last Post: March 29th, 2005, 04:06 AM
  2. cannot assign APs
    By allenb1963 in forum Site Feedback/Questions/Suggestions
    Replies: 1
    Last Post: May 19th, 2003, 07:00 PM
  3. Network control? remote computer control?
    By redhawk14506 in forum Newbie Security Questions
    Replies: 5
    Last Post: April 23rd, 2003, 10:43 PM

Posting Permissions

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