Win32-GUI
view release on metacpan or search on metacpan
RichEdit.xs view on Meta::CPAN
return Textfield_onParseOption (NOTXSCALL option, value, perlcs);
}
void
RichEdit_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) {
if(perlcs->clrForeground != CLR_INVALID) {
CHARFORMAT cf;
ZeroMemory(&cf, sizeof(CHARFORMAT));
cf.cbSize = sizeof(CHARFORMAT);
cf.dwMask = CFM_COLOR;
cf.crTextColor = perlcs->clrForeground;
SendMessage (myhandle, EM_SETCHARFORMAT, (WPARAM)SCF_ALL, (LPARAM)&cf);
perlcs->clrForeground = CLR_INVALID; // Don't Store
}
if(perlcs->clrBackground != CLR_INVALID) {
SendMessage (myhandle, EM_SETBKGNDCOLOR, (WPARAM)0, (LPARAM)(perlcs->clrBackground));
perlcs->clrBackground = CLR_INVALID; // Don't Store
}
}
BOOL
RichEdit_onParseEvent(NOTXSPROC char *name, int* eventID) {
return Textfield_onParseEvent(NOTXSCALL name, eventID);
}
int
RichEdit_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) {
return Textfield_onEvent (NOTXSCALL perlud, uMsg, wParam, lParam);
}
MODULE = Win32::GUI::RichEdit PACKAGE = Win32::GUI::RichEdit
PROTOTYPES: DISABLE
#pragma message( "*** PACKAGE Win32::GUI::RichEdit..." )
#
# See Alias in TextField.xs
#
###########################################################################
# (@)METHOD:AutoURLDetect([FLAG=TRUE])
# Set automatic detection of URLs mode.
LRESULT
AutoURLDetect(handle, flag=TRUE)
HWND handle
BOOL flag
CODE:
RETVAL = SendMessage(handle, EM_AUTOURLDETECT, (WPARAM) flag, 0);
OUTPUT:
RETVAL
###########################################################################
# (@)METHOD:CanPaste([FORMAT=CF_TEXT])
# Determine if RichEdit can paste a specified clipboard format.
LRESULT
CanPaste(handle, value=CF_TEXT)
HWND handle
WPARAM value
CODE:
RETVAL = SendMessage(handle, EM_CANPASTE, value, 0);
OUTPUT:
RETVAL
###########################################################################
# (@)METHOD:CanRedo()
# Determine whether there are any actions in redo queue
LRESULT
CanRedo(handle)
HWND handle
CODE:
RETVAL = SendMessage(handle, EM_CANREDO, 0, 0);
OUTPUT:
RETVAL
###########################################################################
# (@)METHOD:DisplayBand(LEFT, TOP, RIGHT, BOTTOM)
# Displays a portion of a RichEdit's contents, as previously formatted for a device using the EM_FORMATRANGE message.
LRESULT
DisplayBand(handle,left,top,right,bottom)
HWND handle
int left
int top
int right
int bottom
PREINIT:
RECT myRect;
CODE:
myRect.left = left;
myRect.top = top;
myRect.right = right;
myRect.bottom = bottom;
RETVAL = SendMessage(handle, EM_DISPLAYBAND, 0, (LPARAM) &myRect);
OUTPUT:
RETVAL
###########################################################################
# (@)METHOD:GetSel()
# (@)METHOD:Selection()
# Returns a two elements array containing the current selection start
# and end.
void
GetSel(handle)
HWND handle
ALIAS:
Win32::GUI::RichEdit::Selection = 1
PREINIT:
CHARRANGE cr;
PPCODE:
ZeroMemory(&cr, sizeof(CHARRANGE));
SendMessage(handle, EM_EXGETSEL, 0, (LPARAM) (CHARRANGE FAR *) &cr);
EXTEND(SP, 2);
( run in 0.587 second using v1.01-cache-2.11-cpan-81fc1098f69 )