windows 8 - RichEditBox get and set Text C++ -
how can set , text richeditbox in windows 8 c++ app.
i tried these 2 approaches, program keeps crashing @ runtime
cpp
contenttext->document->selection->gettextviastream(windows::ui::text::textgetoptions::formatrtf, outstream); contenttext->document->gettext(windows::ui::text::textgetoptions::formatrtf, tempoutput);
.h
private: platform::string^* tempoutput; windows::storage::streams::irandomaccessstream^ outstream;
if program crashes, that's thing. doesn't "crash". throws exception , debugger, once attached, catch , tell went wrong. next time, start application f5. once crashes, debugger show line problem in , can watch variables check went wrong.
in case, make sure that
- contenttext not null
- document not null
- tempoutput initialized real object
example:
platform::string^ tempoutput = gcnew platform::string();
Comments
Post a Comment