-
April 24th, 2015, 09:40 PM
#1
Junior Member
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?
-
September 3rd, 2015, 05:16 AM
#2
Junior Member
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
-
By jm459 in forum Site Feedback/Questions/Suggestions
Replies: 0
Last Post: March 29th, 2005, 04:06 AM
-
By allenb1963 in forum Site Feedback/Questions/Suggestions
Replies: 1
Last Post: May 19th, 2003, 07:00 PM
-
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
-
Forum Rules
|
|