mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 06:46:46 +00:00
54c2711ff6
Sun Mar 29 15:18:57 1998 Uwe Bonnes <elektron.ikp.physik.tu-darmstadt.de> * [msdos/int21.c] More verbose Trace messages Sun Mar 29 15:03:30 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [loader/ne_image.c] Terminate relocation chains on 0 offset. Sun Mar 29 02:35:45 1998 James Juran <jrj120@psu.edu> * [windows/caret.c] [windows/class.c] [windows/clipboard.c] Fixed more USER32 ordinal numbers in function documentation. Sat Mar 28 22:40:23 1997 Andreas Mohr <100.30936@germany.net> * [controls/desktop.c] Return 1 for WM_NCCREATE in DesktopWndProc. * [controls/menu.c] Fixed crash when destroying a top popup win that was only created but not shown. * [ole/typelib.c] [if1632/typelib.spec] Implemented OABuildVersion. * [windows/win.c] Finally fixed ugly bug in GetParent32 that affected window placement: Didn't return 0 for windows that have neither WS_POPUP nor WS_CHILD set. Now it acts exactly like Windows (at least I hope so ;) Sat Mar 28 02:26:43 1998 Dimitrie O. Paun <dimi@mail.cs.toronto.edu> * [DEVELOPERS-HINTS] [documentation/debug-msgs] Updated documentation on debug messages * [include/button.h] [controls/button.c] [include/windows.h] [include/combo.h] [controls/combo.c] [controls/commctrl.c] [controls/icontitle.c] [controls/listbox.c] [controls/menu.c] [controls/scroll.c] [controls/widgets.c] Changed some 16-bit code to 32-bit code. I am positive this will not break anything. * [controls/uitools.c] Renamed the prefix of some functions from UITOOLS_ to UITOOLS95_ to reflect the fact that they implement Win95 look. Maybe we will have a UITOOLS31_ in the future. Anyhow, the change is completely internal to this file. * [*/*.c] Changed a lot of [f]printf into appropriate debug messages. Fri Mar 27 19:56:12 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [documentation/status/] Added directdraw and directsound status. * [if1632/thunk.c][ole/*.c][win32/kernel32.c] Added some documentation. Moved FUNC004 to thunk.c since it seems to be a 16->32 thunk (calling conventions and the like still unknown). Fri Mar 27 09:59:32 1998 Morten Eriksen <mortene@pvv.org> * [loader/resource.c][windows/keyboard.c] Implemented CopyAcceleratorTable() and CreateAcceleratorTable(). * [include/compobj.h][ole/compobj.c][relay32/ole32.spec] Added implementation of StringFromGUID2(). Tue Mar 26 23:12:05 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [misc/imagelist.c][relay32/comctl32.spec] Implemented new debugging interface. Added missing functions (some are empty stubs). Changed ordinals in comctl32.spec (now dll version 4.72 comatible). * [objects/oembitmaps.c][include/windows.h] [include/bitmaps/*] Added missing restore bitmaps for Win95 look. Added missing Win95 cursors. Thu Mar 26 10:18:20 1998 Douglas Ridgway <ridgway@winehq.com> * [programs/view/Makefile.in] [programs/view/view.c] Fix compilation, Aldus placeable metafile loading. * [graphics/metafiledrv/init.c] [relay32/gdi32.spec] [objects/metafile.c] Implemented various 32 bit versions of regular metafile API. * [objects/enhmetafile.c] Implemented rendering of a couple of dozen records. Tue Mar 24 20:06:39 1998 Matthew Becker <mbecker@glasscity.net> * [memory/*.c] Updated documentation for API manpages. Mon Mar 23 09:09:00 1998 Alex Korobka <alex@pharm.sunysb.edu> * [misc/winsock.c] Fixed 32-bit DNS lookup. Mon Mar 23 23:54:47 1998 Luiz Otavio L. Zorzella <zorzella@nr.conexware.com> * [multimedia/init.c] New code for the initialization and gathering of information about the MIDI devices, for future use. Thu Mar 19 00:59:29 1998 Jim Peterson <jspeter@nospam.birch.ee.vt.edu> * [windows/win.c] Eliminated inaccurate setting of cs->hMenu in WIN_CreateWindowEx, along with superfluous SetMenu32 call. Mon Mar 16 17:40:53 1998 Petter Reinholdtsen <pere@td.org.uit.no> * [debugger/dbg.y] [debugger/Makefile.in] [Makefile.in] Install wine.sym in $(exec_prefix)/lib and make sure the debugger finds it. Sun Mar 15 22:36:35 1998 Michael Veksler <mveksler@tx.technion.ac.il> * [dummy.c] [if1632/gdi.spec] Fixed stub declaration of GDI_532, so Hebrew-Word2 kind of works.
337 lines
8.3 KiB
C
337 lines
8.3 KiB
C
/*
|
|
* Notepad
|
|
*
|
|
* Copyright 1998 Marcel Baur <mbaur@g26.ethz.ch>
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "windows.h"
|
|
#include "commdlg.h"
|
|
#ifdef WINELIB
|
|
#include "shell.h"
|
|
#include "options.h"
|
|
#endif
|
|
#include "main.h"
|
|
#include "license.h"
|
|
#include "dialog.h"
|
|
#include "version.h"
|
|
#include "debug.h"
|
|
|
|
static LRESULT DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
VOID DIALOG_FileNew(VOID)
|
|
{
|
|
// dprintf_fixme(Global, "FileNew() not yet implemented\n");
|
|
printf("FileNew()\n");
|
|
}
|
|
|
|
VOID DIALOG_FileOpen(VOID)
|
|
{
|
|
OPENFILENAME openfilename;
|
|
CHAR szPath[MAX_PATHNAME_LEN];
|
|
CHAR szDir[MAX_PATHNAME_LEN];
|
|
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
|
|
LPSTR p = szzFilter;
|
|
|
|
LoadString(Globals.hInstance, IDS_TEXT_FILES_TXT, p, MAX_STRING_LEN);
|
|
p += strlen(p) + 1;
|
|
lstrcpy(p, "*.txt");
|
|
p += strlen(p) + 1;
|
|
LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
|
|
p += strlen(p) + 1;
|
|
lstrcpy(p, "*.*");
|
|
p += strlen(p) + 1;
|
|
*p = '\0';
|
|
|
|
GetWindowsDirectory(szDir, sizeof(szDir));
|
|
|
|
openfilename.lStructSize = 0;
|
|
openfilename.hwndOwner = Globals.hMainWnd;
|
|
openfilename.hInstance = Globals.hInstance;
|
|
openfilename.lpstrFilter = szzFilter;
|
|
openfilename.lpstrCustomFilter = 0;
|
|
openfilename.nMaxCustFilter = 0;
|
|
openfilename.nFilterIndex = 0;
|
|
openfilename.lpstrFile = szPath;
|
|
openfilename.nMaxFile = sizeof(szPath);
|
|
openfilename.lpstrFileTitle = 0;
|
|
openfilename.nMaxFileTitle = 0;
|
|
openfilename.lpstrInitialDir = szDir;
|
|
openfilename.lpstrTitle = 0;
|
|
openfilename.Flags = 0;
|
|
openfilename.nFileOffset = 0;
|
|
openfilename.nFileExtension = 0;
|
|
openfilename.lpstrDefExt = 0;
|
|
openfilename.lCustData = 0;
|
|
openfilename.lpfnHook = 0;
|
|
openfilename.lpTemplateName = 0;
|
|
|
|
if (GetOpenFileName(&openfilename)) {
|
|
lstrcpyn(Globals.szFileName, openfilename.lpstrFile,
|
|
strlen(openfilename.lpstrFile)+1);
|
|
printf("OpenFile: %s\n", Globals.szFileName);
|
|
}
|
|
}
|
|
|
|
VOID DIALOG_FileSave(VOID)
|
|
{
|
|
fprintf(stderr, "FileSave()\n");
|
|
}
|
|
|
|
VOID DIALOG_FileSaveAs(VOID)
|
|
{
|
|
OPENFILENAME saveas;
|
|
CHAR szPath[MAX_PATHNAME_LEN];
|
|
CHAR szDir[MAX_PATHNAME_LEN];
|
|
CHAR szzFilter[2 * MAX_STRING_LEN + 100];
|
|
LPSTR p = szzFilter;
|
|
|
|
LoadString(Globals.hInstance, IDS_TEXT_FILES_TXT, p, MAX_STRING_LEN);
|
|
p += strlen(p) + 1;
|
|
lstrcpy(p, "*.txt");
|
|
p += strlen(p) + 1;
|
|
LoadString(Globals.hInstance, IDS_ALL_FILES, p, MAX_STRING_LEN);
|
|
p += strlen(p) + 1;
|
|
lstrcpy(p, "*.*");
|
|
p += strlen(p) + 1;
|
|
*p = '\0';
|
|
|
|
GetWindowsDirectory(szDir, sizeof(szDir));
|
|
|
|
saveas.lStructSize = 0;
|
|
saveas.hwndOwner = Globals.hMainWnd;
|
|
saveas.hInstance = Globals.hInstance;
|
|
saveas.lpstrFilter = szzFilter;
|
|
saveas.lpstrCustomFilter = 0;
|
|
saveas.nMaxCustFilter = 0;
|
|
saveas.nFilterIndex = 0;
|
|
saveas.lpstrFile = szPath;
|
|
saveas.nMaxFile = sizeof(szPath);
|
|
saveas.lpstrFileTitle = 0;
|
|
saveas.nMaxFileTitle = 0;
|
|
saveas.lpstrInitialDir = szDir;
|
|
saveas.lpstrTitle = 0;
|
|
saveas.Flags = 0;
|
|
saveas.nFileOffset = 0;
|
|
saveas.nFileExtension = 0;
|
|
saveas.lpstrDefExt = 0;
|
|
saveas.lCustData = 0;
|
|
saveas.lpfnHook = 0;
|
|
saveas.lpTemplateName = 0;
|
|
|
|
if (GetSaveFileName(&saveas)) {
|
|
lstrcpyn(Globals.szFileName, saveas.lpstrFile,
|
|
strlen(saveas.lpstrFile)+1);
|
|
printf("SaveAs(%s)\n", Globals.szFileName);
|
|
}
|
|
}
|
|
|
|
VOID DIALOG_FilePrint(VOID)
|
|
{
|
|
PRINTDLG printer;
|
|
printer.lStructSize = sizeof(printer);
|
|
printer.hwndOwner = Globals.hMainWnd;
|
|
printer.hInstance = Globals.hInstance;
|
|
printer.hDevMode = 0;
|
|
printer.hDevNames = 0;
|
|
printer.hDC = 0;
|
|
printer.Flags = 0;
|
|
printer.nFromPage = 0;
|
|
printer.nToPage = 0;
|
|
printer.nMinPage = 0;
|
|
printer.nMaxPage = 0;
|
|
printer.nCopies = 0;
|
|
printer.lCustData = 0;
|
|
printer.lpfnPrintHook = 0;
|
|
printer.lpfnSetupHook = 0;
|
|
printer.lpPrintTemplateName = 0;
|
|
printer.lpSetupTemplateName = 0;
|
|
printer.hPrintTemplate = 0;
|
|
printer.hSetupTemplate = 0;
|
|
|
|
if(PrintDlg16(&printer)) {
|
|
/* do nothing */
|
|
};
|
|
}
|
|
|
|
VOID DIALOG_FilePageSetup(VOID)
|
|
{
|
|
DIALOG_PageSetup();
|
|
}
|
|
|
|
VOID DIALOG_FilePrinterSetup(VOID)
|
|
{
|
|
fprintf(stderr, "FilePrinterSetup()\n");
|
|
}
|
|
|
|
VOID DIALOG_FileExit(VOID)
|
|
{
|
|
PostQuitMessage(0);
|
|
}
|
|
|
|
VOID DIALOG_EditUndo(VOID)
|
|
{
|
|
fprintf(stderr, "EditUndo()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditCut(VOID)
|
|
{
|
|
fprintf(stderr, "EditCut()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditCopy(VOID)
|
|
{
|
|
fprintf(stderr, "EditCopy()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditPaste(VOID)
|
|
{
|
|
fprintf(stderr, "EditPaste()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditDelete(VOID)
|
|
{
|
|
fprintf(stderr, "EditDelete()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditSelectAll(VOID)
|
|
{
|
|
fprintf(stderr, "EditSelectAll()\n");
|
|
}
|
|
|
|
VOID DIALOG_EditTimeDate(VOID)
|
|
{
|
|
DIALOG_TimeDate();
|
|
}
|
|
|
|
VOID DIALOG_EditWrap(VOID)
|
|
{
|
|
Globals.bWrapLongLines = !Globals.bWrapLongLines;
|
|
CheckMenuItem(Globals.hEditMenu, NP_EDIT_WRAP, MF_BYCOMMAND |
|
|
(Globals.bWrapLongLines ? MF_CHECKED : MF_UNCHECKED));
|
|
}
|
|
|
|
VOID DIALOG_Search(VOID)
|
|
{
|
|
FINDREPLACE find;
|
|
CHAR szFind[MAX_PATHNAME_LEN];
|
|
|
|
lstrcpyn(szFind, Globals.szFindText, strlen(Globals.szFindText)+1);
|
|
|
|
find.lStructSize = 0;
|
|
find.hwndOwner = Globals.hMainWnd;
|
|
find.hInstance = Globals.hInstance;
|
|
find.lpstrFindWhat = szFind;
|
|
find.wFindWhatLen = sizeof(szFind);
|
|
find.Flags = 0;
|
|
find.lCustData = 0;
|
|
find.lpfnHook = 0;
|
|
find.lpTemplateName = 0;
|
|
|
|
if (FindText(&find)) {
|
|
lstrcpyn(Globals.szFindText, szFind, strlen(szFind)+1);
|
|
}
|
|
else
|
|
{
|
|
/* do nothing */
|
|
};
|
|
}
|
|
|
|
VOID DIALOG_SearchNext(VOID)
|
|
{
|
|
fprintf(stderr, "SearchNext()\n");
|
|
}
|
|
|
|
VOID DIALOG_HelpContents(VOID)
|
|
{
|
|
printf("NP_HELP_CONTENTS\n");
|
|
WinHelp(Globals.hMainWnd, HELPFILE, HELP_INDEX, 0);
|
|
}
|
|
|
|
VOID DIALOG_HelpSearch(VOID)
|
|
{
|
|
fprintf(stderr, "HelpSearch()\n");
|
|
}
|
|
|
|
VOID DIALOG_HelpHelp(VOID)
|
|
{
|
|
printf("NP_HELP_ON_HELP\n");
|
|
WinHelp(Globals.hMainWnd, HELPFILE, HELP_HELPONHELP, 0);
|
|
}
|
|
|
|
VOID DIALOG_HelpLicense(VOID)
|
|
{
|
|
WineLicense(Globals.hMainWnd, Globals.lpszLanguage);
|
|
}
|
|
|
|
VOID DIALOG_HelpNoWarranty(VOID)
|
|
{
|
|
WineWarranty(Globals.hMainWnd, Globals.lpszLanguage);
|
|
}
|
|
|
|
VOID DIALOG_HelpAboutWine(VOID)
|
|
{
|
|
ShellAbout(Globals.hMainWnd, "Notepad", "Notepad\n" WINE_RELEASE_INFO, 0);
|
|
}
|
|
|
|
/***********************************************************************
|
|
*
|
|
* DIALOG_PageSetup
|
|
*/
|
|
|
|
VOID DIALOG_PageSetup(VOID)
|
|
{
|
|
WNDPROC lpfnDlg = MakeProcInstance(DIALOG_PAGESETUP_DlgProc, Globals.hInstance);
|
|
DialogBox(Globals.hInstance, STRING_PAGESETUP_Xx,
|
|
Globals.hMainWnd, lpfnDlg);
|
|
FreeProcInstance(lpfnDlg);
|
|
}
|
|
|
|
/***********************************************************************
|
|
*
|
|
* DIALOG_TimeDate
|
|
*/
|
|
|
|
VOID DIALOG_TimeDate(VOID)
|
|
{
|
|
SYSTEMTIME st;
|
|
int H, Min, Y, M, D;
|
|
GetLocalTime(&st);
|
|
H = st.wHour; Min = st.wMinute; Y = st.wYear; M = st.wMonth; D = st.wDay;
|
|
printf("TimeDate=%i:", H);
|
|
if (Min < 10) printf("0");
|
|
printf("%i %i/", Min, Y);
|
|
if (M < 10) printf("0");
|
|
printf("%i/", M);
|
|
if (D < 10) printf("0");
|
|
printf("%i\n", D);
|
|
}
|
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
*
|
|
* DIALOG_PAGESETUP_DlgProc
|
|
*/
|
|
|
|
static LRESULT DIALOG_PAGESETUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
|
{
|
|
switch (msg)
|
|
{
|
|
case WM_COMMAND:
|
|
switch (wParam)
|
|
{
|
|
case IDOK:
|
|
EndDialog(hDlg, IDOK);
|
|
return TRUE;
|
|
|
|
case IDCANCEL:
|
|
EndDialog(hDlg, IDCANCEL);
|
|
return TRUE;
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
/* Local Variables: */
|
|
/* c-file-style: "GNU" */
|
|
/* End: */
|