Author: dreimer
Date: Thu Aug 7 05:53:23 2008
New Revision: 35159
URL:
http://svn.reactos.org/svn/reactos?rev=35159&view=rev
Log:
Sync Winhlp32 and Wordpad to Wine HEAD (Still the same problems with wordpad....)
Modified:
trunk/reactos/base/applications/winhlp32/hlpfile.c
trunk/reactos/base/applications/winhlp32/hlpfile.h
trunk/reactos/base/applications/winhlp32/lang/da-DK.rc
trunk/reactos/base/applications/winhlp32/lang/de-DE.rc
trunk/reactos/base/applications/winhlp32/lang/en-US.rc
trunk/reactos/base/applications/winhlp32/lang/fr-FR.rc
trunk/reactos/base/applications/winhlp32/lang/ko-KR.rc
trunk/reactos/base/applications/winhlp32/lang/nl-NL.rc
trunk/reactos/base/applications/winhlp32/lang/no-NO.rc
trunk/reactos/base/applications/winhlp32/lang/pl-PL.rc
trunk/reactos/base/applications/winhlp32/lang/ru-RU.rc
trunk/reactos/base/applications/winhlp32/lang/sl-SI.rc
trunk/reactos/base/applications/winhlp32/lex.yy.c
trunk/reactos/base/applications/winhlp32/macro.c
trunk/reactos/base/applications/winhlp32/macro.lex.l
trunk/reactos/base/applications/winhlp32/winhelp.c
trunk/reactos/base/applications/winhlp32/winhelp.h
trunk/reactos/base/applications/wordpad/En.rc
trunk/reactos/base/applications/wordpad/Nl.rc
trunk/reactos/base/applications/wordpad/No.rc
trunk/reactos/base/applications/wordpad/print.c
trunk/reactos/base/applications/wordpad/wordpad.c
trunk/reactos/base/applications/wordpad/wordpad.h
Modified: trunk/reactos/base/applications/winhlp32/hlpfile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/hlpfile.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/hlpfile.c [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -55,19 +55,19 @@
static BOOL HLPFILE_ReadFileToBuffer(HLPFILE*, HFILE);
static BOOL HLPFILE_FindSubFile(HLPFILE*, LPCSTR, BYTE**, BYTE**);
static BOOL HLPFILE_SystemCommands(HLPFILE*);
-static INT HLPFILE_UncompressedLZ77_Size(BYTE *ptr, BYTE *end);
-static BYTE* HLPFILE_UncompressLZ77(BYTE *ptr, BYTE *end, BYTE *newptr);
+static INT HLPFILE_UncompressedLZ77_Size(const BYTE *ptr, const BYTE *end);
+static BYTE* HLPFILE_UncompressLZ77(const BYTE *ptr, const BYTE *end, BYTE *newptr);
static BOOL HLPFILE_UncompressLZ77_Phrases(HLPFILE*);
static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE*);
static BOOL HLPFILE_Uncompress_Topic(HLPFILE*);
static BOOL HLPFILE_GetContext(HLPFILE*);
static BOOL HLPFILE_GetKeywords(HLPFILE*);
static BOOL HLPFILE_GetMap(HLPFILE*);
-static BOOL HLPFILE_AddPage(HLPFILE*, BYTE*, BYTE*, unsigned, unsigned);
-static BOOL HLPFILE_SkipParagraph(HLPFILE*, BYTE *, BYTE*, unsigned*);
+static BOOL HLPFILE_AddPage(HLPFILE*, const BYTE*, const BYTE*, unsigned, unsigned);
+static BOOL HLPFILE_SkipParagraph(HLPFILE*, const BYTE*, const BYTE*, unsigned*);
static void HLPFILE_Uncompress2(HLPFILE*, const BYTE*, const BYTE*, BYTE*, const
BYTE*);
static BOOL HLPFILE_Uncompress3(HLPFILE*, char*, const char*, const BYTE*, const
BYTE*);
-static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, unsigned
dstsz);
+static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE* dst, unsigned
dstsz);
static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile);
/***********************************************************************
@@ -370,10 +370,10 @@
*
* HLPFILE_AddPage
*/
-static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigned ref,
unsigned offset)
+static BOOL HLPFILE_AddPage(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end, unsigned
ref, unsigned offset)
{
HLPFILE_PAGE* page;
- BYTE* title;
+ const BYTE* title;
UINT titlesize, blocksize, datalen;
char* ptr;
HLPFILE_MACRO*macro;
@@ -457,70 +457,70 @@
return TRUE;
}
-static long fetch_long(BYTE** ptr)
+static long fetch_long(const BYTE** ptr)
{
long ret;
if (*(*ptr) & 1)
{
- ret = (*(unsigned long*)(*ptr) - 0x80000000L) / 2;
+ ret = (*(const unsigned long*)(*ptr) - 0x80000000L) / 2;
(*ptr) += 4;
}
else
{
- ret = (*(unsigned short*)(*ptr) - 0x8000) / 2;
+ ret = (*(const unsigned short*)(*ptr) - 0x8000) / 2;
(*ptr) += 2;
}
return ret;
}
-static unsigned long fetch_ulong(BYTE** ptr)
+static unsigned long fetch_ulong(const BYTE** ptr)
{
unsigned long ret;
if (*(*ptr) & 1)
{
- ret = *(unsigned long*)(*ptr) / 2;
+ ret = *(const unsigned long*)(*ptr) / 2;
(*ptr) += 4;
}
else
{
- ret = *(unsigned short*)(*ptr) / 2;
+ ret = *(const unsigned short*)(*ptr) / 2;
(*ptr) += 2;
}
return ret;
}
-static short fetch_short(BYTE** ptr)
+static short fetch_short(const BYTE** ptr)
{
short ret;
if (*(*ptr) & 1)
{
- ret = (*(unsigned short*)(*ptr) - 0x8000) / 2;
+ ret = (*(const unsigned short*)(*ptr) - 0x8000) / 2;
(*ptr) += 2;
}
else
{
- ret = (*(unsigned char*)(*ptr) - 0x80) / 2;
+ ret = (*(const unsigned char*)(*ptr) - 0x80) / 2;
(*ptr)++;
}
return ret;
}
-static unsigned short fetch_ushort(BYTE** ptr)
+static unsigned short fetch_ushort(const BYTE** ptr)
{
unsigned short ret;
if (*(*ptr) & 1)
{
- ret = *(unsigned short*)(*ptr) / 2;
+ ret = *(const unsigned short*)(*ptr) / 2;
(*ptr) += 2;
}
else
{
- ret = *(unsigned char*)(*ptr) / 2;
+ ret = *(const unsigned char*)(*ptr) / 2;
(*ptr)++;
}
return ret;
@@ -530,9 +530,9 @@
*
* HLPFILE_SkipParagraph
*/
-static BOOL HLPFILE_SkipParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigned* len)
-{
- BYTE *tmp;
+static BOOL HLPFILE_SkipParagraph(HLPFILE *hlpfile, const BYTE *buf, const BYTE *end,
unsigned* len)
+{
+ const BYTE *tmp;
if (!hlpfile->first_page) {WINE_WARN("no page\n"); return FALSE;};
if (buf + 0x19 > end) {WINE_WARN("header too small\n"); return FALSE;};
@@ -553,11 +553,11 @@
*
* Decompress the data part of a bitmap or a metafile
*/
-static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE
packing)
-{
- BYTE* dst;
+static const BYTE* HLPFILE_DecompressGfx(const BYTE* src, unsigned csz, unsigned sz,
BYTE packing,
+ BYTE** alloc)
+{
+ const BYTE* dst;
BYTE* tmp;
- BYTE* tmp2;
unsigned sz77;
WINE_TRACE("Unpacking (%d) from %u bytes to %u bytes\n", packing, csz,
sz);
@@ -568,19 +568,18 @@
if (sz != csz)
WINE_WARN("Bogus gfx sizes (uncompressed): %u / %u\n", sz, csz);
dst = src;
+ *alloc = NULL;
break;
case 1: /* RunLen */
- tmp = dst = HeapAlloc(GetProcessHeap(), 0, sz);
+ dst = *alloc = HeapAlloc(GetProcessHeap(), 0, sz);
if (!dst) return NULL;
- HLPFILE_UncompressRLE(src, src + csz, &tmp, sz);
- if (tmp - dst != sz)
- WINE_WARN("Bogus gfx sizes (RunLen): %lu/%u\n", (SIZE_T)(tmp -
dst), sz);
+ HLPFILE_UncompressRLE(src, src + csz, *alloc, sz);
break;
case 2: /* LZ77 */
sz77 = HLPFILE_UncompressedLZ77_Size(src, src + csz);
- dst = HeapAlloc(GetProcessHeap(), 0, sz77);
+ dst = *alloc = HeapAlloc(GetProcessHeap(), 0, sz77);
if (!dst) return NULL;
- HLPFILE_UncompressLZ77(src, src + csz, dst);
+ HLPFILE_UncompressLZ77(src, src + csz, *alloc);
if (sz77 != sz)
WINE_WARN("Bogus gfx sizes (LZ77): %u / %u\n", sz77, sz);
break;
@@ -589,15 +588,13 @@
tmp = HeapAlloc(GetProcessHeap(), 0, sz77);
if (!tmp) return FALSE;
HLPFILE_UncompressLZ77(src, src + csz, tmp);
- dst = tmp2 = HeapAlloc(GetProcessHeap(), 0, sz);
+ dst = *alloc = HeapAlloc(GetProcessHeap(), 0, sz);
if (!dst)
{
HeapFree(GetProcessHeap(), 0, tmp);
return FALSE;
}
- HLPFILE_UncompressRLE(tmp, tmp + sz77, &tmp2, sz);
- if (tmp2 - dst != sz)
- WINE_WARN("Bogus gfx sizes (LZ77+RunLen): %lu / %u\n",
(SIZE_T)(tmp2 - dst), sz);
+ HLPFILE_UncompressRLE(tmp, tmp + sz77, *alloc, sz);
HeapFree(GetProcessHeap(), 0, tmp);
break;
default:
@@ -779,10 +776,11 @@
* HLPFILE_RtfAddBitmap
*
*/
-static BOOL HLPFILE_RtfAddBitmap(struct RtfData* rd, BYTE* beg, BYTE type, BYTE pack)
-{
- BYTE* ptr;
- BYTE* pict_beg;
+static BOOL HLPFILE_RtfAddBitmap(struct RtfData* rd, const BYTE* beg, BYTE type, BYTE
pack)
+{
+ const BYTE* ptr;
+ const BYTE* pict_beg;
+ BYTE* alloc = NULL;
BITMAPINFO* bi;
unsigned long off, csz;
unsigned nc = 0;
@@ -840,7 +838,7 @@
ptr += 4;
}
}
- pict_beg = HLPFILE_DecompressGfx(beg + off, csz, bi->bmiHeader.biSizeImage,
pack);
+ pict_beg = HLPFILE_DecompressGfx(beg + off, csz, bi->bmiHeader.biSizeImage, pack,
&alloc);
if (clrImportant == 1 && nc > 0)
{
@@ -868,7 +866,7 @@
ret = TRUE;
done:
HeapFree(GetProcessHeap(), 0, bi);
- if (pict_beg != beg + off) HeapFree(GetProcessHeap(), 0, pict_beg);
+ HeapFree(GetProcessHeap(), 0, alloc);
return ret;
}
@@ -877,12 +875,13 @@
* HLPFILE_RtfAddMetaFile
*
*/
-static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack)
-{
- BYTE* ptr;
+static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, const BYTE* beg, BYTE pack)
+{
+ const BYTE* ptr;
unsigned long size, csize;
unsigned long off, hsoff;
- BYTE* bits;
+ const BYTE* bits;
+ BYTE* alloc = NULL;
char tmp[256];
unsigned mm;
BOOL ret;
@@ -907,13 +906,13 @@
WINE_TRACE("sz=%lu csz=%lu offs=%lu/%u,%lu\n",
size, csize, off, ptr - beg, hsoff);
- bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack);
+ bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack, &alloc);
if (!bits) return FALSE;
ret = HLPFILE_RtfAddHexBytes(rd, bits, size) &&
HLPFILE_RtfAddControl(rd, "}");
- if (bits != beg + off) HeapFree(GetProcessHeap(), 0, bits);
+ HeapFree(GetProcessHeap(), 0, alloc);
return ret;
}
@@ -923,7 +922,7 @@
*
*/
static BOOL HLPFILE_RtfAddGfxByAddr(struct RtfData* rd, HLPFILE *hlpfile,
- BYTE* ref, unsigned long size)
+ const BYTE* ref, unsigned long size)
{
unsigned i, numpict;
@@ -932,9 +931,9 @@
for (i = 0; i < numpict; i++)
{
- BYTE* beg;
- BYTE* ptr;
- BYTE type, pack;
+ const BYTE* beg;
+ const BYTE* ptr;
+ BYTE type, pack;
WINE_TRACE("Offset[%d] = %x\n", i, GET_UINT(ref, (1 + i) * 4));
beg = ptr = ref + GET_UINT(ref, (1 + i) * 4);
@@ -1043,7 +1042,7 @@
BYTE *buf, BYTE* end, unsigned* parlen)
{
UINT textsize;
- BYTE *format, *format_end;
+ const BYTE *format, *format_end;
char *text, *text_base, *text_end;
long size, blocksize, datalen;
unsigned short bits;
@@ -1640,7 +1639,7 @@
case 0x20:
case 0x23:
if (!HLPFILE_BrowseParagraph(page, rd, buf, end, &parlen)) return FALSE;
- if (relative >= index * 0x8000 + offs)
+ if (relative > index * 0x8000 + offs)
rd->char_pos_rel = rd->char_pos;
offs += parlen;
break;
@@ -1887,6 +1886,17 @@
hlpfile->flags = flags;
hlpfile->charset = DEFAULT_CHARSET;
+ if (hlpfile->version <= 16)
+ {
+ char *str = (char*)buf + 0x15;
+
+ hlpfile->lpszTitle = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1);
+ if (!hlpfile->lpszTitle) return FALSE;
+ lstrcpy(hlpfile->lpszTitle, str);
+ WINE_TRACE("Title: %s\n", hlpfile->lpszTitle);
+ /* Nothing more to parse */
+ return TRUE;
+ }
for (ptr = buf + 0x15; ptr + 4 <= end; ptr += GET_USHORT(ptr, 2) + 4)
{
char *str = (char*) ptr + 4;
@@ -1996,7 +2006,7 @@
*
* HLPFILE_UncompressedLZ77_Size
*/
-static INT HLPFILE_UncompressedLZ77_Size(BYTE *ptr, BYTE *end)
+static INT HLPFILE_UncompressedLZ77_Size(const BYTE *ptr, const BYTE *end)
{
int i, newsize = 0;
@@ -2023,7 +2033,7 @@
*
* HLPFILE_UncompressLZ77
*/
-static BYTE *HLPFILE_UncompressLZ77(BYTE *ptr, BYTE *end, BYTE *newptr)
+static BYTE *HLPFILE_UncompressLZ77(const BYTE *ptr, const BYTE *end, BYTE *newptr)
{
int i;
@@ -2349,10 +2359,10 @@
*
*
*/
-static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, unsigned
dstsz)
+static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE* dst, unsigned
dstsz)
{
BYTE ch;
- BYTE* sdst = *dst + dstsz;
+ BYTE* sdst = dst + dstsz;
while (src < end)
{
@@ -2360,21 +2370,21 @@
if (ch & 0x80)
{
ch &= 0x7F;
- if ((*dst) + ch <= sdst)
- memcpy(*dst, src, ch);
+ if (dst + ch <= sdst)
+ memcpy(dst, src, ch);
src += ch;
}
else
{
- if ((*dst) + ch <= sdst)
- memset(*dst, (char)*src, ch);
+ if (dst + ch <= sdst)
+ memset(dst, (char)*src, ch);
src++;
}
- *dst += ch;
- }
- if (*dst != sdst)
+ dst += ch;
+ }
+ if (dst != sdst)
WINE_WARN("Buffer X-flow: d(%lu) instead of d(%u)\n",
- (SIZE_T)(*dst - (sdst - dstsz)), dstsz);
+ (SIZE_T)(dst - (sdst - dstsz)), dstsz);
}
/**************************************************************************
@@ -2641,5 +2651,6 @@
HeapFree(GetProcessHeap(), 0, hlpfile->phrases_offsets);
HeapFree(GetProcessHeap(), 0, hlpfile->phrases_buffer);
HeapFree(GetProcessHeap(), 0, hlpfile->topic_map);
+ HeapFree(GetProcessHeap(), 0, hlpfile->help_on_file);
HeapFree(GetProcessHeap(), 0, hlpfile);
}
Modified: trunk/reactos/base/applications/winhlp32/hlpfile.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/hlpfile.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/hlpfile.h [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -132,6 +132,11 @@
unsigned numWindows;
HLPFILE_WINDOWINFO* windows;
HICON hIcon;
+
+ BOOL has_popup_color;
+ COLORREF popup_color;
+
+ LPSTR help_on_file;
} HLPFILE;
/*
Modified: trunk/reactos/base/applications/winhlp32/lang/da-DK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/da-DK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/da-DK.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -73,8 +73,6 @@
CAPTION "Index"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Annuller", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/de-DE.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -72,8 +72,6 @@
CAPTION "Index"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Abbrechen", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/en-US.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -72,8 +72,6 @@
CAPTION "Index"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Cancel", IDCANCEL, 120, 170, 50, 12
}
IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
Modified: trunk/reactos/base/applications/winhlp32/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/fr-FR.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -75,8 +75,6 @@
CAPTION "Index"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Annuler", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/ko-KR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/ko-KR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/ko-KR.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -73,10 +73,15 @@
CAPTION "À妽º"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "È®ÀÎ(&O)", IDOK, 40, 170, 50, 12
- PUSHBUTTON "Ãë¼Ò(&C)", IDCANCEL, 120, 170, 50, 12
}
+IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg"
+CAPTION "ã±â"
+{
+ LTEXT "¾ÆÁ÷ ±¸ÇöµÇÁö ¾ÊÀ½", -1, 10, 10, 180, 150
+}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/nl-NL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/nl-NL.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -72,8 +72,14 @@
CAPTION "Index"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Annuleren", IDCANCEL, 120, 170, 50, 12
+}
+
+IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg"
+CAPTION "Zoeken"
+{
+ LTEXT "Nog niet geimplementeerd", -1, 10, 10, 180, 150
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/no-NO.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -26,17 +26,17 @@
MENUITEM "&Åpne", MNID_FILE_OPEN
MENUITEM SEPARATOR
MENUITEM "Skriv &ut", MNID_FILE_PRINT
- MENUITEM "Opp&sett av skriveren ...", MNID_FILE_SETUP
+ MENUITEM "Opp&sett av skriveren...", MNID_FILE_SETUP
MENUITEM SEPARATOR
MENUITEM "&Avslutt", MNID_FILE_EXIT
}
POPUP "R&ediger" {
- MENUITEM "&Kopier ...", MNID_EDIT_COPYDLG
+ MENUITEM "&Kopier...", MNID_EDIT_COPYDLG
MENUITEM SEPARATOR
- MENUITEM "K&ommenter ...", MNID_EDIT_ANNOTATE
+ MENUITEM "K&ommenter...", MNID_EDIT_ANNOTATE
}
POPUP "&Bokmerke" {
- MENUITEM "&Definer ...", MNID_BKMK_DEFINE
+ MENUITEM "&Definer...", MNID_BKMK_DEFINE
}
POPUP "&Innstillinger" {
POPUP "Synlighet"
@@ -58,7 +58,7 @@
MENUITEM "&Hjelp til Hjelp", MNID_HELP_HELPON
MENUITEM "All&tid øverst", MNID_HELP_HELPTOP
MENUITEM SEPARATOR
- MENUITEM "&Informasjon ...", MNID_HELP_ABOUT
+ MENUITEM "&Informasjon...", MNID_HELP_ABOUT
#ifdef WINELIB
MENUITEM "&Om Wine", MNID_HELP_WINE
#endif
@@ -71,8 +71,6 @@
CAPTION "Innhold"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Avbryt", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
@@ -98,9 +96,9 @@
BEGIN
POPUP ""
BEGIN
- MENUITEM "Kommentar ...", MNID_CTXT_ANNOTATE
+ MENUITEM "Kommentar...", MNID_CTXT_ANNOTATE
MENUITEM "Kopier", MNID_CTXT_COPY
- MENUITEM "Skriv ut ...", MNID_CTXT_PRINT
+ MENUITEM "Skriv ut...", MNID_CTXT_PRINT
POPUP "Skriftstørrelse"
BEGIN
MENUITEM "Liten", MNID_CTXT_FONTS_SMALL
Modified: trunk/reactos/base/applications/winhlp32/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/pl-PL.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -73,8 +73,6 @@
CAPTION "Indeks"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Anuluj", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/ru-RU.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -71,8 +71,6 @@
CAPTION "Óêàçàòåëü"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&Îòìåíà", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
@@ -85,13 +83,13 @@
STID_NOT_IMPLEMENTED, "Íå ðåàëèçîâàííî"
STID_HLPFILE_ERROR_s, "Îøèáêà ïðè ÷òåíèè ôàéëà ïîìîùè `%s'"
STID_INDEX, "&Ñîäåðæàíèå"
-STID_CONTENTS, "Summary"
+STID_CONTENTS, "Íà÷àëî"
STID_BACK, "&Íàçàä"
STID_ALL_FILES, "Âñå ôàéëû (*.*)"
STID_HELP_FILES_HLP, "Ôàéëû ñïðàâêè (*.hlp)"
STID_FILE_NOT_FOUND_s "Íå ìîãó íàéòè '%s'. Âû õîòèòå íàéòè ýòîò ôàéë
ñàìîñòîÿòåëüíî?"
STID_NO_RICHEDIT "Íå ìîãó íàéòè richedit"
-STID_PSH_INDEX, "Help topics: "
+STID_PSH_INDEX, "Ñîäåðæàíèå: "
}
CONTEXT_MENU MENU LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
Modified: trunk/reactos/base/applications/winhlp32/lang/sl-SI.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lang/sl-SI.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lang/sl-SI.rc [iso-8859-1] Thu Aug 7
05:53:23 2008
@@ -73,8 +73,6 @@
CAPTION "Indeks"
{
LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_BORDER
- PUSHBUTTON "&V redu", IDOK, 40, 170, 50, 12
- PUSHBUTTON "&PrekliÄi", IDCANCEL, 120, 170, 50, 12
}
/* Strings */
Modified: trunk/reactos/base/applications/winhlp32/lex.yy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/lex.yy.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/lex.yy.c [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -387,7 +387,7 @@
* Help Viewer
*
* Copyright 1996 Ulrich Schmid
- * Copyright 2002 Eric Pouech
+ * Copyright 2002,2008 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -421,16 +421,22 @@
WINE_DEFAULT_DEBUG_CHANNEL(winhelp);
-static LPCSTR macroptr;
-static LPSTR strptr;
-static int quote_stack[32];
-static unsigned int quote_stk_idx = 0;
+struct lex_data {
+ LPCSTR macroptr;
+ LPSTR strptr;
+ int quote_stack[32];
+ unsigned quote_stk_idx;
+ LPSTR cache_string[32];
+ int cache_used;
+};
+static struct lex_data* lex_data = NULL;
+
struct lexret yylval;
#define YY_INPUT(buf,result,max_size)\
- if ((result = *macroptr ? 1 : 0)) buf[0] = *macroptr++;
-
-#line 434 "lex.yy.c"
+ if ((result = *lex_data->macroptr ? 1 : 0)) buf[0] = *lex_data->macroptr++;
+
+#line 440 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -581,10 +587,10 @@
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 49 "macro.lex.l"
-
-
-#line 588 "lex.yy.c"
+#line 55 "macro.lex.l"
+
+
+#line 594 "lex.yy.c"
if ( yy_init )
{
@@ -669,92 +675,94 @@
case 1:
YY_RULE_SETUP
-#line 51 "macro.lex.l"
+#line 57 "macro.lex.l"
yylval.integer = strtol(yytext, NULL, 10); return INTEGER;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 52 "macro.lex.l"
+#line 58 "macro.lex.l"
yylval.integer = strtol(yytext, NULL, 16); return INTEGER;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 54 "macro.lex.l"
+#line 60 "macro.lex.l"
return MACRO_Lookup(yytext, &yylval);
YY_BREAK
case 4:
-#line 57 "macro.lex.l"
+#line 63 "macro.lex.l"
case 5:
-#line 58 "macro.lex.l"
+#line 64 "macro.lex.l"
case 6:
-#line 59 "macro.lex.l"
+#line 65 "macro.lex.l"
case 7:
-#line 60 "macro.lex.l"
+#line 66 "macro.lex.l"
case 8:
-#line 61 "macro.lex.l"
+#line 67 "macro.lex.l"
case 9:
YY_RULE_SETUP
-#line 61 "macro.lex.l"
+#line 67 "macro.lex.l"
{
- if (quote_stk_idx == 0 ||
- (yytext[0] == '\"' && quote_stack[quote_stk_idx - 1] !=
'\"') ||
+ if (lex_data->quote_stk_idx == 0 ||
+ (yytext[0] == '\"' &&
lex_data->quote_stack[lex_data->quote_stk_idx - 1] != '\"') ||
(yytext[0] == '`'))
{
/* opening a new one */
- if (quote_stk_idx == 0)
+ if (lex_data->quote_stk_idx == 0)
{
- strptr = HeapAlloc(GetProcessHeap(), 0, strlen(macroptr) + 1);
- yylval.string = strptr;
+ assert(lex_data->cache_used < sizeof(lex_data->cache_string) /
sizeof(lex_data->cache_string[0]));
+ lex_data->strptr = lex_data->cache_string[lex_data->cache_used] =
HeapAlloc(GetProcessHeap(), 0, strlen(lex_data->macroptr) + 1);
+ yylval.string = lex_data->strptr;
+ lex_data->cache_used++;
BEGIN(quote);
}
- else *strptr++ = yytext[0];
- quote_stack[quote_stk_idx++] = yytext[0];
- assert(quote_stk_idx < sizeof(quote_stack) / sizeof(quote_stack[0]));
+ else *lex_data->strptr++ = yytext[0];
+ lex_data->quote_stack[lex_data->quote_stk_idx++] = yytext[0];
+ assert(lex_data->quote_stk_idx < sizeof(lex_data->quote_stack) /
sizeof(lex_data->quote_stack[0]));
}
else
{
if (yytext[0] == '`') assert(0);
/* close the current quote */
- if (--quote_stk_idx == 0)
+ if (--lex_data->quote_stk_idx == 0)
{
BEGIN INITIAL;
- *strptr++ = '\0';
+ *lex_data->strptr++ = '\0';
return STRING;
}
- else *strptr++ = yytext[0];
+ else *lex_data->strptr++ = yytext[0];
}
}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 91 "macro.lex.l"
-*strptr++ = yytext[0];
+#line 99 "macro.lex.l"
+*lex_data->strptr++ = yytext[0];
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 92 "macro.lex.l"
-*strptr++ = yytext[1];
+#line 100 "macro.lex.l"
+*lex_data->strptr++ = yytext[1];
YY_BREAK
case YY_STATE_EOF(quote):
-#line 93 "macro.lex.l"
+#line 101 "macro.lex.l"
return 0;
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 95 "macro.lex.l"
+#line 103 "macro.lex.l"
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 96 "macro.lex.l"
+#line 104 "macro.lex.l"
return yytext[0];
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 97 "macro.lex.l"
+#line 105 "macro.lex.l"
ECHO;
YY_BREAK
-#line 758 "lex.yy.c"
+#line 766 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1640,7 +1648,7 @@
return 0;
}
#endif
-#line 97 "macro.lex.l"
+#line 105 "macro.lex.l"
#if 0
@@ -1807,11 +1815,17 @@
BOOL MACRO_ExecuteMacro(LPCSTR macro)
{
+ struct lex_data curr_lex_data, *prev_lex_data;
+ BOOL ret = TRUE;
int t;
WINE_TRACE("%s\n", wine_dbgstr_a(macro));
- macroptr = macro;
+ prev_lex_data = lex_data;
+ lex_data = &curr_lex_data;
+
+ memset(lex_data, 0, sizeof(*lex_data));
+ lex_data->macroptr = macro;
while ((t = yylex()) != EMPTY)
{
@@ -1830,17 +1844,18 @@
}
switch (t = yylex())
{
- case EMPTY: return 1;
+ case EMPTY: goto done;
case ';': break;
- default: return 0;
+ default: ret = FALSE; goto done;
}
}
- HeapFree(GetProcessHeap(), 0, strptr);
- strptr = NULL;
- quote_stk_idx = 0;
-
- return 1;
+done:
+ for (t = 0; t < lex_data->cache_used; t++)
+ HeapFree(GetProcessHeap(), 0, lex_data->cache_string[t]);
+ lex_data = prev_lex_data;
+
+ return ret;
}
#ifndef yywrap
Modified: trunk/reactos/base/applications/winhlp32/macro.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/macro.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/macro.c [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -2,7 +2,7 @@
* Help Viewer
*
* Copyright 1996 Ulrich Schmid
- * Copyright 2002 Eric Pouech
+ * Copyright 2002, 2008 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -555,8 +555,14 @@
void CALLBACK MACRO_HelpOn(void)
{
- WINE_TRACE("()\n");
- MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" :
"winhelp.hlp", NULL);
+ LPCSTR file;
+
+ WINE_TRACE("()\n");
+ file = Globals.active_win->page->file->help_on_file;
+ if (!file)
+ file = (Globals.wVersion > 4) ? "winhlp32.hlp" :
"winhelp.hlp";
+
+ MACRO_JumpContents(file, NULL);
}
void CALLBACK MACRO_HelpOnTop(void)
@@ -890,12 +896,19 @@
void CALLBACK MACRO_SetHelpOnFile(LPCSTR str)
{
- WINE_FIXME("(\"%s\")\n", str);
-}
-
-void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
-{
- WINE_FIXME("(%u, %u, %u)\n", u1, u2, u3);
+ WINE_TRACE("(\"%s\")\n", str);
+
+ HeapFree(GetProcessHeap(), 0,
Globals.active_win->page->file->help_on_file);
+ Globals.active_win->page->file->help_on_file = HeapAlloc(GetProcessHeap(),
0, strlen(str) + 1);
+ if (Globals.active_win->page->file->help_on_file)
+ strcpy(Globals.active_win->page->file->help_on_file, str);
+}
+
+void CALLBACK MACRO_SetPopupColor(LONG r, LONG g, LONG b)
+{
+ WINE_TRACE("(%x, %x, %x)\n", r, g, b);
+ Globals.active_win->page->file->has_popup_color = TRUE;
+ Globals.active_win->page->file->popup_color = RGB(r, g, b);
}
void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3,
LPCSTR str4)
Modified: trunk/reactos/base/applications/winhlp32/macro.lex.l
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/macro.lex.l [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/macro.lex.l [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -3,7 +3,7 @@
* Help Viewer
*
* Copyright 1996 Ulrich Schmid
- * Copyright 2002 Eric Pouech
+ * Copyright 2002,2008 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -36,14 +36,20 @@
WINE_DEFAULT_DEBUG_CHANNEL(winhelp);
-static LPCSTR macroptr;
-static LPSTR strptr;
-static int quote_stack[32];
-static unsigned int quote_stk_idx = 0;
+struct lex_data {
+ LPCSTR macroptr;
+ LPSTR strptr;
+ int quote_stack[32];
+ unsigned quote_stk_idx;
+ LPSTR cache_string[32];
+ int cache_used;
+};
+static struct lex_data* lex_data = NULL;
+
struct lexret yylval;
#define YY_INPUT(buf,result,max_size)\
- if ((result = *macroptr ? 1 : 0)) buf[0] = *macroptr++;
+ if ((result = *lex_data->macroptr ? 1 : 0)) buf[0] = *lex_data->macroptr++;
%}
%%
@@ -59,37 +65,39 @@
<quote>\` |
<quote>\" |
<quote>\' {
- if (quote_stk_idx == 0 ||
- (yytext[0] == '\"' && quote_stack[quote_stk_idx - 1] !=
'\"') ||
+ if (lex_data->quote_stk_idx == 0 ||
+ (yytext[0] == '\"' &&
lex_data->quote_stack[lex_data->quote_stk_idx - 1] != '\"') ||
(yytext[0] == '`'))
{
/* opening a new one */
- if (quote_stk_idx == 0)
- {
- strptr = HeapAlloc(GetProcessHeap(), 0, strlen(macroptr) + 1);
- yylval.string = strptr;
+ if (lex_data->quote_stk_idx == 0)
+ {
+ assert(lex_data->cache_used < sizeof(lex_data->cache_string) /
sizeof(lex_data->cache_string[0]));
+ lex_data->strptr = lex_data->cache_string[lex_data->cache_used] =
HeapAlloc(GetProcessHeap(), 0, strlen(lex_data->macroptr) + 1);
+ yylval.string = lex_data->strptr;
+ lex_data->cache_used++;
BEGIN(quote);
}
- else *strptr++ = yytext[0];
- quote_stack[quote_stk_idx++] = yytext[0];
- assert(quote_stk_idx < sizeof(quote_stack) / sizeof(quote_stack[0]));
+ else *lex_data->strptr++ = yytext[0];
+ lex_data->quote_stack[lex_data->quote_stk_idx++] = yytext[0];
+ assert(lex_data->quote_stk_idx < sizeof(lex_data->quote_stack) /
sizeof(lex_data->quote_stack[0]));
}
else
{
if (yytext[0] == '`') assert(0);
/* close the current quote */
- if (--quote_stk_idx == 0)
+ if (--lex_data->quote_stk_idx == 0)
{
BEGIN INITIAL;
- *strptr++ = '\0';
+ *lex_data->strptr++ = '\0';
return STRING;
}
- else *strptr++ = yytext[0];
- }
-}
-
-<quote>. *strptr++ = yytext[0];
-<quote>\\. *strptr++ = yytext[1];
+ else *lex_data->strptr++ = yytext[0];
+ }
+}
+
+<quote>. *lex_data->strptr++ = yytext[0];
+<quote>\\. *lex_data->strptr++ = yytext[1];
<quote><<EOF>> return 0;
" "
@@ -260,11 +268,17 @@
BOOL MACRO_ExecuteMacro(LPCSTR macro)
{
+ struct lex_data curr_lex_data, *prev_lex_data;
+ BOOL ret = TRUE;
int t;
WINE_TRACE("%s\n", wine_dbgstr_a(macro));
- macroptr = macro;
+ prev_lex_data = lex_data;
+ lex_data = &curr_lex_data;
+
+ memset(lex_data, 0, sizeof(*lex_data));
+ lex_data->macroptr = macro;
while ((t = yylex()) != EMPTY)
{
@@ -283,17 +297,18 @@
}
switch (t = yylex())
{
- case EMPTY: return 1;
+ case EMPTY: goto done;
case ';': break;
- default: return 0;
- }
- }
-
- HeapFree(GetProcessHeap(), 0, strptr);
- strptr = NULL;
- quote_stk_idx = 0;
-
- return 1;
+ default: ret = FALSE; goto done;
+ }
+ }
+
+done:
+ for (t = 0; t < lex_data->cache_used; t++)
+ HeapFree(GetProcessHeap(), 0, lex_data->cache_string[t]);
+ lex_data = prev_lex_data;
+
+ return ret;
}
#ifndef yywrap
Modified: trunk/reactos/base/applications/winhlp32/winhelp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/winhelp.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/winhelp.c [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -5,6 +5,7 @@
* 2002 Sylvain Petreolle <spetreolle(a)yahoo.fr>
* 2002, 2008 Eric Pouech <eric.pouech(a)wanadoo.fr>
* 2004 Ken Belleau <jamez(a)ivic.qc.ca>
+ * 2008 Kirill K. Smirnov <lich(a)math.spbu.ru>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -58,7 +59,7 @@
static void WINHELP_SetupText(HWND hWnd, WINHELP_WINDOW *win, ULONG relative);
static void WINHELP_DeletePageLinks(HLPFILE_PAGE* page);
-WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL,
{{{NULL,NULL}},0}};
+WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL,
{{{NULL,NULL}},0}, NULL};
#define CTL_ID_BUTTON 0x700
#define CTL_ID_TEXT 0x701
@@ -228,7 +229,10 @@
wi.style = SW_SHOW;
wi.win_style = WS_POPUP | WS_BORDER;
- wi.sr_color = parent->info->sr_color;
+ if (parent->page->file->has_popup_color)
+ wi.sr_color = parent->page->file->popup_color;
+ else
+ wi.sr_color = parent->info->sr_color;
wi.nsr_color = 0xFFFFFF;
return &wi;
@@ -1098,6 +1102,8 @@
static void WINHELP_SetupText(HWND hTextWnd, WINHELP_WINDOW* win, ULONG relative)
{
+ /* At first clear area - needed by EM_POSFROMCHAR/EM_SETSCROLLPOS */
+ SendMessage(hTextWnd, WM_SETTEXT, 0, (LPARAM)"");
SendMessage(hTextWnd, WM_SETREDRAW, FALSE, 0);
SendMessage(hTextWnd, EM_SETBKGNDCOLOR, 0, (LPARAM)win->info->sr_color);
/* set word-wrap to window size (undocumented) */
@@ -1126,10 +1132,6 @@
SendMessage(hTextWnd, EM_POSFROMCHAR, (WPARAM)&ptl, cp ? cp - 1 : 0);
pt.x = 0; pt.y = ptl.y;
SendMessage(hTextWnd, EM_SETSCROLLPOS, 0, (LPARAM)&pt);
- }
- else
- {
- SendMessage(hTextWnd, WM_SETTEXT, 0, (LPARAM)"");
}
SendMessage(hTextWnd, WM_SETREDRAW, TRUE, 0);
InvalidateRect(hTextWnd, NULL, TRUE);
@@ -1169,10 +1171,21 @@
0, 0, 0, 0,
hWnd, (HMENU) button->wParam,
Globals.hInstance, 0);
- if (button->hWnd) {
+ if (button->hWnd)
+ {
if (Globals.button_proc == NULL)
+ {
+ NONCLIENTMETRICSW ncm;
Globals.button_proc = (WNDPROC) GetWindowLongPtr(button->hWnd,
GWLP_WNDPROC);
+
+ ncm.cbSize = sizeof(NONCLIENTMETRICSW);
+ SystemParametersInfoW(SPI_GETNONCLIENTMETRICS,
+ sizeof(NONCLIENTMETRICSW), &ncm, 0);
+ Globals.hButtonFont = CreateFontIndirectW(&ncm.lfMenuFont);
+ }
SetWindowLongPtr(button->hWnd, GWLP_WNDPROC, (LONG_PTR)
WINHELP_ButtonWndProc);
+ if (Globals.hButtonFont)
+ SendMessage(button->hWnd, WM_SETFONT,
(WPARAM)Globals.hButtonFont, TRUE);
}
}
hDc = GetDC(button->hWnd);
@@ -1558,12 +1571,6 @@
/**************************************************************************
* WINHELP_IndexDlgProc
*
- * Index dialog callback function.
- *
- * nResult passed to EndDialog:
- * 1: CANCEL button
- * >1: valid offset value +2.
- * EndDialog itself can return 0 (error).
*/
INT_PTR CALLBACK WINHELP_IndexDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -1579,6 +1586,15 @@
id->jump = FALSE;
id->offset = 1;
return TRUE;
+ case WM_COMMAND:
+ switch (HIWORD(wParam))
+ {
+ case LBN_DBLCLK:
+ if (LOWORD(wParam) == IDC_INDEXLIST)
+ SendMessage(GetParent(hWnd), PSM_PRESSBUTTON, PSBTN_OK, 0);
+ break;
+ }
+ break;
case WM_NOTIFY:
switch (((NMHDR*)lParam)->code)
{
Modified: trunk/reactos/base/applications/winhlp32/winhelp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32…
==============================================================================
--- trunk/reactos/base/applications/winhlp32/winhelp.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/winhelp.h [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -137,6 +137,7 @@
WNDPROC button_proc;
WINHELP_DLL* dlls;
WINHELP_PAGESET history;
+ HFONT hButtonFont;
} WINHELP_GLOBALS;
extern WINHELP_GLOBALS Globals;
Modified: trunk/reactos/base/applications/wordpad/En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/En.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/En.rc [iso-8859-1] Thu Aug 7 05:53:23 2008
@@ -234,4 +234,8 @@
"Are you sure that you wish to do this?"
STRING_INVALID_NUMBER, "Invalid number format"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not
supported"
-END
+ STRING_WRITE_FAILED, "Could not save the file."
+ STRING_WRITE_ACCESS_DENIED, "You do not have access to save the
file."
+ STRING_OPEN_FAILED, "Could not open the file."
+ STRING_OPEN_ACCESS_DENIED, "You do not have access to open the
file."
+END
Modified: trunk/reactos/base/applications/wordpad/Nl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/Nl.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/Nl.rc [iso-8859-1] Thu Aug 7 05:53:23 2008
@@ -1,5 +1,6 @@
/*
* Copyright 2006 by Hans Leidekker
+ * Copyright 2008 by Frans Kool
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -24,12 +25,12 @@
BEGIN
MENUITEM "&Nieuw...\tCtrl+N" ID_FILE_NEW
MENUITEM "&Openen...\tCtrl+O", ID_FILE_OPEN
- MENUITEM "O&pslaan\tCtrl+S", ID_FILE_SAVE
+ MENUITEM "Op&slaan\tCtrl+S", ID_FILE_SAVE
MENUITEM "Ops&laan als...", ID_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Print...\tCtrl+P", ID_PRINT
- MENUITEM "Print previe&w...", ID_PREVIEW
- MENUITEM "Pag&e setup...", ID_PRINTSETUP
+ MENUITEM "Print &voorbeeld...", ID_PREVIEW
+ MENUITEM "Pa&gina setup...", ID_PRINTSETUP
MENUITEM SEPARATOR
MENUITEM "&Afsluiten", ID_FILE_EXIT
END
@@ -44,9 +45,9 @@
MENUITEM "&Verwijderen\tDel", ID_EDIT_CLEAR
MENUITEM "&Alles selecteren\tCtrl+A", ID_EDIT_SELECTALL
MENUITEM SEPARATOR
- MENUITEM "&Find...\tCrtl+F", ID_FIND
- MENUITEM "Find &next\tF3", ID_FIND_NEXT
- MENUITEM "&Replace...\tCtrl+H", ID_REPLACE
+ MENUITEM "&Zoeken...\tCrtl+F", ID_FIND
+ MENUITEM "Zoek vo&lgende\tF3", ID_FIND_NEXT
+ MENUITEM "Ve&rvang...\tCtrl+H", ID_REPLACE
MENUITEM SEPARATOR
MENUITEM "Alleen &lezen", ID_EDIT_READONLY
MENUITEM "&Gewijzigd", ID_EDIT_MODIFIED
@@ -60,24 +61,24 @@
MENUITEM "&Haal tekst", ID_EDIT_GETTEXT
END
END
- POPUP "&View"
- BEGIN
- MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
- MENUITEM "&Formatbar", ID_TOGGLE_FORMATBAR
- MENUITEM "&Ruler", ID_TOGGLE_RULER
- MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
- MENUITEM SEPARATOR
- MENUITEM "&Options...", ID_VIEWPROPERTIES
- END
- POPUP "&Insert"
- BEGIN
- MENUITEM "&Date and time...", ID_DATETIME
+ POPUP "&Bekijken"
+ BEGIN
+ MENUITEM "&Toolbalk", ID_TOGGLE_TOOLBAR
+ MENUITEM "&Formaatbalk", ID_TOGGLE_FORMATBAR
+ MENUITEM "&Lineaal", ID_TOGGLE_RULER
+ MENUITEM "&Statusbalk", ID_TOGGLE_STATUSBAR
+ MENUITEM SEPARATOR
+ MENUITEM "&Opties...", ID_VIEWPROPERTIES
+ END
+ POPUP "&Invoegen"
+ BEGIN
+ MENUITEM "&Datum en tijd...", ID_DATETIME
END
POPUP "&Opmaak"
BEGIN
- MENUITEM "&Font...", ID_FONTSETTINGS
+ MENUITEM "&Lettertype...", ID_FONTSETTINGS
MENUITEM "&Bullet points" ID_BULLET
- MENUITEM "&Paragraph..." ID_PARAFORMAT
+ MENUITEM "&Paragraaf..." ID_PARAFORMAT
MENUITEM "&Tabs..." ID_TABSTOPS
POPUP "&Achtergrond"
BEGIN
@@ -87,7 +88,7 @@
END
POPUP "&Help"
BEGIN
- MENUITEM "&About Wine Wordpad" ID_ABOUT
+ MENUITEM "&Over Wine Wordpad" ID_ABOUT
END
END
@@ -100,48 +101,48 @@
MENUITEM "&Plakken", ID_EDIT_PASTE
MENUITEM SEPARATOR
MENUITEM "&Bullet points" ID_BULLET
- MENUITEM "&Paragraph...", ID_PARAFORMAT
+ MENUITEM "&Paragraaf...", ID_PARAFORMAT
END
END
IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "Date and time"
+CAPTION "Datum en tijd"
FONT 10, "MS Sans Serif"
BEGIN
- LTEXT "Available formats",0,3,2,100,15
+ LTEXT "Beschikbare formaten",0,3,2,100,15
LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,87,12,40,12
- PUSHBUTTON "&Cancel",IDCANCEL,87,26,40,12
+ PUSHBUTTON "&Annuleren",IDCANCEL,87,26,40,12
END
IDD_NEWFILE DIALOG DISCARDABLE 30, 20, 140, 80
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-CAPTION "New"
+CAPTION "Nieuw"
FONT 10, "MS Sans Serif"
BEGIN
- LTEXT "New document type",0,3,2,100,15
+ LTEXT "Nieuw document type",0,3,2,100,15
LISTBOX IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT
PUSHBUTTON "&OK",IDOK,97,12,40,12
- PUSHBUTTON "&Cancel",IDCANCEL,97,26,40,12
+ PUSHBUTTON "&Annuleren",IDCANCEL,97,26,40,12
END
IDD_PARAFORMAT DIALOG DISCARDABLE 30, 20, 200, 110
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-Caption "Paragraph format"
+Caption "Paragraaf formaat"
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Indentation", 0, 10, 10, 120, 68
- LTEXT "Left", 0, 15, 22, 40, 13
+ LTEXT "Links", 0, 15, 22, 40, 13
EDITTEXT IDC_PARA_LEFT, 55, 20, 60, 13
- LTEXT "Right", 0, 15, 40, 40, 13
+ LTEXT "Rechts", 0, 15, 40, 40, 13
EDITTEXT IDC_PARA_RIGHT, 55, 38, 60, 13
- LTEXT "First line", 0, 15, 58, 40, 13
+ LTEXT "Eerste regel", 0, 15, 58, 40, 13
EDITTEXT IDC_PARA_FIRST, 55, 56, 60, 13
- LTEXT "Alignment", 0, 15, 87, 40, 13
+ LTEXT "Uitlijning", 0, 15, 87, 40, 13
COMBOBOX IDC_PARA_ALIGN, 55, 85, 60, 60, CBS_DROPDOWNLIST
PUSHBUTTON "&OK", IDOK, 137, 15, 50, 15
- PUSHBUTTON "&Cancel", IDCANCEL, 137, 33, 50, 15
+ PUSHBUTTON "&Annuleren", IDCANCEL, 137, 33, 50, 15
END
IDD_TABSTOPS DIALOG DISCARDABLE 30, 20, 200, 110
@@ -151,11 +152,11 @@
BEGIN
GROUPBOX "Tab stops", 0, 10, 10, 120, 90
COMBOBOX IDC_TABSTOPS, 20, 20, 100, 60, CBS_SIMPLE | CBS_SORT
- DEFPUSHBUTTON "&Add", ID_TAB_ADD, 20, 80, 45, 15
- PUSHBUTTON "&Remove", ID_TAB_DEL, 72, 80, 45, 15
+ DEFPUSHBUTTON "&Toevoegen", ID_TAB_ADD, 20, 80, 45, 15
+ PUSHBUTTON "&Verwijderen", ID_TAB_DEL, 72, 80, 45, 15
PUSHBUTTON "&OK", IDOK, 137, 15, 50, 15
- PUSHBUTTON "&Cancel", IDCANCEL, 137, 33, 50, 15
- PUSHBUTTON "Remove al&l", ID_TAB_EMPTY, 137, 51, 50, 15
+ PUSHBUTTON "&Annuleren", IDCANCEL, 137, 33, 50, 15
+ PUSHBUTTON "Verwijder al&len", ID_TAB_EMPTY, 137, 51, 50, 15
END
IDD_FORMATOPTS DIALOG DISCARDABLE 0, 0, 280, 110
@@ -163,59 +164,59 @@
Caption ""
FONT 8, "MS Shell Dlg"
BEGIN
- GROUPBOX "Line wrapping", 0, 10, 10, 130, 85
- RADIOBUTTON "Wrap text by the &window border", IDC_PAGEFMT_WW, 18, 25,
117, 15
- RADIOBUTTON "Wrap text by the &margin", IDC_PAGEFMT_WM, 18, 45, 117,
15
+ GROUPBOX "Regel afbreken", 0, 10, 10, 130, 85
+ RADIOBUTTON "Breek tekst af bij &venster rand", IDC_PAGEFMT_WW, 18, 25,
117, 15
+ RADIOBUTTON "Breek tekst af bij de &marge", IDC_PAGEFMT_WM, 18, 45,
117, 15
GROUPBOX "Toolbars", 0, 150, 10, 120, 85
- CHECKBOX "&Toolbar", IDC_PAGEFMT_TB, 160, 20, 80, 15
- CHECKBOX "&Formatbar", IDC_PAGEFMT_FB, 160, 38, 80, 15
- CHECKBOX "&Ruler", IDC_PAGEFMT_RU, 160, 56, 80, 15
- CHECKBOX "&Statusbar", IDC_PAGEFMT_SB, 160, 74, 80, 15
+ CHECKBOX "&Toolbalk", IDC_PAGEFMT_TB, 160, 20, 80, 15
+ CHECKBOX "&Formaatbalk", IDC_PAGEFMT_FB, 160, 38, 80, 15
+ CHECKBOX "&Lineaal", IDC_PAGEFMT_RU, 160, 56, 80, 15
+ CHECKBOX "&Statusbalk", IDC_PAGEFMT_SB, 160, 74, 80, 15
LTEXT "", IDC_PAGEFMT_ID, 0,0,0,0
END
STRINGTABLE DISCARDABLE
BEGIN
- STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)"
- STRING_TEXT_FILES_TXT, "Text documents (*.txt)"
- STRING_TEXT_FILES_UNICODE_TXT, "Unicode text document (*.txt)"
- STRING_ALL_FILES, "All documents (*.*)"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- STRING_ALIGN_LEFT, "Left"
- STRING_ALIGN_RIGHT, "Right"
- STRING_ALIGN_CENTER, "Center"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- STRING_NEWFILE_RICHTEXT, "Rich text document"
- STRING_NEWFILE_TXT, "Text document"
- STRING_NEWFILE_TXT_UNICODE, "Unicode text document"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- STRING_PRINTER_FILES_PRN, "Printer files (*.PRN)"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- STRING_VIEWPROPS_TITLE, "Options"
- STRING_VIEWPROPS_TEXT, "Text"
- STRING_VIEWPROPS_RICHTEXT, "Rich text"
+ STRING_RICHTEXT_FILES_RTF, "Rich text formaat (*.rtf)"
+ STRING_TEXT_FILES_TXT, "Tekst documenten (*.txt)"
+ STRING_TEXT_FILES_UNICODE_TXT, "Unicode tekst document (*.txt)"
+ STRING_ALL_FILES, "Alle documenten (*.*)"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ STRING_ALIGN_LEFT, "Links"
+ STRING_ALIGN_RIGHT, "Rechts"
+ STRING_ALIGN_CENTER, "Gecentreerd"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ STRING_NEWFILE_RICHTEXT, "Rich tekst document"
+ STRING_NEWFILE_TXT, "Tekst document"
+ STRING_NEWFILE_TXT_UNICODE, "Unicode tekst document"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ STRING_PRINTER_FILES_PRN, "Printer bestanden (*.PRN)"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ STRING_VIEWPROPS_TITLE, "Opties"
+ STRING_VIEWPROPS_TEXT, "Tekst"
+ STRING_VIEWPROPS_RICHTEXT, "Rich tekst"
END
STRINGTABLE DISCARDABLE
BEGIN
STRING_PREVIEW_PRINT, "Print"
- STRING_PREVIEW_NEXTPAGE, "Next page"
- STRING_PREVIEW_PREVPAGE, "Previous page"
- STRING_PREVIEW_TWOPAGES, "Two pages"
- STRING_PREVIEW_ONEPAGE, "One page"
- STRING_PREVIEW_CLOSE, "Close"
+ STRING_PREVIEW_NEXTPAGE, "Volgende pagina"
+ STRING_PREVIEW_PREVPAGE, "Vorige pagina"
+ STRING_PREVIEW_TWOPAGES, "Twee pagina's"
+ STRING_PREVIEW_ONEPAGE, "Een pagina"
+ STRING_PREVIEW_CLOSE, "Sluiten"
END
STRINGTABLE DISCARDABLE
@@ -226,12 +227,16 @@
STRINGTABLE DISCARDABLE
BEGIN
STRING_DEFAULT_FILENAME, "Document"
- STRING_PROMPT_SAVE_CHANGES, "Save changes to '%s'?"
- STRING_SEARCH_FINISHED, "Finished searching the document."
- STRING_LOAD_RICHED_FAILED, "Failed to load the RichEdit library."
- STRING_SAVE_LOSEFORMATTING, "You have chosen to save in plain text format,
" \
- "which will cause all formatting to be lost. "
\
- "Are you sure that you wish to do this?"
- STRING_INVALID_NUMBER, "Invalid number format"
- STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not
supported"
-END
+ STRING_PROMPT_SAVE_CHANGES, "Wijzigingen opslaan van '%s'?"
+ STRING_SEARCH_FINISHED, "Doorzoeken van document beeindigd."
+ STRING_LOAD_RICHED_FAILED, "Laden van de RichEdit library is mislukt."
+ STRING_SAVE_LOSEFORMATTING, "U koos voor opslaan in gewoon tekst formaat,
" \
+ "waardoor alle formatering verloren zal gaan.
" \
+ "Weet u zeker dat u dit wilt?"
+ STRING_INVALID_NUMBER, "Foutief nummer formaat"
+ STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documenten zijn niet
ondersteund"
+ STRING_WRITE_FAILED, "Bestand kon niet opgeslagen worden."
+ STRING_WRITE_ACCESS_DENIED, "Onvoldoende rechten om het bestand op te
slaan."
+ STRING_OPEN_FAILED, "Bestand kon niet geopend worden."
+ STRING_OPEN_ACCESS_DENIED, "Onvoldoende rechten om het bestand te
openen."
+END
Modified: trunk/reactos/base/applications/wordpad/No.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/No.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/No.rc [iso-8859-1] Thu Aug 7 05:53:23 2008
@@ -234,4 +234,8 @@
"sikker på at du vil fortsette?"
STRING_INVALID_NUMBER, "Ugyldig tallformat"
STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE storage documents are not
supported"
-END
+ STRING_WRITE_FAILED, "Klarte ikke lagre filen."
+ STRING_WRITE_ACCESS_DENIED, "Du har ikke tilgang til å lagre filen."
+ STRING_OPEN_FAILED, "Klarte ikke åpne filen."
+ STRING_OPEN_ACCESS_DENIED, "Du har ikke tilgang til å åpne filen."
+END
Modified: trunk/reactos/base/applications/wordpad/print.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/print.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/print.c [iso-8859-1] Thu Aug 7 05:53:23 2008
@@ -814,7 +814,7 @@
InvalidateRect(hWnd, &rc, TRUE);
}
-LRESULT preview_command(HWND hWnd, WPARAM wParam, LPARAM lParam)
+LRESULT preview_command(HWND hWnd, WPARAM wParam)
{
switch(LOWORD(wParam))
{
Modified: trunk/reactos/base/applications/wordpad/wordpad.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/wordpad.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/wordpad.c [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -698,6 +698,22 @@
target_device(hMainWnd, wordWrap[reg_formatindex(fileFormat)]);
}
+static void ShowOpenError(DWORD Code)
+{
+ LPWSTR Message;
+
+ switch(Code)
+ {
+ case ERROR_ACCESS_DENIED:
+ Message = MAKEINTRESOURCEW(STRING_OPEN_ACCESS_DENIED);
+ break;
+
+ default:
+ Message = MAKEINTRESOURCEW(STRING_OPEN_FAILED);
+ }
+ MessageBoxW(hMainWnd, Message, wszAppTitle, MB_ICONEXCLAMATION | MB_OK);
+}
+
static void DoOpenFile(LPCWSTR szOpenFileName)
{
HANDLE hFile;
@@ -709,7 +725,10 @@
hFile = CreateFileW(szOpenFileName, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
+ {
+ ShowOpenError(GetLastError());
return;
+ }
ReadFile(hFile, fileStart, 5, &readOut, NULL);
SetFilePointer(hFile, 0, NULL, FILE_BEGIN);
@@ -753,6 +772,22 @@
update_font_list();
}
+static void ShowWriteError(DWORD Code)
+{
+ LPWSTR Message;
+
+ switch(Code)
+ {
+ case ERROR_ACCESS_DENIED:
+ Message = MAKEINTRESOURCEW(STRING_WRITE_ACCESS_DENIED);
+ break;
+
+ default:
+ Message = MAKEINTRESOURCEW(STRING_WRITE_FAILED);
+ }
+ MessageBoxW(hMainWnd, Message, wszAppTitle, MB_ICONEXCLAMATION | MB_OK);
+}
+
static void DoSaveFile(LPCWSTR wszSaveFileName, WPARAM format)
{
HANDLE hFile;
@@ -763,7 +798,10 @@
FILE_ATTRIBUTE_NORMAL, NULL);
if(hFile == INVALID_HANDLE_VALUE)
+ {
+ ShowWriteError(GetLastError());
return;
+ }
if(format == (SF_TEXT | SF_UNICODE))
{
@@ -2429,7 +2467,7 @@
case WM_COMMAND:
if(preview_isactive())
{
- return preview_command( hWnd, wParam, lParam );
+ return preview_command( hWnd, wParam );
}
return OnCommand( hWnd, wParam, lParam );
@@ -2532,7 +2570,6 @@
set_caption(NULL);
set_bar_states();
set_fileformat(SF_RTF);
- SendMessageW(hEditorWnd, EM_EMPTYUNDOBUFFER, 0, 0);
hPopupMenu = LoadMenuW(hInstance, MAKEINTRESOURCEW(IDM_POPUP));
get_default_printer_opts();
target_device(hMainWnd, wordWrap[reg_formatindex(fileFormat)]);
Modified: trunk/reactos/base/applications/wordpad/wordpad.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/…
==============================================================================
--- trunk/reactos/base/applications/wordpad/wordpad.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/wordpad.h [iso-8859-1] Thu Aug 7 05:53:23
2008
@@ -193,6 +193,10 @@
#define STRING_SAVE_LOSEFORMATTING 1704
#define STRING_INVALID_NUMBER 1705
#define STRING_OLE_STORAGE_NOT_SUPPORTED 1706
+#define STRING_WRITE_FAILED 1707
+#define STRING_WRITE_ACCESS_DENIED 1708
+#define STRING_OPEN_FAILED 1709
+#define STRING_OPEN_ACCESS_DENIED 1710
LPWSTR file_basename(LPWSTR);
@@ -200,7 +204,7 @@
void dialog_print(HWND, LPWSTR);
void target_device(HWND, DWORD);
void print_quick(LPWSTR);
-LRESULT preview_command(HWND, WPARAM, LPARAM);
+LRESULT preview_command(HWND, WPARAM);
void init_preview(HWND, LPWSTR);
void close_preview(HWND);
BOOL preview_isactive(void);