Another round of WinCE questions...

  • Richard Halstead

    I have written a program, and I would like to port it to a Windows CE device.
    First, am I missing something obvious, or is Boost just really obnoxious to convince to compile to Windows CE?

    Second, and arguably more importantly, I used a WidgetRichTextBox in one place for multiple-line text entry.  I see on the wiki that WinCE does not support rich text boxes, so I was wondering what I should use for that sort of purpose.  I tried using WidgetTextBox, but apparently it doesn't actually recognize CR LF as a signal to go to the next line.  Again, am I missing something obvious?  If not, how does one duplicate the behavior regarding lines of a rich text box without using something unsupported?


    • andrew7

      andrew7 - 2009-07-01

      Give   setTextLines( tstring s );        a try before abandoning WidgetTextBox:     

      It eventually does this replacement:

      SmartUtil::tstring AspectText< EventHandlerClass, WidgetType, MessageMapType >::replaceEndlWithLfCr( const SmartUtil::tstring & txt )
          // Replaces \n with \r\n so that Windows textbox understands "endl"
          SmartUtil::tstring    txtEndl= txt;

          std::string::size_type    pos= txtEndl.find( '\n', 0 );
          while ( std::string::npos != pos ) {
              txtEndl.replace( pos, 1, _T("\r\n") );
              pos += 2;    // Don't find the replacement \n.
              pos= txtEndl.find( '\n', pos );
          return txtEndl;

    • Richard Halstead

      I tried using setTextLines, but it seems to display boxes for \r and \n after expanding \n into \r\n instead of actually going to the next line.
      Should this be considered surprising?

    • Richard Halstead

      oh... I should probably add that, when typing in the box, hitting the enter key does nothing.

  • andrew7

    andrew7 - 2009-09-25

    Also you need to setup the textbox this way:

    itsText= createTextBox( textBoxCS );


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks