Commit 03287451 authored by Marcel Baur's avatar Marcel Baur Committed by Alexandre Julliard

- Added new IDS_NOTSAVED ressource (needs translation in *.rc)

- Improved printing support (not yet complete) - Improved file drag and drop (should now work) - General code cleanup
parent e518cba5
Sat Feb 6 20:25:25 1999 Marcel Baur <mbaur@g26.ethz.ch>
- Added new IDS_NOTSAVED ressource (needs translation in *.rc)
- Improved printing support (not yet complete)
- Improved file drag and drop (should now work)
- General code cleanup
Thu Jan 28 18:17:08 1999 Jukka Iivonen <iivonen@iki.fi>
* [Fi.rc] [main.c] [Makefile.in]
Added Finnish language support.
Sun Oct 18 14:11:42 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [??.rc], [TODO], [dialog.c], [dialog.h], [language.c],
[language.h], [license.c], [license.h], [main.c], [main.h],
[notepad.rc]:
- Fixed GetOpenFileName and GetSaveFileName dialogs.
- Fixed Print dialog and introduced PrinterSetup dialog.
- Fixed PageSetup dialog: values are now correctly initialized
(had to change all *.rc files)
- Preliminary file drag and drop support.
Fri Jun 12 23:29:44 1998 Marcel Baur <mbaur@g26.ethz.ch>
- Fixed GetDateFormat()->GetTimeFormat() for locale time.
Mon May 25 14:30:00 1998 Henrik Olsen <henrik@iaeste.dk>
* [Da.rc]
- Added Danish language support.
Fri May 15 23:59:22 1998 Marcel Baur <mbaur@g26.ethz.ch>
- Date/Time now uses locale-specific formats
- Language-specific window caption, displays file being edited.
- Started with parsing of command line settings
- Started with DoOpenFile, DoCloseFile, DoSaveFile logics
- Prompt user to save settings when closing a file
-> Introduced a new message box (not yet finished)
- Fixed minor features (missing IDS in main.h, ...)
Sun Mar 29 20:29:41 1998 Laurent Buffler <laurent@bluewin.ch>
* [Fr.rc]
- Added French language support.
Fri Feb 27 21:03:37 1998 Karl Backstrm <karl_b@geocities.com>
- Fixed some minor features.
Sat Feb 14 17:42:29 1998 Karl Backstrm <karl_b@geocities.com>
* NEW [language.c] [language.h]
- Takes care of all language related stuff.
- A new [programs] in .winerc is in use.
Tue Feb 10 23:34:08 1998 Marcel Baur <mbaur@g26.ethz.ch>
- Fixed broken language menus
Fri Feb 06 23.54.35 1998 Karl Backstrm <karl_b@geocities.com>
* [main.c] [main.h] [notepad.rc]
- Fixed language support for menus.
* NEW [dialog.c] [dialog.h]
- Moved all menu and dialog related stuff here.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [Sw.rc]
- Added/updated Swedish language support.
Tue Dec 23 23:35:04 1997 Marcel Baur <mbaur@g26.ethz.ch>
- Fixed lots of bugs w/ resources in *.rc
- moved [notepad.c] into [main.c]
- moved [notepad.h] into [main.h]
Fri Dec 05 20:51:55 1997 Marcel Baur <mbaur@g26.ethz.ch>
* [notepad.c] [notepad.h] [notepad.rc] [En.rc] [De.rc]
[license.c] [license.h] [License_En.c]
[README] [TODO] [ChangeLog]
- Originals by Marcel Baur
Sun Oct 18 14:11:42 1998 Alexandre Julliard <julliard@winehq.com>
* Da.rc, De.rc, En.rc, Fr.rc, Sw.rc, TODO, dialog.c, dialog.h, language.c, language.h, license.c, license.h, main.c, main.h, notepad.rc:
Marcel Baur <mbaur@g26.ethz.ch>
Fixed GetOpenFileName and GetSaveFileName dialogs.
Fixed Print dialog and introduced PrinterSetup dialog.
Fixed PageSetup dialog: values are now correctly initialized (had to
change all *.rc files)
Preliminary file drag and drop support.
Fri Jun 12 23:29:44 1998 Marcel Baur <mbaur@g26.ethz.ch>
* Fixed GetDateFormat()->GetTimeFormat() for locale time.
Mon May 25 14:30:00 1998 Henrik Olsen <henrik@iaeste.dk>
* [Da.rc]
Added Danish language support.
Fri May 15 23:59:22 1998 Marcel Baur <mbaur@g26.ethz.ch>
* Date/Time now uses locale-specific formats
* Language-specific window caption, displays file being edited.
* Started with parsing of command line settings
* Started with DoOpenFile, DoCloseFile, DoSaveFile logics
* Prompt user to save settings when closing a file
-> Introduced a new message box (not yet finished)
* Fixed minor features (missing IDS in main.h, ...)
Sun Mar 29 20:29:41 1998 Laurent Buffler <laurent@bluewin.ch>
* [Fr.rc]
Added French language support.
Fri Feb 27 21:03:37 1998 Karl Backstrm <karl_b@geocities.com>
* Fixed some minor features.
Sat Feb 14 17:42:29 1998 Karl Backstrm <karl_b@geocities.com>
* NEW [language.c] [language.h]
Takes care of all language related stuff.
A new [programs] in .winerc is in use.
Tue Feb 10 23:34:08 1998 Marcel Baur <mbaur@g26.ethz.ch>
* Fixed broken language menus
Fri Feb 06 23.54.35 1998 Karl Backstrm <karl_b@geocities.com>
* [main.c] [main.h] [notepad.rc]
Fixed language support for menus.
* NEW [dialog.c] [dialog.h]
Moved all menu and dialog related stuff here.
Sun Jan 18 23:05:04 1998 Karl Backstrm <karl_b@geocities.com>
* [Sw.rc]
Added/updated Swedish language support.
Tue Dec 23 23:35:04 1997 Marcel Baur <mbaur@g26.ethz.ch>
* Fixed lots of bugs w/ resources in *.rc
* moved [notepad.c] into [main.c]
* moved [notepad.h] into [main.h]
Fri Dec 05 20:51:55 1997 Marcel Baur <mbaur@g26.ethz.ch>
* [notepad.c] [notepad.h] [notepad.rc] [En.rc] [De.rc]
[license.c] [license.h] [License_En.c]
[README] [TODO] [ChangeLog]
Originals by Marcel Baur
......@@ -89,6 +89,11 @@
#define STRING_NOTEXT "Du har ikke skrevet noget tekst. \
\nSkriv noget tekst, og prøv så igen"
/* FIXME: */
#define STRING_NOTSAVED "Filen '%s'\n has been modified.\n\n \
Would you like to save the changes ?"
#define STRING_NOTFOUND "Kan ikke finde '%s'."
#define STRING_OUT_OF_MEMORY "Der er ikke nok hukommelse til at udføre \
......
......@@ -92,6 +92,9 @@ Benutzen Sie bitte einen anderen Editor, um diese Datei zu bearbeiten."
gespeichert\n werden könnte. Geben Sie Text ein, und versuchen Sie es \
\nerneut."
#define STRING_NOTSAVED "Datei %s\n wurde geaendert.\n\n \
Moechten Sie die Aenderungen speichern ?"
#define STRING_NOTFOUND "'%s' kann nicht gefunden werden."
#define STRING_OUT_OF_MEMORY "Nicht genügend Arbeitsspeicher, \
......
......@@ -91,6 +91,9 @@ Please use a different editor."
#define STRING_NOTEXT "You didn't enter any text. \
\nPlease type something and try again"
#define STRING_NOTSAVED "File '%s'\nhas been modified\n\n \
Would you like to save the changes ?"
#define STRING_NOTFOUND "'%s' can not be found."
#define STRING_OUT_OF_MEMORY "Not enough memory to complete this \
......
......@@ -91,6 +91,11 @@ Use otro editor."
#define STRING_NOTEXT "Vd. no escribi nada. \
\nPor favor escriba algo y pruebe de vuelta"
/* FIXME */
#define STRING_NOTSAVED "El archivo '%s'\n has been changed\n\n \
Would you like to save your changes ?"
#define STRING_NOTFOUND "no se encontr '%s'."
#define STRING_OUT_OF_MEMORY "No hay suficiente memoria para terminar \
......
......@@ -90,6 +90,11 @@ Please use a different editor."
#define STRING_NOTEXT "Et syttnyt lainkaan teksti. \
\nKirjoita jotain ja yrit uudelleen"
/* FIXME */
#define STRING_NOTSAVED "File '%s'\nhas been modified\n\n \
Would you like to save your changes ?"
#define STRING_NOTFOUND "'%s' ei lydy."
#define STRING_OUT_OF_MEMORY "Muistia ei ole riittvsti tmn \
......
......@@ -91,6 +91,11 @@ Veuillez utiliser un autre diteur."
#define STRING_NOTEXT "Vous n'avez pas entré de texte. \
\nVeuillez taper quelque chose et recommencer"
/* FIXME */
#define STRING_NOTSAVED "Le fichier '%s'\n\n a change\n
Would you like to save your changes ?"
#define STRING_NOTFOUND "'%s' introuvable."
#define STRING_OUT_OF_MEMORY "Pas assez de mémoire pour finir cette tâche. \
......
......@@ -44,5 +44,5 @@ EXCEPT AS OTHERWISE RESTRICTED BY LAW, THIS WORK IS PROVIDED\
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.";
LICENSE WineLicense_En = {License_En, LicenseCaption_En,
NoWarranty_En, NoWarrantyCaption_En};
NoWarranty_En, NoWarrantyCaption_En};
......@@ -2,6 +2,10 @@
NOTEPAD for WINE
================
There is now a web page dedicated to Notepad for Wine I am maintaing.
Please see http://www.vis.inf.ethz.ch/students/mbaur/notepad for
latest info about Notepad. This page also includes screenshots.
This is an early release of notepad and most of the code is still
broken. It will probably compile but the application will not make
much sense yet.
......@@ -9,11 +13,5 @@ much sense yet.
Please see file TODO for things to do and keep the file ChangeLog
up to date.
Code is currently under heavy construction. Nearly all files will
change until next release. You can speed up development of notepad
if you send patches and additions directly to my personal email
address <mbaur@g26.ethz.ch>.
I also try to read news:comp.emulators.ms-windows.wine frequently,
so I can also integrate patches posted via usenet.
I also try to read wine-devel@winehq.com frequently.
\ No newline at end of file
......
......@@ -91,6 +91,11 @@ Anvnd en annan editor."
#define STRING_NOTEXT "Du skrev inte in ngon text. \
\nSkriv ngot och frsk sedan igen"
/* FIXME */
#define STRING_NOTSAVED "Filen '%s'\nhas been modified\n\n \
Would you like to save your changes ?"
#define STRING_NOTFOUND "'%s' hittades inte."
#define STRING_OUT_OF_MEMORY "Inte tillrkligt med minne fr att slutfra \
......
......@@ -2,9 +2,8 @@
- Logfile feature
if Notepad opens a file with ".LOG" (really?) in the first line, the
current date/time should automatically be inserted into the last line
of the file at startup. This feature is not well documented.
of the file at startup.
- Notepad segfaults when selecting "Find" button in "Search" dialog.
This is probably a problem related to Winelib.
- create new *.rc files for all languages you know.
......@@ -37,6 +37,3 @@ VOID DIALOG_HelpAboutWine(VOID);
VOID DIALOG_PageSetup(VOID);
VOID DIALOG_TimeDate(VOID);
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
......@@ -2,7 +2,7 @@
* Notepad
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
*/
#include <stdio.h>
......@@ -48,10 +48,15 @@ void LANGUAGE_UpdateWindowCaption(void) {
static BOOL LANGUAGE_LoadStringOther(UINT num, UINT ids, LPSTR str, UINT len)
{
BOOL bOk;
ids -= Globals.wStringTableOffset;
ids += num * 0x100;
return(LoadString(Globals.hInstance, ids, str, len));
};
bOk = LoadString(Globals.hInstance, ids, str, len);
return(bOk);
}
......@@ -145,15 +150,13 @@ VOID LANGUAGE_Init(VOID)
#else
CHAR buffer[MAX_PATHNAME_LEN], *p;
#ifndef LCC
PROFILE_GetWineIniString("programs", "language", "language",
buffer, sizeof(buffer));
#endif
Globals.lpszLanguage = p = LocalLock(LocalAlloc(LMEM_FIXED, lstrlen(buffer)+1));
strcpy(p, buffer);
/* hmemcpy(p, buffer, 1 + lstrlen(buffer)); */
#endif
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
......@@ -2,7 +2,7 @@
* Notepad
*
* Copyright 1997,98 Marcel Baur <mbaur@g26.ethz.ch>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
* Copyright 1998 Karl Backstrm <karl_b@geocities.com>
*/
VOID LANGUAGE_UpdateWindowCaption(VOID);
......@@ -11,6 +11,3 @@ VOID LANGUAGE_SelectByName(LPCSTR lang);
VOID LANGUAGE_DefaultHandle(WPARAM wParam);
VOID LANGUAGE_Init(VOID);
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
/*
* lcc.h
*
* Copyright 1999 by Marcel Baur <mbaur@g26.ethz.ch>
* To be distributed under the Wine license
*
* This file is only required when compiling Notepad using LCC-WIN32
*/
#ifdef LCC
#include "assert.h"
#include "shellapi.h"
#define HANDLE32 HANDLE
#define INVALID_HANDLE_VALUE32 INVALID_HANDLE_VALUE
#define WINE_RELEASE_INFO "Compiled using LCC"
#define OIC_WINEICON 0
#ifndef LCC_HASASSERT
/* prevent multiple inclusion of assert methods */
int _assertfail(char *__msg, char *__cond, char *__file, int __line) {
CHAR szMessage[255];
strcat(szMessage, "Assert failure ");
strcat(szMessage, __msg);
strcat(szMessage, "\n");
strcat(szMessage, "in line ");
strcat(szMessage, "of file ");
strcat(szMessage, __line);
MessageBox(0, szMessage, "ERROR: ASSERT FAILURE", MB_ICONEXCLAMATION);
}
#endif
#endif
#
# Makefile for LCC-WIN32
#
# Copyright 1999 Marcel Baur (mbaur@g26.ethz.ch)
# To be distributed under the Wine License
#
# Use lccmake -f lccmake to use this makefile
#
# See http://www.cs.virgina.edu/~lcc-win32 for
# information about LCC-WIN32
#
#
# LCC home directory
#
LCCHOME=C:\LCC
#
# individual flags for LCC, LCCLNK, LRC
#
CFLAGS=-O -DLCC -g2
LNKFLAGS=-O winepad.exe -subsystem windows
LRCFLAGS=/r /v /m
#
# available languages
#
LANGUAGES=Da De En Es Fi Fr Sw
#
# default language
#
LANGUAGE=En
#
# required include libraries
#
LIBS=SHELL32.LIB
#
# object files
#
OBJS=main.obj dialog.obj license.obj license_En.obj language.obj
#
# ---[ it is save not to change anything behind this line ]--- #
#
winepad.exe: $(OBJS) resources
$(LCCHOME)\bin\lcclnk $(LNKFLAGS) $(OBJS) notepad.res $(LIBS)
@echo *** "winepad.exe" successfully created
resources: $(RESOURCES)
FOR %%i IN ($(LANGUAGES)) DO $(LCCHOME)\bin\lrc $(LRCFLAGS) %%i.rc
copy /b $(LANGUAGE).res notepad.res
clean:
if exist winepad.exe erase winepad.exe
if exist main.obj erase main.obj
if exist dialog.obj erase dialog.obj
if exist license.obj erase license.obj
if exist license_En.obj erase license_En.obj
if exist language.obj erase language.obj
if exist notepad.res erase notepad.res
FOR %%i IN ($(LANGUAGES)) DO IF EXIST %%i.res erase %%i.res
FOR %%i IN ($(LANGUAGES)) DO IF EXIST %%i.map erase %%i.map
help:
@echo lccmake help - display this help
@echo lccmake - to compile winepad.exe
@echo lccmake resources - to compile .res files
@echo lccmake clean - to clean up
#
# some more targets (for novice users and compatibility reasons only)
#
distclean: clean
@echo *** next time please use "lccmake clean"
all: winepad.exe
@echo *** next time please use "lccmake" (without parameters)
#
# please make sure that at least one empty line follows this statement
#
......@@ -38,7 +38,7 @@ VOID WineLicense(HWND Wnd, LPCSTR Language)
LICENSE *License = SelectLanguage(Language);
MessageBox(Wnd, License->License, License->LicenseCaption,
MB_ICONINFORMATION | MB_OK);
MB_ICONINFORMATION | MB_OK);
}
......@@ -47,6 +47,6 @@ VOID WineWarranty(HWND Wnd, LPCSTR Language)
LICENSE *License = SelectLanguage(Language);
MessageBox(Wnd, License->Warranty, License->WarrantyCaption,
MB_ICONEXCLAMATION | MB_OK);
MB_ICONEXCLAMATION | MB_OK);
}
......@@ -7,7 +7,13 @@
#include <stdio.h>
#include "windows.h"
#ifdef LCC
#include "lcc.h"
#else
#include "shell.h"
#endif
#include "main.h"
#include "license.h"
#include "dialog.h"
......@@ -20,8 +26,10 @@
void LIBWINE_Register_Da();
void LIBWINE_Register_De();
void LIBWINE_Register_En();
void LIBWINE_Register_Sw();
void LIBWINE_Register_Es();
void LIBWINE_Register_Fi();
void LIBWINE_Register_Fr();
void LIBWINE_Register_Sw();
#endif
NOTEPAD_GLOBALS Globals;
......@@ -81,7 +89,10 @@ int NOTEPAD_MenuCommand (WPARAM wParam)
LRESULT NOTEPAD_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT ps;
HDC hContext;
HANDLE hDrop; /* drag & drop */
CHAR szFileName[MAX_STRING_LEN];
RECT Windowsize;
lstrcpy(szFileName, "");
......@@ -91,7 +102,8 @@ LRESULT NOTEPAD_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_PAINT:
BeginPaint(hWnd, &ps);
hContext = BeginPaint(hWnd, &ps);
TextOut(hContext, 1, 1, Globals.Buffer, strlen(Globals.Buffer));
EndPaint(hWnd, &ps);
break;
......@@ -99,16 +111,31 @@ LRESULT NOTEPAD_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
NOTEPAD_MenuCommand(wParam);
break;
case WM_DESTROYCLIPBOARD:
MessageBox(Globals.hMainWnd, "Empty clipboard", "Debug", MB_ICONEXCLAMATION);
break;
case WM_CLOSE:
if (DoCloseFile()) {
PostQuitMessage(0);
}
break;
case WM_DESTROY:
PostQuitMessage (0);
PostQuitMessage (0);
break;
case WM_DROPFILES:
DragQueryFile(wParam, 0, szFileName, sizeof(szFileName));
printf("file %s to be opened by drag and drop !\n", szFileName);
DragFinish(wParam);
case WM_SIZE:
GetClientRect(Globals.hMainWnd, &Windowsize);
break;
case WM_DROPFILES:
/* User has dropped a file into main window */
hDrop = (HANDLE) wParam;
DragQueryFile(hDrop, 0, (CHAR *) &szFileName, sizeof(szFileName));
DragFinish(hDrop);
DoOpenFile(szFileName);
break;
default:
return DefWindowProc (hWnd, msg, wParam, lParam);
......@@ -135,8 +162,10 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
LIBWINE_Register_Da();
LIBWINE_Register_De();
LIBWINE_Register_En();
LIBWINE_Register_Sw();
LIBWINE_Register_Es();
LIBWINE_Register_Fi();
LIBWINE_Register_Fr();
LIBWINE_Register_Sw();
#endif
/* Select Language */
......@@ -145,14 +174,18 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
/* Setup Globals */
Globals.lpszIniFile = "notepad.ini";
Globals.lpszIcoFile = "notepad.ico";
lstrcpy(Globals.lpszIniFile, "notepad.ini");
lstrcpy(Globals.lpszIcoFile, "notepad.ico");
Globals.hInstance = hInstance;
#ifndef LCC
Globals.hMainIcon = ExtractIcon(Globals.hInstance,
Globals.lpszIcoFile, 0);
if (!Globals.hMainIcon) Globals.hMainIcon =
LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
#endif
if (!Globals.hMainIcon) {
Globals.hMainIcon = LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
}
lstrcpy(Globals.szFindText, "");
lstrcpy(Globals.szFileName, "");
......@@ -162,6 +195,7 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
lstrcpy(Globals.szMarginRight, "20 mm");
lstrcpy(Globals.szHeader, "&n");
lstrcpy(Globals.szFooter, "Page &s");
lstrcpy(Globals.Buffer, "Hello World");
if (!prev){
class.style = CS_HREDRAW | CS_VREDRAW;
......@@ -176,13 +210,18 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
class.lpszClassName = className;
}
if (!RegisterClass (&class))
return FALSE;
if (!RegisterClass (&class)) return FALSE;
/* Setup windows */
Globals.hMainWnd = CreateWindow (className, winName, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
LoadMenu(Globals.hInstance, STRING_MENU_Xx),
Globals.hInstance, 0);
Globals.hMainWnd = CreateWindow (className, winName,
WS_OVERLAPPEDWINDOW + WS_HSCROLL + WS_VSCROLL,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, 0,
LoadMenu(Globals.hInstance, STRING_MENU_Xx),
Globals.hInstance, 0);
Globals.hFindReplaceDlg = 0;
LANGUAGE_SelectByName(Globals.lpszLanguage);
......@@ -191,6 +230,16 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
ShowWindow (Globals.hMainWnd, show);
UpdateWindow (Globals.hMainWnd);
/* Set up dialogs */
/* Identify Messages originating from FindReplace */
Globals.nCommdlgFindReplaceMsg = RegisterWindowMessage("commdlg_FindReplace");
if (Globals.nCommdlgFindReplaceMsg==0) {
MessageBox(Globals.hMainWnd, "Could not register commdlg_FindReplace window message",
"Error", MB_ICONEXCLAMATION);
}
/* now handle command line */
while (*cmdline && (*cmdline == ' ' || *cmdline == '-'))
......@@ -214,17 +263,26 @@ int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
}
}
/* Set up Drag&Drop */
DragAcceptFiles(Globals.hMainWnd, TRUE);
MessageBox(Globals.hMainWnd, "BEWARE!\nThis is ALPHA software that may destroy your file system.\nPlease take care.",
"A note from the developer...", MB_ICONEXCLAMATION);
/* now enter mesage loop */
while (GetMessage (&msg, 0, 0, 0)) {
TranslateMessage (&msg);
DispatchMessage (&msg);
if (IsDialogMessage(Globals.hFindReplaceDlg, &msg)!=0) {
/* Message belongs to FindReplace dialog */
/* We just let IsDialogMessage handle it */
}
else
{
/* Message belongs to the Notepad Main Window */
TranslateMessage (&msg);
DispatchMessage (&msg);
}
}
return 0;
}
/* Local Variables: */
/* c-file-style: "GNU" */
/* End: */
......@@ -9,16 +9,20 @@
#define MAX_PATHNAME_LEN 1024
#define MAX_LANGUAGE_NUMBER (NP_LAST_LANGUAGE - NP_FIRST_LANGUAGE)
#define HELPFILE "notepad.hlp"
#define HELPFILE "notepad.hlp"
#define LOGPREFIX ".LOG"
#define DEFAULTICON OIC_WINEICON
/* hide the following from winerc */
#ifndef RC_INVOKED
#include "commdlg.h"
typedef struct
{
HANDLE hInstance;
HWND hMainWnd;
HWND hFindReplaceDlg;
HICON hMainIcon;
HICON hDefaultIcon;
HMENU hMainMenu;
......@@ -33,6 +37,7 @@ typedef struct
UINT wStringTableOffset;
BOOL bWrapLongLines;
CHAR szFindText[MAX_PATHNAME_LEN];
CHAR szReplaceText[MAX_PATHNAME_LEN];
CHAR szFileName[MAX_PATHNAME_LEN];
CHAR szMarginTop[MAX_PATHNAME_LEN];
CHAR szMarginBottom[MAX_PATHNAME_LEN];
......@@ -40,6 +45,10 @@ typedef struct
CHAR szMarginRight[MAX_PATHNAME_LEN];
CHAR szHeader[MAX_PATHNAME_LEN];
CHAR szFooter[MAX_PATHNAME_LEN];
FINDREPLACE find;
WORD nCommdlgFindReplaceMsg;
CHAR Buffer[12000];
} NOTEPAD_GLOBALS;
extern NOTEPAD_GLOBALS Globals;
......@@ -71,9 +80,10 @@ extern CHAR STRING_PAGESETUP_Xx[];
#define IDS_INFO STRINGID(07)
#define IDS_TOOLARGE STRINGID(08)
#define IDS_NOTEXT STRINGID(09)
#define IDS_NOTFOUND STRINGID(0A)
#define IDS_OUT_OF_MEMORY STRINGID(0B)
#define IDS_UNTITLED STRINGID(0C)
#define IDS_NOTSAVED STRINGID(0A)
#define IDS_NOTFOUND STRINGID(0B)
#define IDS_OUT_OF_MEMORY STRINGID(0C)
#define IDS_UNTITLED STRINGID(0D)
#define IDS_PAGESETUP_HEADERVALUE STRINGID(0D)
#define IDS_PAGESETUP_FOOTERVALUE STRINGID(0E)
......
......@@ -29,10 +29,10 @@ CONCAT(MENU_, LANGUAGE_ID) MENU
POPUP MENU_EDIT {
MENUITEM MENU_EDIT_UNDO, NP_EDIT_UNDO
MENUITEM SEPARATOR
MENUITEM MENU_EDIT_CUT, NP_EDIT_CUT, GRAYED
MENUITEM MENU_EDIT_COPY, NP_EDIT_COPY, GRAYED
MENUITEM MENU_EDIT_PASTE, NP_EDIT_PASTE, GRAYED
MENUITEM MENU_EDIT_DELETE, NP_EDIT_DELETE, GRAYED
MENUITEM MENU_EDIT_CUT, NP_EDIT_CUT
MENUITEM MENU_EDIT_COPY, NP_EDIT_COPY
MENUITEM MENU_EDIT_PASTE, NP_EDIT_PASTE
MENUITEM MENU_EDIT_DELETE, NP_EDIT_DELETE
MENUITEM SEPARATOR
MENUITEM MENU_EDIT_SELECTALL, NP_EDIT_SELECTALL
MENUITEM MENU_EDIT_TIMEDATE, NP_EDIT_TIMEDATE
......@@ -74,15 +74,16 @@ EDITTEXT NP_PAGESETUP_HEAD, 60, 05,110, 12, WS_BOR
LTEXT DIALOG_PAGESETUP_TAIL, NP_PAGESETUP_TAIL_TXT, 10, 24, 40, 15
EDITTEXT NP_PAGESETUP_TAIL, 60, 22,110, 12, WS_BORDER | WS_TABSTOP
GROUPBOX DIALOG_PAGESETUP_MARGIN,NP_PAGESETUP_MARGIN, 10, 43,160, 45
LTEXT DIALOG_PAGESETUP_LEFT, NP_PAGESETUP_LEFT_TXT, 20, 55, 30, 10, WS_CHILD
EDITTEXT NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_TOP, NP_PAGESETUP_TOP_TXT, 20, 73, 30, 10, WS_CHILD
EDITTEXT NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_RIGHT, NP_PAGESETUP_RIGHT_TXT, 100, 55, 30, 10, WS_CHILD
EDITTEXT NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_BOTTOM,NP_PAGESETUP_BOTTOM_TXT,100, 73, 30, 10, WS_CHILD
EDITTEXT NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
GROUPBOX DIALOG_PAGESETUP_MARGIN, NP_PAGESETUP_MARGIN, 10, 43,160, 45
LTEXT DIALOG_PAGESETUP_LEFT, NP_PAGESETUP_LEFT_TXT, 20, 55, 30, 10, WS_CHILD
EDITTEXT STRING_PAGESETUP_LEFTVALUE, NP_PAGESETUP_LEFT, 50, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_TOP, NP_PAGESETUP_TOP_TXT, 20, 73, 30, 10, WS_CHILD
EDITTEXT STRING_PAGESETUP_TOPVALUE, NP_PAGESETUP_TOP, 50, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_RIGHT, NP_PAGESETUP_RIGHT_TXT, 100, 55, 30, 10, WS_CHILD
EDITTEXT STRING_PAGESETUP_RIGHTVALUE, NP_PAGESETUP_RIGHT, 130, 55, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
LTEXT DIALOG_PAGESETUP_BOTTOM, NP_PAGESETUP_BOTTOM_TXT,100, 73, 30, 10, WS_CHILD
EDITTEXT STRING_PAGESETUP_BOTTOMVALUE, NP_PAGESETUP_BOTTOM, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP
DEFPUSHBUTTON DIALOG_OK, IDOK, 180, 3, 40, 15, WS_TABSTOP
PUSHBUTTON DIALOG_CANCEL, IDCANCEL, 180, 21, 40, 15, WS_TABSTOP
......@@ -114,6 +115,7 @@ ADDSTRING(WARNING)
ADDSTRING(INFO)
ADDSTRING(TOOLARGE)
ADDSTRING(NOTEXT)
ADDSTRING(NOTSAVED)
ADDSTRING(NOTFOUND)
ADDSTRING(OUT_OF_MEMORY)
ADDSTRING(UNTITLED)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment