Here is what I have been able to do so far. This is from reading the XS code, searching the sourceforge newsgroup, and searching the web.. Not much but a start.
#!perl use strict; use Win32::GUI; ################ MAIN WINDOW ############# my $MainWindow = new Win32::GUI::Window( -name => "MainWindow", -text => "Test", -pos => [600,50], -size => [415,320], -noflicker=> 1, ); ########################## my $left=0; my $top=0; my $width=400; my $height=300; #RichEdit References #http://sourceforge.net/mailarchive/message.php?msg_id=245995 (way to + copy, etc) #http://sourceforge.net/mailarchive/message.php?msg_id=245991 (Way to + append) #http://sourceforge.net/mailarchive/message.php?msg_id=245926 (Richedi +t Keypress, enter key, etc) my $RE = $MainWindow->AddRichEdit( -parent => $MainWindow, -name => "RichEditControl", -pos => [$left, $top ], -size => [$width,$height], -multiline => 1, -vscroll=>1, -autovscroll=>1, ); #Set the eventmask so that the _onChange gets called $RE->SendMessage (0x445, 0, 1); #Turn on auto detect url $RE->AutoURLDetect(1); #Set max character length $RE->SetMaxLength(5000); #Set Background Color $RE->SetBkgndColor(0xFFFFFF); #Set Text Mode - This enables cut, copy, paste, undo, select all (No c +ontext menu though) $RE->SetTextMode(1,1); ############################# $MainWindow->Show(); Win32::GUI::Dialog(); ############################## sub MainWindow_Resize{return 0;} sub MainWindow_Minimize {return 0;} sub MainWindow_Maximize {return 0;} sub MainWindow_Terminate {return -1;} sub RichEditControl_Change{ my $text=$MainWindow->RichEditControl->Text(); print "RichEditControl: $text\n"; } sub RichEditControl_KeyPress{ my($key) = @_; if ($key == 13){ print "Enter Key Pressed\n"; } } sub appendToRichEditControl{ my $text=shift || return; $RE->Select (1e9, 1e9); $RE->ReplaceSel ($text); } exit;

In reply to Re^2: Using the Win32::GUI::RichEdit Control? by slloyd
in thread Using the Win32::GUI::RichEdit Control? by slloyd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.