mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-03 01:12:51 +00:00
- Added debugging.
- Transfer all relevant messages to the underlying edit control.
This commit is contained in:
parent
4a29e1f11a
commit
700f5abe4c
|
@ -15,6 +15,9 @@
|
||||||
#include "charlist.h"
|
#include "charlist.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
|
#include "debugtools.h"
|
||||||
|
|
||||||
|
DEFAULT_DEBUG_CHANNEL(richedit);
|
||||||
|
|
||||||
extern HANDLE RICHED32_hHeap;
|
extern HANDLE RICHED32_hHeap;
|
||||||
|
|
||||||
|
@ -23,6 +26,8 @@ void CHARLIST_Enqueue( CHARLIST* pCharList, char myChar )
|
||||||
CHARLISTENTRY* pNewEntry = HeapAlloc(RICHED32_hHeap, 0,sizeof(CHARLISTENTRY));
|
CHARLISTENTRY* pNewEntry = HeapAlloc(RICHED32_hHeap, 0,sizeof(CHARLISTENTRY));
|
||||||
pNewEntry->pNext = NULL;
|
pNewEntry->pNext = NULL;
|
||||||
pNewEntry->myChar = myChar;
|
pNewEntry->myChar = myChar;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if(pCharList->pTail == NULL)
|
if(pCharList->pTail == NULL)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +46,8 @@ void CHARLIST_Push( CHARLIST* pCharList, char myChar)
|
||||||
{
|
{
|
||||||
CHARLISTENTRY* pNewEntry = malloc(sizeof(CHARLISTENTRY));
|
CHARLISTENTRY* pNewEntry = malloc(sizeof(CHARLISTENTRY));
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
pNewEntry->myChar = myChar;
|
pNewEntry->myChar = myChar;
|
||||||
|
|
||||||
if(pCharList->pHead == NULL)
|
if(pCharList->pHead == NULL)
|
||||||
|
@ -63,6 +70,8 @@ char CHARLIST_Dequeue(CHARLIST* pCharList)
|
||||||
CHARLISTENTRY* pCurrent;
|
CHARLISTENTRY* pCurrent;
|
||||||
char myChar;
|
char myChar;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if(pCharList->nCount == 0)
|
if(pCharList->nCount == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -85,10 +94,14 @@ char CHARLIST_Dequeue(CHARLIST* pCharList)
|
||||||
|
|
||||||
int CHARLIST_GetNbItems(CHARLIST* pCharList)
|
int CHARLIST_GetNbItems(CHARLIST* pCharList)
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
return pCharList->nCount;
|
return pCharList->nCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHARLIST_FreeList(CHARLIST* pCharList){
|
void CHARLIST_FreeList(CHARLIST* pCharList){
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
while(pCharList->nCount)
|
while(pCharList->nCount)
|
||||||
CHARLIST_Dequeue(pCharList);
|
CHARLIST_Dequeue(pCharList);
|
||||||
}
|
}
|
||||||
|
@ -98,6 +111,8 @@ int CHARLIST_CountChar(CHARLIST* pCharList, char myChar)
|
||||||
{
|
{
|
||||||
CHARLISTENTRY *pCurrent;
|
CHARLISTENTRY *pCurrent;
|
||||||
int nCount = 0;
|
int nCount = 0;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for(pCurrent =pCharList->pHead ;pCurrent;pCurrent=pCurrent->pNext)
|
for(pCurrent =pCharList->pHead ;pCurrent;pCurrent=pCurrent->pNext)
|
||||||
if(pCurrent->myChar == myChar)
|
if(pCurrent->myChar == myChar)
|
||||||
|
@ -109,6 +124,8 @@ int CHARLIST_CountChar(CHARLIST* pCharList, char myChar)
|
||||||
int CHARLIST_toBuffer(CHARLIST* pCharList, char* pBuffer, int nBufferSize)
|
int CHARLIST_toBuffer(CHARLIST* pCharList, char* pBuffer, int nBufferSize)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
/* we add one to store a NULL caracter */
|
/* we add one to store a NULL caracter */
|
||||||
if(nBufferSize < pCharList->nCount + 1)
|
if(nBufferSize < pCharList->nCount + 1)
|
||||||
return pCharList->nCount;
|
return pCharList->nCount;
|
||||||
|
|
|
@ -78,6 +78,8 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
|
||||||
|
DEFAULT_DEBUG_CHANNEL(richedit);
|
||||||
|
|
||||||
extern HANDLE RICHED32_hHeap;
|
extern HANDLE RICHED32_hHeap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -211,6 +213,9 @@ int
|
||||||
_RTFGetChar()
|
_RTFGetChar()
|
||||||
{
|
{
|
||||||
char myChar;
|
char myChar;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if(CHARLIST_GetNbItems(&inputCharList) == 0)
|
if(CHARLIST_GetNbItems(&inputCharList) == 0)
|
||||||
{
|
{
|
||||||
char buff[10];
|
char buff[10];
|
||||||
|
@ -228,6 +233,8 @@ _RTFGetChar()
|
||||||
void
|
void
|
||||||
RTFSetEditStream(EDITSTREAM *es)
|
RTFSetEditStream(EDITSTREAM *es)
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
editstream.dwCookie = es->dwCookie;
|
editstream.dwCookie = es->dwCookie;
|
||||||
editstream.dwError = es->dwError;
|
editstream.dwError = es->dwError;
|
||||||
editstream.pfnCallback = es->pfnCallback;
|
editstream.pfnCallback = es->pfnCallback;
|
||||||
|
@ -248,6 +255,8 @@ RTFFont *fp;
|
||||||
RTFStyle *sp;
|
RTFStyle *sp;
|
||||||
RTFStyleElt *eltList, *ep;
|
RTFStyleElt *eltList, *ep;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (rtfTextBuf == (char *) NULL) /* initialize the text buffers */
|
if (rtfTextBuf == (char *) NULL) /* initialize the text buffers */
|
||||||
{
|
{
|
||||||
rtfTextBuf = RTFAlloc (rtfBufSiz);
|
rtfTextBuf = RTFAlloc (rtfBufSiz);
|
||||||
|
@ -334,6 +343,8 @@ void
|
||||||
RTFSetInputName (name)
|
RTFSetInputName (name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if ((inputName = RTFStrSave (name)) == (char *) NULL)
|
if ((inputName = RTFStrSave (name)) == (char *) NULL)
|
||||||
RTFPanic ("RTFSetInputName: out of memory");
|
RTFPanic ("RTFSetInputName: out of memory");
|
||||||
}
|
}
|
||||||
|
@ -350,6 +361,8 @@ void
|
||||||
RTFSetOutputName (name)
|
RTFSetOutputName (name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if ((outputName = RTFStrSave (name)) == (char *) NULL)
|
if ((outputName = RTFStrSave (name)) == (char *) NULL)
|
||||||
RTFPanic ("RTFSetOutputName: out of memory");
|
RTFPanic ("RTFSetOutputName: out of memory");
|
||||||
}
|
}
|
||||||
|
@ -456,6 +469,8 @@ RTFRouteToken ()
|
||||||
{
|
{
|
||||||
RTFFuncPtr p;
|
RTFFuncPtr p;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (rtfClass < 0 || rtfClass >= rtfMaxClass) /* watchdog */
|
if (rtfClass < 0 || rtfClass >= rtfMaxClass) /* watchdog */
|
||||||
{
|
{
|
||||||
RTFPanic ("Unknown class %d: %s (reader malfunction)",
|
RTFPanic ("Unknown class %d: %s (reader malfunction)",
|
||||||
|
@ -488,6 +503,7 @@ void
|
||||||
RTFSkipGroup ()
|
RTFSkipGroup ()
|
||||||
{
|
{
|
||||||
int level = 1;
|
int level = 1;
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
while (RTFGetToken () != rtfEOF)
|
while (RTFGetToken () != rtfEOF)
|
||||||
{
|
{
|
||||||
|
@ -515,6 +531,7 @@ int
|
||||||
RTFGetToken ()
|
RTFGetToken ()
|
||||||
{
|
{
|
||||||
RTFFuncPtr p;
|
RTFFuncPtr p;
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -557,6 +574,8 @@ RTFGetReadHook ()
|
||||||
void
|
void
|
||||||
RTFUngetToken ()
|
RTFUngetToken ()
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (pushedClass >= 0) /* there's already an ungotten token */
|
if (pushedClass >= 0) /* there's already an ungotten token */
|
||||||
RTFPanic ("cannot unget two tokens");
|
RTFPanic ("cannot unget two tokens");
|
||||||
if (rtfClass < 0)
|
if (rtfClass < 0)
|
||||||
|
@ -583,6 +602,8 @@ _RTFGetToken ()
|
||||||
{
|
{
|
||||||
RTFFont *fp;
|
RTFFont *fp;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
/* first check for pushed token from RTFUngetToken() */
|
/* first check for pushed token from RTFUngetToken() */
|
||||||
|
|
||||||
if (pushedClass >= 0)
|
if (pushedClass >= 0)
|
||||||
|
@ -659,6 +680,8 @@ _RTFGetToken2 ()
|
||||||
int sign;
|
int sign;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
/* initialize token vars */
|
/* initialize token vars */
|
||||||
|
|
||||||
rtfClass = rtfUnknown;
|
rtfClass = rtfUnknown;
|
||||||
|
@ -830,6 +853,8 @@ GetChar ()
|
||||||
int c;
|
int c;
|
||||||
int oldBumpLine;
|
int oldBumpLine;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if ((c = _RTFGetChar()) != EOF)
|
if ((c = _RTFGetChar()) != EOF)
|
||||||
{
|
{
|
||||||
rtfTextBuf[rtfTextLen++] = c;
|
rtfTextBuf[rtfTextLen++] = c;
|
||||||
|
@ -872,6 +897,8 @@ RTFSetToken (class, major, minor, param, text)
|
||||||
int class, major, minor, param;
|
int class, major, minor, param;
|
||||||
char *text;
|
char *text;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
rtfClass = class;
|
rtfClass = class;
|
||||||
rtfMajor = major;
|
rtfMajor = major;
|
||||||
rtfMinor = minor;
|
rtfMinor = minor;
|
||||||
|
@ -907,6 +934,8 @@ char *text;
|
||||||
static void
|
static void
|
||||||
CharSetInit ()
|
CharSetInit ()
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
autoCharSetFlags = (rtfReadCharSet | rtfSwitchCharSet);
|
autoCharSetFlags = (rtfReadCharSet | rtfSwitchCharSet);
|
||||||
RTFFree (genCharSetFile);
|
RTFFree (genCharSetFile);
|
||||||
genCharSetFile = (char *) NULL;
|
genCharSetFile = (char *) NULL;
|
||||||
|
@ -929,6 +958,8 @@ RTFSetCharSetMap (name, csId)
|
||||||
char *name;
|
char *name;
|
||||||
int csId;
|
int csId;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if ((name = RTFStrSave (name)) == (char *) NULL) /* make copy */
|
if ((name = RTFStrSave (name)) == (char *) NULL) /* make copy */
|
||||||
RTFPanic ("RTFSetCharSetMap: out of memory");
|
RTFPanic ("RTFSetCharSetMap: out of memory");
|
||||||
switch (csId)
|
switch (csId)
|
||||||
|
@ -959,6 +990,8 @@ ReadCharSetMaps ()
|
||||||
{
|
{
|
||||||
char buf[rtfBufSiz];
|
char buf[rtfBufSiz];
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (genCharSetFile != (char *) NULL)
|
if (genCharSetFile != (char *) NULL)
|
||||||
(void) strcpy (buf, genCharSetFile);
|
(void) strcpy (buf, genCharSetFile);
|
||||||
else
|
else
|
||||||
|
@ -986,6 +1019,9 @@ int csId;
|
||||||
{
|
{
|
||||||
int *stdCodeArray;
|
int *stdCodeArray;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (csId)
|
switch (csId)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -1036,6 +1072,8 @@ char *name;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for (i = 0; i < rtfSC_MaxChar; i++)
|
for (i = 0; i < rtfSC_MaxChar; i++)
|
||||||
{
|
{
|
||||||
if (strcmp (name, stdCharName[i]) == 0)
|
if (strcmp (name, stdCharName[i]) == 0)
|
||||||
|
@ -1073,6 +1111,8 @@ int
|
||||||
RTFMapChar (c)
|
RTFMapChar (c)
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (curCharSet)
|
switch (curCharSet)
|
||||||
{
|
{
|
||||||
case rtfCSGeneral:
|
case rtfCSGeneral:
|
||||||
|
@ -1104,6 +1144,8 @@ void
|
||||||
RTFSetCharSet (csId)
|
RTFSetCharSet (csId)
|
||||||
int csId;
|
int csId;
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (csId)
|
switch (csId)
|
||||||
{
|
{
|
||||||
default: /* use general if csId unknown */
|
default: /* use general if csId unknown */
|
||||||
|
@ -1162,6 +1204,8 @@ char buf[rtfBufSiz], *bp;
|
||||||
int old = -1;
|
int old = -1;
|
||||||
char *fn = "ReadFontTbl";
|
char *fn = "ReadFontTbl";
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
(void) RTFGetToken ();
|
(void) RTFGetToken ();
|
||||||
|
@ -1312,6 +1356,8 @@ RTFColor *cp;
|
||||||
int cnum = 0;
|
int cnum = 0;
|
||||||
char *fn = "ReadColorTbl";
|
char *fn = "ReadColorTbl";
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
(void) RTFGetToken ();
|
(void) RTFGetToken ();
|
||||||
|
@ -1353,6 +1399,8 @@ RTFStyleElt *sep, *sepLast;
|
||||||
char buf[rtfBufSiz], *bp;
|
char buf[rtfBufSiz], *bp;
|
||||||
char *fn = "ReadStyleSheet";
|
char *fn = "ReadStyleSheet";
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
(void) RTFGetToken ();
|
(void) RTFGetToken ();
|
||||||
|
@ -1592,6 +1640,8 @@ int n;
|
||||||
RTFStyle *s;
|
RTFStyle *s;
|
||||||
RTFStyleElt *se;
|
RTFStyleElt *se;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (n == -1 || (s = RTFGetStyle (n)) == (RTFStyle *) NULL)
|
if (n == -1 || (s = RTFGetStyle (n)) == (RTFStyle *) NULL)
|
||||||
return;
|
return;
|
||||||
if (s->rtfExpanding != 0)
|
if (s->rtfExpanding != 0)
|
||||||
|
@ -2575,6 +2625,7 @@ char *s;
|
||||||
RTFKey *rp;
|
RTFKey *rp;
|
||||||
int hash;
|
int hash;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
++s; /* skip over the leading \ character */
|
++s; /* skip over the leading \ character */
|
||||||
hash = Hash (s);
|
hash = Hash (s);
|
||||||
for (rp = rtfKey; rp->rtfKStr != (char *) NULL; rp++)
|
for (rp = rtfKey; rp->rtfKStr != (char *) NULL; rp++)
|
||||||
|
|
|
@ -32,6 +32,13 @@ DEFAULT_DEBUG_CHANNEL(richedit);
|
||||||
HANDLE RICHED32_hHeap = (HANDLE)NULL;
|
HANDLE RICHED32_hHeap = (HANDLE)NULL;
|
||||||
/* LPSTR RICHED32_aSubclass = (LPSTR)NULL; */
|
/* LPSTR RICHED32_aSubclass = (LPSTR)NULL; */
|
||||||
|
|
||||||
|
#define DPRINTF_EDIT_MSG32(str) \
|
||||||
|
TRACE(\
|
||||||
|
"32 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n"\
|
||||||
|
, \
|
||||||
|
hwnd, (UINT)wParam, (UINT)lParam)
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RICHED32_LibMain [Internal] Initializes the internal 'RICHED32.DLL'.
|
* RICHED32_LibMain [Internal] Initializes the internal 'RICHED32.DLL'.
|
||||||
*
|
*
|
||||||
|
@ -48,6 +55,7 @@ HANDLE RICHED32_hHeap = (HANDLE)NULL;
|
||||||
BOOL WINAPI
|
BOOL WINAPI
|
||||||
RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
RICHED32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
switch (fdwReason)
|
switch (fdwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
@ -81,15 +89,21 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
LONG style = 0;
|
LONG style = 0;
|
||||||
|
|
||||||
static HWND hwndEdit;
|
static HWND hwndEdit;
|
||||||
|
static HWND hwndParent;
|
||||||
static char* rtfBuffer;
|
static char* rtfBuffer;
|
||||||
int rtfBufferSize;
|
int rtfBufferSize;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
|
|
||||||
case WM_CREATE :
|
case WM_CREATE :
|
||||||
|
DPRINTF_EDIT_MSG32("WM_CREATE");
|
||||||
|
|
||||||
/* remove SCROLLBARS from the current window style */
|
/* remove SCROLLBARS from the current window style */
|
||||||
|
hwndParent = ((LPCREATESTRUCTA) lParam)->hwndParent;
|
||||||
|
|
||||||
newstyle = style = ((LPCREATESTRUCTA) lParam)->style;
|
newstyle = style = ((LPCREATESTRUCTA) lParam)->style;
|
||||||
newstyle &= ~WS_HSCROLL;
|
newstyle &= ~WS_HSCROLL;
|
||||||
newstyle &= ~WS_VSCROLL;
|
newstyle &= ~WS_VSCROLL;
|
||||||
|
@ -104,24 +118,37 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
SetWindowLongA(hwnd,GWL_STYLE, newstyle);
|
SetWindowLongA(hwnd,GWL_STYLE, newstyle);
|
||||||
return 0 ;
|
return 0 ;
|
||||||
|
|
||||||
case WM_SETFOCUS :
|
case WM_SETFOCUS :
|
||||||
|
DPRINTF_EDIT_MSG32("WM_SETFOCUS");
|
||||||
SetFocus (hwndEdit) ;
|
SetFocus (hwndEdit) ;
|
||||||
return 0 ;
|
return 0 ;
|
||||||
|
|
||||||
case WM_SIZE :
|
case WM_SIZE :
|
||||||
|
DPRINTF_EDIT_MSG32("WM_SIZE");
|
||||||
MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), TRUE) ;
|
MoveWindow (hwndEdit, 0, 0, LOWORD (lParam), HIWORD (lParam), TRUE) ;
|
||||||
return 0 ;
|
return 0 ;
|
||||||
|
|
||||||
case WM_COMMAND :
|
case WM_COMMAND :
|
||||||
if (LOWORD (wParam) == ID_EDIT)
|
DPRINTF_EDIT_MSG32("WM_COMMAND");
|
||||||
if (HIWORD (wParam) == EN_ERRSPACE ||
|
switch(HIWORD(wParam)) {
|
||||||
HIWORD (wParam) == EN_MAXTEXT)
|
case EN_CHANGE:
|
||||||
|
case EN_HSCROLL:
|
||||||
MessageBoxA (hwnd, "RichEdit control out of space.",
|
case EN_KILLFOCUS:
|
||||||
|
case EN_SETFOCUS:
|
||||||
|
case EN_UPDATE:
|
||||||
|
case EN_VSCROLL:
|
||||||
|
return SendMessageA(hwndParent, WM_COMMAND,
|
||||||
|
wParam, (LPARAM)(hwnd));
|
||||||
|
|
||||||
|
case EN_ERRSPACE:
|
||||||
|
case EN_MAXTEXT:
|
||||||
|
MessageBoxA (hwnd, "RichEdit control out of space.",
|
||||||
"ERROR", MB_OK | MB_ICONSTOP) ;
|
"ERROR", MB_OK | MB_ICONSTOP) ;
|
||||||
return 0 ;
|
return 0 ;
|
||||||
|
}
|
||||||
|
|
||||||
case EM_STREAMIN:
|
case EM_STREAMIN:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_STREAMIN");
|
||||||
|
|
||||||
/* setup the RTF parser */
|
/* setup the RTF parser */
|
||||||
RTFSetEditStream(( EDITSTREAM*)lParam);
|
RTFSetEditStream(( EDITSTREAM*)lParam);
|
||||||
|
@ -144,8 +171,387 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
WARN("Not enough memory for a allocating rtfBuffer\n");
|
WARN("Not enough memory for a allocating rtfBuffer\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Message specific to Richedit controls */
|
||||||
|
|
||||||
|
case EM_AUTOURLDETECT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_AUTOURLDETECT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_CANPASTE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_CANPASTE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_CANREDO:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_CANREDO");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_DISPLAYBAND:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_DISPLAYBAND");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_EXGETSEL:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_EXGETSEL");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_EXLIMITTEXT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_EXLIMITTEXT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_EXLINEFROMCHAR:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_EXLINEFROMCHAR");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_EXSETSEL:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_EXSETSEL");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FINDTEXT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FINDTEXT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FINDTEXTEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FINDTEXTEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FINDTEXTEXW:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FINDTEXTEXW");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FINDTEXTW:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FINDTEXTW");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FINDWORDBREAK:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FINDWORDBREAK");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_FORMATRANGE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_FORMATRANGE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETAUTOURLDETECT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETAUTOURLDETECT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETBIDIOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETBIDIOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETCHARFORMAT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETCHARFORMAT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETEDITSTYLE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETEDITSTYLE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETEVENTMASK:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETEVENTMASK");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETIMECOLOR:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETIMECOLOR");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETIMECOMPMODE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETIMECOMPMODE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETIMEOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETIMEOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETLANGOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETLANGOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETOLEINTERFACE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETOLEINTERFACE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETPARAFORMAT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETPARAFORMAT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETPUNCTUATION:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETPUNCTUATION");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETREDONAME:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETREDONAME");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETSCROLLPOS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETSCROLLPOS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETSELTEXT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETSELTEXT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETTEXTEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETTEXTEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETTEXTLENGTHEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETTEXTLENGTHEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETTEXTMODE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETTEXTMODE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETTEXTRANGE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETTEXTRANGE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETTYPOGRAPHYOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETTYPOGRAPHYOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETUNDONAME:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETUNDONAME");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETWORDBREAKPROCEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETWORDBREAKPROCEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETWORDWRAPMODE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETWORDWRAPMODE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_GETZOOM:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_GETZOOM");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_HIDESELECTION:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_HIDESELECTION");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_PASTESPECIAL:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_PASTESPECIAL");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_RECONVERSION:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_RECONVERSION");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_REDO:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_REDO");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_REQUESTRESIZE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_REQUESTRESIZE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SELECTIONTYPE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SELECTIONTYPE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETBIDIOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETBIDIOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETBKGNDCOLOR:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETBKGNDCOLOR");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETCHARFORMAT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETCHARFORMAT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETEDITSTYLE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETEDITSTYLE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETEVENTMASK:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETEVENTMASK");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETFONTSIZE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETFONTSIZE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETIMECOLOR:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETIMECOLO");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETIMEOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETIMEOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETLANGOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETLANGOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETOLECALLBACK:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETOLECALLBACK");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETPALETTE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETPALETTE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETPARAFORMAT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETPARAFORMAT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETPUNCTUATION:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETPUNCTUATION");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETSCROLLPOS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETSCROLLPOS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETTARGETDEVICE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETTARGETDEVICE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETTEXTEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETTEXTEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETTEXTMODE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETTEXTMODE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETTYPOGRAPHYOPTIONS:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETTYPOGRAPHYOPTIONS");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETUNDOLIMIT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETUNDOLIMIT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETWORDBREAKPROCEX:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETWORDBREAKPROCEX");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETWORDWRAPMODE:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETWORDWRAPMODE");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SETZOOM:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SETZOOM");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_SHOWSCROLLBAR:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_SHOWSCROLLBAR");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_STOPGROUPTYPING:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_STOPGROUPTYPING");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
case EM_STREAMOUT:
|
||||||
|
DPRINTF_EDIT_MSG32("EM_STREAMOUT");
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Messaged dispatched to the edit control */
|
||||||
|
case EM_CANUNDO:
|
||||||
|
case EM_CHARFROMPOS:
|
||||||
|
case EM_EMPTYUNDOBUFFER:
|
||||||
|
case EM_FMTLINES:
|
||||||
|
case EM_GETFIRSTVISIBLELINE:
|
||||||
|
case EM_GETHANDLE:
|
||||||
|
/* case EM_GETIMESTATUS:*/
|
||||||
|
case EM_GETLIMITTEXT:
|
||||||
|
case EM_GETLINE:
|
||||||
|
case EM_GETLINECOUNT:
|
||||||
|
case EM_GETMARGINS:
|
||||||
|
case EM_GETMODIFY:
|
||||||
|
case EM_GETPASSWORDCHAR:
|
||||||
|
case EM_GETRECT:
|
||||||
|
case EM_GETSEL:
|
||||||
|
case EM_GETTHUMB:
|
||||||
|
case EM_GETWORDBREAKPROC:
|
||||||
|
case EM_LINEFROMCHAR:
|
||||||
|
case EM_LINEINDEX:
|
||||||
|
case EM_LINELENGTH:
|
||||||
|
case EM_LINESCROLL:
|
||||||
|
case EM_POSFROMCHAR:
|
||||||
|
case EM_REPLACESEL:
|
||||||
|
case EM_SCROLL:
|
||||||
|
case EM_SCROLLCARET:
|
||||||
|
case EM_SETHANDLE:
|
||||||
|
/* case EM_SETIMESTATUS:*/
|
||||||
|
case EM_SETLIMITTEXT:
|
||||||
|
case EM_SETMARGINS:
|
||||||
|
case EM_SETMODIFY:
|
||||||
|
case EM_SETPASSWORDCHAR:
|
||||||
|
case EM_SETREADONLY:
|
||||||
|
case EM_SETRECT:
|
||||||
|
case EM_SETRECTNP:
|
||||||
|
case EM_SETSEL:
|
||||||
|
case EM_SETTABSTOPS:
|
||||||
|
case EM_SETWORDBREAKPROC:
|
||||||
|
case EM_UNDO:
|
||||||
|
|
||||||
|
case WM_STYLECHANGING:
|
||||||
|
case WM_STYLECHANGED:
|
||||||
|
case WM_NCCALCSIZE:
|
||||||
|
case WM_GETTEXT:
|
||||||
|
case WM_GETTEXTLENGTH:
|
||||||
|
case WM_SETTEXT:
|
||||||
|
return SendMessageA( hwndEdit, uMsg, wParam, lParam);
|
||||||
|
|
||||||
|
/* Messages known , but ignored. */
|
||||||
|
case WM_NCPAINT:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_NCPAINT");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_PAINT:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_PAINT");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_ERASEBKGND");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_KILLFOCUS:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_KILLFOCUS");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_DESTROY:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_DESTROY");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_CHILDACTIVATE:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_CHILDACTIVATE");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
|
||||||
|
case WM_WINDOWPOSCHANGING:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_WINDOWPOSCHANGING");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_WINDOWPOSCHANGED:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_WINDOWPOSCHANGED");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
/* case WM_INITIALUPDATE:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_INITIALUPDATE");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam); */
|
||||||
|
case WM_CTLCOLOREDIT:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_CTLCOLOREDIT");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_SETCURSOR:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_SETCURSOR");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_MOVE:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_MOVE");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
case WM_SHOWWINDOW:
|
||||||
|
DPRINTF_EDIT_MSG32("WM_SHOWWINDOW");
|
||||||
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*return SendMessageA( hwndEdit,uMsg,wParam,lParam);*/
|
|
||||||
|
|
||||||
|
FIXME("Unknown message %d\n", uMsg);
|
||||||
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
return DefWindowProcA( hwnd,uMsg,wParam,lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,6 +574,8 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
RICHED32_DllGetVersion (DLLVERSIONINFO *pdvi)
|
RICHED32_DllGetVersion (DLLVERSIONINFO *pdvi)
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
|
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
|
||||||
|
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
@ -195,6 +603,8 @@ VOID RICHED32_Register(void)
|
||||||
{
|
{
|
||||||
WNDCLASSA wndClass;
|
WNDCLASSA wndClass;
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
ZeroMemory(&wndClass, sizeof(WNDCLASSA));
|
ZeroMemory(&wndClass, sizeof(WNDCLASSA));
|
||||||
wndClass.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
|
wndClass.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
|
||||||
wndClass.lpfnWndProc = (WNDPROC)RICHED32_WindowProc;
|
wndClass.lpfnWndProc = (WNDPROC)RICHED32_WindowProc;
|
||||||
|
@ -219,5 +629,7 @@ VOID RICHED32_Register(void)
|
||||||
*/
|
*/
|
||||||
VOID RICHED32_Unregister(void)
|
VOID RICHED32_Unregister(void)
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
UnregisterClassA(RICHEDIT_CLASS10A, (HINSTANCE)NULL);
|
UnregisterClassA(RICHEDIT_CLASS10A, (HINSTANCE)NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,9 @@
|
||||||
# include "rtf.h"
|
# include "rtf.h"
|
||||||
# include "rtf2text.h"
|
# include "rtf2text.h"
|
||||||
# include "charlist.h"
|
# include "charlist.h"
|
||||||
|
# include "debugtools.h"
|
||||||
|
|
||||||
|
DEFAULT_DEBUG_CHANNEL(richedit);
|
||||||
|
|
||||||
static void TextClass ();
|
static void TextClass ();
|
||||||
static void ControlClass ();
|
static void ControlClass ();
|
||||||
|
@ -61,7 +64,8 @@ int RTFToBuffer(char* pBuffer, int nBufferSize)
|
||||||
/* check if the buffer is big enough to hold all characters */
|
/* check if the buffer is big enough to hold all characters */
|
||||||
/* we require one more for the '\0' */
|
/* we require one more for the '\0' */
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if(nBufferSize < charlist.nCount + 1) {
|
if(nBufferSize < charlist.nCount + 1) {
|
||||||
return charlist.nCount + CHARLIST_CountChar(&charlist, '\n') + 1;
|
return charlist.nCount + CHARLIST_CountChar(&charlist, '\n') + 1;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +123,8 @@ TextClass ()
|
||||||
{
|
{
|
||||||
char buf[rtfBufSiz];
|
char buf[rtfBufSiz];
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
if (rtfMinor != rtfSC_nothing)
|
if (rtfMinor != rtfSC_nothing)
|
||||||
PutStdChar (rtfMinor);
|
PutStdChar (rtfMinor);
|
||||||
else
|
else
|
||||||
|
@ -135,6 +141,7 @@ char buf[rtfBufSiz];
|
||||||
static void
|
static void
|
||||||
ControlClass ()
|
ControlClass ()
|
||||||
{
|
{
|
||||||
|
TRACE("\n");
|
||||||
switch (rtfMajor)
|
switch (rtfMajor)
|
||||||
{
|
{
|
||||||
case rtfDestination:
|
case rtfDestination:
|
||||||
|
@ -156,6 +163,9 @@ ControlClass ()
|
||||||
static void
|
static void
|
||||||
Destination ()
|
Destination ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (rtfMinor)
|
switch (rtfMinor)
|
||||||
{
|
{
|
||||||
case rtfPict:
|
case rtfPict:
|
||||||
|
@ -185,6 +195,9 @@ Destination ()
|
||||||
|
|
||||||
void SpecialChar ()
|
void SpecialChar ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
switch (rtfMinor)
|
switch (rtfMinor)
|
||||||
{
|
{
|
||||||
case rtfPage:
|
case rtfPage:
|
||||||
|
@ -249,6 +262,8 @@ void PutStdChar (int stdCode)
|
||||||
/* if (stdCode == rtfSC_nothing)
|
/* if (stdCode == rtfSC_nothing)
|
||||||
RTFPanic ("Unknown character code, logic error\n");
|
RTFPanic ("Unknown character code, logic error\n");
|
||||||
*/
|
*/
|
||||||
|
TRACE("\n");
|
||||||
|
|
||||||
oStr = outMap[stdCode];
|
oStr = outMap[stdCode];
|
||||||
if (oStr == (char *) NULL) /* no output sequence in map */
|
if (oStr == (char *) NULL) /* no output sequence in map */
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,6 +57,85 @@ static const WCHAR RICHEDIT_CLASS20W[] = { 'R','i','c','h','E','d','i','t','2','
|
||||||
#define EM_GETWORDBREAKPROCEX (WM_USER + 80)
|
#define EM_GETWORDBREAKPROCEX (WM_USER + 80)
|
||||||
#define EM_SETWORDBREAKPROCEX (WM_USER + 81)
|
#define EM_SETWORDBREAKPROCEX (WM_USER + 81)
|
||||||
|
|
||||||
|
#define EM_SETUNDOLIMIT (WM_USER + 82)
|
||||||
|
#define EM_REDO (WM_USER + 84)
|
||||||
|
#define EM_CANREDO (WM_USER + 85)
|
||||||
|
#define EM_GETUNDONAME (WM_USER + 86)
|
||||||
|
#define EM_GETREDONAME (WM_USER + 87)
|
||||||
|
#define EM_STOPGROUPTYPING (WM_USER + 88)
|
||||||
|
|
||||||
|
#define EM_SETTEXTMODE (WM_USER + 89)
|
||||||
|
#define EM_GETTEXTMODE (WM_USER + 90)
|
||||||
|
#define EM_AUTOURLDETECT (WM_USER + 91)
|
||||||
|
#define EM_GETAUTOURLDETECT (WM_USER + 92)
|
||||||
|
#define EM_SETPALETTE (WM_USER + 93)
|
||||||
|
#define EM_GETTEXTEX (WM_USER + 94)
|
||||||
|
#define EM_GETTEXTLENGTHEX (WM_USER + 95)
|
||||||
|
#define EM_SHOWSCROLLBAR (WM_USER + 96)
|
||||||
|
#define EM_SETTEXTEX (WM_USER + 97)
|
||||||
|
|
||||||
|
#define EM_SETPUNCTUATION (WM_USER + 100)
|
||||||
|
#define EM_GETPUNCTUATION (WM_USER + 101)
|
||||||
|
#define EM_SETWORDWRAPMODE (WM_USER + 102)
|
||||||
|
#define EM_GETWORDWRAPMODE (WM_USER + 103)
|
||||||
|
#define EM_SETIMECOLOR (WM_USER + 104)
|
||||||
|
#define EM_GETIMECOLOR (WM_USER + 105)
|
||||||
|
#define EM_SETIMEOPTIONS (WM_USER + 106)
|
||||||
|
#define EM_GETIMEOPTIONS (WM_USER + 107)
|
||||||
|
#define EM_CONVPOSITION (WM_USER + 108)
|
||||||
|
|
||||||
|
#define EM_SETLANGOPTIONS (WM_USER + 120)
|
||||||
|
#define EM_GETLANGOPTIONS (WM_USER + 121)
|
||||||
|
#define EM_GETIMECOMPMODE (WM_USER + 122)
|
||||||
|
|
||||||
|
#define EM_SETLANGOPTIONS (WM_USER + 120)
|
||||||
|
#define EM_GETLANGOPTIONS (WM_USER + 121)
|
||||||
|
#define EM_GETIMECOMPMODE (WM_USER + 122)
|
||||||
|
|
||||||
|
#define EM_FINDTEXTW (WM_USER + 123)
|
||||||
|
#define EM_FINDTEXTEXW (WM_USER + 124)
|
||||||
|
|
||||||
|
#define EM_RECONVERSION (WM_USER + 125)
|
||||||
|
#define EM_SETIMEMODEBIAS (WM_USER + 126)
|
||||||
|
#define EM_GETIMEMODEBIAS (WM_USER + 127)
|
||||||
|
|
||||||
|
#define EM_SETBIDIOPTIONS (WM_USER + 200)
|
||||||
|
#define EM_GETBIDIOPTIONS (WM_USER + 201)
|
||||||
|
|
||||||
|
#define EM_SETTYPOGRAPHYOPTIONS (WM_USER + 202)
|
||||||
|
#define EM_GETTYPOGRAPHYOPTIONS (WM_USER + 203)
|
||||||
|
|
||||||
|
#define EM_SETEDITSTYLE (WM_USER + 204)
|
||||||
|
#define EM_GETEDITSTYLE (WM_USER + 205)
|
||||||
|
|
||||||
|
#define EM_OUTLINE (WM_USER + 220)
|
||||||
|
|
||||||
|
#define EM_GETSCROLLPOS (WM_USER + 221)
|
||||||
|
#define EM_SETSCROLLPOS (WM_USER + 222)
|
||||||
|
|
||||||
|
#define EM_SETFONTSIZE (WM_USER + 223)
|
||||||
|
#define EM_GETZOOM (WM_USER + 224)
|
||||||
|
#define EM_SETZOOM (WM_USER + 225)
|
||||||
|
|
||||||
|
/* New notifications */
|
||||||
|
#define EN_MSGFILTER 0x0700
|
||||||
|
#define EN_REQUESTRESIZE 0x0701
|
||||||
|
#define EN_SELCHANGE 0x0702
|
||||||
|
#define EN_DROPFILES 0x0703
|
||||||
|
#define EN_PROTECTED 0x0704
|
||||||
|
#define EN_CORRECTTEXT 0x0705
|
||||||
|
#define EN_STOPNOUNDO 0x0706
|
||||||
|
#define EN_IMECHANGE 0x0707
|
||||||
|
#define EN_SAVECLIPBOARD 0x0708
|
||||||
|
#define EN_OLEOPFAILED 0x0709
|
||||||
|
#define EN_OBJECTPOSITIONS 0x070a
|
||||||
|
#define EN_LINK 0x070b
|
||||||
|
#define EN_DRAGDROPDONE 0x070c
|
||||||
|
#define EN_PARAGRAPHEXPANDED 0x070d
|
||||||
|
#define EN_ALIGNLTR 0x0710
|
||||||
|
#define EN_ALIGNRTL 0x0711
|
||||||
|
|
||||||
|
|
||||||
typedef DWORD CALLBACK(* EDITSTREAMCALLBACK)( DWORD, LPBYTE, LONG, LONG * );
|
typedef DWORD CALLBACK(* EDITSTREAMCALLBACK)( DWORD, LPBYTE, LONG, LONG * );
|
||||||
|
|
||||||
/* Rich edit control styles */
|
/* Rich edit control styles */
|
||||||
|
|
Loading…
Reference in a new issue