Author | Message |
---|---|
asmiths
Posts: 12
|
Posted 22:48 Feb 14, 2013 |
Hey people, I've been looking all over for the proper way to deal with changing an Image Source while code is running, and I can't find anything that both makes sense and has the proper header files or namespaces to go with it. Since VC++ is meant to be used with programs that emphasize looks and design, I see no reason that this functionality isn't built in. I've checked the VC++ documentation, stack overflow, and the rest of the internet and have come up empty-handed. Thanks in advance for any help. |
BryanYeh
Posts: 38
|
Posted 08:22 Feb 15, 2013 |
Here is a link to one of the groups in one of our class to their dropbox http://moourl.com/hsgas. Just look in the RandomCard folder and look for MainPage.xaml.cpp to see how it is done. |
asmiths
Posts: 12
|
Posted 10:36 Feb 15, 2013 |
You get a super cookie. |
rpuas
Posts: 29
|
Posted 20:19 Mar 09, 2013 |
Asmiths, I think you did the presentation in class about your Triangle Calculator? I was working on a Quadratic Formula Solver app and have been scratching my head for a day about how to validate the input... i.e. numbers and not letters... remembered your presentation and the "_wtof()" code... that did it!! float a = _wtof(varAInputBox->Text->Data()); kept stumbling on the validation and the code is so much simpler than using the wstringstream convertor. Thanks, saved me a big headache. |
asmiths
Posts: 12
|
Posted 22:47 Mar 09, 2013 |
Glad I could help. A couple notes on wstrings: an 'L' placed just outside the quotes of a string or char will tell the compiler that it is a wstring or wchar_t with which the wstrings are formed.
Using length to make a for loop to traverse a wstring wont work when comparing it unless you use the signed int modifier like so:
It returns the length as an unsigned int for some reason and the compiler can't make a comparison between signed and unsigned ints. Also, for anyone else reading this, turning wstrings back into String^ or textBox text looks like:
and turning textBox input or String^ into a wstring looks like:
Last edited by asmiths at
22:54 Mar 09, 2013.
|