1993-09-29 12:21:49 +00:00
|
|
|
/* File: button.c -- MS-Windows(tm) compatible "Button" replacement widget
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
*
|
1993-09-29 12:21:49 +00:00
|
|
|
* programmed by Johannes Ruscheinski for the Linux WABI
|
|
|
|
* project.
|
|
|
|
* (C) 1993 by Johannes Ruscheinski
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
*
|
1993-09-29 12:21:49 +00:00
|
|
|
* Modifications by David Metcalfe
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
*/
|
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
#include <windows.h>
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
#include "win.h"
|
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
LONG ButtonWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam);
|
|
|
|
|
|
|
|
static COLORREF color_windowframe, color_btnface, color_btnshadow,
|
|
|
|
color_btntext, color_btnhighlight;
|
|
|
|
|
|
|
|
static BOOL pressed;
|
|
|
|
|
|
|
|
#define NOTIFY_PARENT(hWndCntrl, wNotifyCode) \
|
|
|
|
SendMessage(GetParent(hWndCntrl), WM_COMMAND, \
|
|
|
|
GetDlgCtrlID(hWndCntrl), MAKELPARAM(hWndCntrl, wNotifyCode));
|
|
|
|
#define DIM(array) ((sizeof array)/(sizeof array[0]))
|
|
|
|
|
|
|
|
static LONG PB_Paint(HWND hWnd);
|
|
|
|
static LONG PB_LButtonDown(HWND hWnd, WORD wParam, LONG lParam);
|
|
|
|
static LONG PB_LButtonUp(HWND hWnd, WORD wParam, LONG lParam);
|
|
|
|
static LONG PB_LButtonDblClk(HWND hWnd, WORD wParam, LONG lParam);
|
|
|
|
static void DrawRaisedPushButton(HDC hDC, HWND hButton, RECT rc);
|
|
|
|
static void DrawPressedPushButton(HDC hDC, HWND hButton, RECT rc);
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
typedef struct
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
{
|
1993-09-29 12:21:49 +00:00
|
|
|
LONG (*paintfn)();
|
|
|
|
LONG (*lButtonDownfn)();
|
|
|
|
LONG (*lButtonUpfn)();
|
|
|
|
LONG (*lButtonDblClkfn)();
|
|
|
|
} BTNFN;
|
|
|
|
|
|
|
|
#define MAX_BTN_TYPE 2
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
static BTNFN btnfn[MAX_BTN_TYPE] =
|
|
|
|
{
|
|
|
|
{
|
|
|
|
(LONG(*)())PB_Paint, /* BS_PUSHBUTTON */
|
|
|
|
(LONG(*)())PB_LButtonDown,
|
|
|
|
(LONG(*)())PB_LButtonUp,
|
|
|
|
(LONG(*)())PB_LButtonDblClk
|
|
|
|
},
|
|
|
|
{
|
|
|
|
(LONG(*)())PB_Paint, /* BS_DEFPUSHBUTTON */
|
|
|
|
(LONG(*)())PB_LButtonDown,
|
|
|
|
(LONG(*)())PB_LButtonUp,
|
|
|
|
(LONG(*)())PB_LButtonDblClk
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
}
|
1993-09-29 12:21:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
LONG ButtonWndProc(HWND hWnd, WORD uMsg, WORD wParam, LONG lParam)
|
|
|
|
{
|
|
|
|
LONG lResult = 0;
|
|
|
|
HDC hDC;
|
|
|
|
RECT rc;
|
|
|
|
|
|
|
|
WND *wndPtr = WIN_FindWndPtr(hWnd);
|
|
|
|
LONG style = wndPtr->dwStyle & 0x0000000F;
|
|
|
|
|
|
|
|
switch (uMsg) {
|
|
|
|
/* case WM_GETDLGCODE:
|
|
|
|
lResult = DLGC_BUTTON;
|
|
|
|
break;
|
|
|
|
*/
|
|
|
|
case WM_ENABLE:
|
|
|
|
InvalidateRect(hWnd, NULL, FALSE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_CREATE:
|
|
|
|
if (style < 0L || style >= (LONG)DIM(btnfn))
|
|
|
|
lResult = -1L;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* initialise colours used for button rendering: */
|
|
|
|
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
|
|
|
|
color_btnface = GetSysColor(COLOR_BTNFACE);
|
|
|
|
color_btnshadow = GetSysColor(COLOR_BTNSHADOW);
|
|
|
|
color_btntext = GetSysColor(COLOR_BTNTEXT);
|
|
|
|
color_btnhighlight = GetSysColor(COLOR_BTNHIGHLIGHT);
|
|
|
|
|
|
|
|
pressed = FALSE;
|
|
|
|
lResult = 0L;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_PAINT:
|
|
|
|
(btnfn[style].paintfn)(hWnd);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONDOWN:
|
|
|
|
(btnfn[style].lButtonDownfn)(hWnd, wParam, lParam);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONUP:
|
|
|
|
(btnfn[style].lButtonUpfn)(hWnd, wParam, lParam);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_LBUTTONDBLCLK:
|
|
|
|
(btnfn[style].lButtonDblClkfn)(hWnd, wParam, lParam);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_SETFOCUS:
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_KILLFOCUS:
|
|
|
|
InvalidateRect(hWnd, NULL, FALSE);
|
|
|
|
UpdateWindow(hWnd);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_SYSCOLORCHANGE:
|
|
|
|
color_windowframe = GetSysColor(COLOR_WINDOWFRAME);
|
|
|
|
color_btnface = GetSysColor(COLOR_BTNFACE);
|
|
|
|
color_btnshadow = GetSysColor(COLOR_BTNSHADOW);
|
|
|
|
color_btntext = GetSysColor(COLOR_BTNTEXT);
|
|
|
|
color_btnhighlight = GetSysColor(COLOR_BTNHIGHLIGHT);
|
|
|
|
InvalidateRect(hWnd, NULL, TRUE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
lResult = DefWindowProc(hWnd, uMsg, wParam, lParam);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
GlobalUnlock(hWnd);
|
|
|
|
return lResult;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* Push Button Functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
static LONG PB_Paint(HWND hWnd)
|
|
|
|
{
|
|
|
|
PAINTSTRUCT ps;
|
|
|
|
RECT rc;
|
|
|
|
HDC hDC;
|
|
|
|
|
|
|
|
hDC = BeginPaint(hWnd, &ps);
|
|
|
|
GetClientRect(hWnd, &rc);
|
|
|
|
if (pressed)
|
|
|
|
DrawPressedPushButton(hDC, hWnd, rc);
|
|
|
|
else
|
|
|
|
DrawRaisedPushButton(hDC, hWnd, rc);
|
|
|
|
EndPaint(hWnd, &ps);
|
|
|
|
}
|
|
|
|
|
|
|
|
static LONG PB_LButtonDown(HWND hWnd, WORD wParam, LONG lParam)
|
|
|
|
{
|
|
|
|
/* SetFocus(hWnd); */
|
|
|
|
SetCapture(hWnd);
|
|
|
|
pressed = TRUE;
|
|
|
|
InvalidateRect(hWnd, NULL, FALSE);
|
|
|
|
UpdateWindow(hWnd);
|
|
|
|
}
|
|
|
|
|
|
|
|
static LONG PB_LButtonUp(HWND hWnd, WORD wParam, LONG lParam)
|
|
|
|
{
|
|
|
|
RECT rc;
|
|
|
|
|
|
|
|
pressed = FALSE;
|
|
|
|
ReleaseCapture();
|
|
|
|
GetClientRect(hWnd, &rc);
|
|
|
|
if (PtInRect(&rc, MAKEPOINT(lParam)))
|
|
|
|
NOTIFY_PARENT(hWnd, BN_CLICKED);
|
|
|
|
InvalidateRect(hWnd, NULL, FALSE);
|
|
|
|
UpdateWindow(hWnd);
|
|
|
|
}
|
|
|
|
|
|
|
|
static LONG PB_LButtonDblClk(HWND hWnd, WORD wParam, LONG lParam)
|
|
|
|
{
|
|
|
|
RECT rc;
|
|
|
|
|
|
|
|
GetClientRect(hWnd, &rc);
|
|
|
|
if (PtInRect(&rc, MAKEPOINT(lParam)))
|
|
|
|
NOTIFY_PARENT(hWnd, BN_DOUBLECLICKED);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void DrawRaisedPushButton(HDC hDC, HWND hButton, RECT rc)
|
|
|
|
{
|
|
|
|
HPEN hOldPen, hFramePen;
|
|
|
|
HBRUSH hOldBrush, hShadowBrush, hHighlightBrush, hBackgrndBrush;
|
|
|
|
HRGN rgn1, rgn2, rgn;
|
|
|
|
int len;
|
|
|
|
static char text[50+1];
|
|
|
|
POINT points[6];
|
|
|
|
DWORD dwTextSize;
|
|
|
|
int delta;
|
|
|
|
TEXTMETRIC tm;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
hFramePen = CreatePen(PS_SOLID, 1, color_windowframe);
|
|
|
|
hBackgrndBrush = CreateSolidBrush(color_btnface);
|
|
|
|
|
|
|
|
hOldPen = (HPEN)SelectObject(hDC, (HANDLE)hFramePen);
|
|
|
|
hOldBrush = (HBRUSH)SelectObject(hDC, (HANDLE)hBackgrndBrush);
|
|
|
|
SetBkMode(hDC, TRANSPARENT);
|
|
|
|
|
|
|
|
rgn = CreateRectRgn(0, 0, 0, 0);
|
|
|
|
rgn1 = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
|
|
|
|
|
|
|
|
SendMessage(GetParent(hButton), WM_CTLCOLOR, (WORD)hDC,
|
|
|
|
MAKELPARAM(hButton, CTLCOLOR_BTN));
|
|
|
|
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
|
|
|
|
|
|
|
/* draw button label, if any: */
|
|
|
|
len = GetWindowText(hButton, text, sizeof text);
|
|
|
|
if (len >= 1) {
|
|
|
|
rc.left--; rc.bottom--;
|
|
|
|
DrawText(hDC, text, len, &rc,
|
|
|
|
DT_SINGLELINE | DT_CENTER| DT_VCENTER);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* draw button highlight */
|
|
|
|
points[0].x = rc.left+2;
|
|
|
|
points[0].y = rc.bottom;
|
|
|
|
points[1].x = rc.left+4;
|
|
|
|
points[1].y = rc.bottom-2;
|
|
|
|
points[2].x = rc.left+4;
|
|
|
|
points[2].y = rc.top+3;
|
|
|
|
points[3].x = rc.right-3;
|
|
|
|
points[3].y = rc.top+3;
|
|
|
|
points[4].x = rc.right-1;
|
|
|
|
points[4].y = rc.top+1;
|
|
|
|
points[5].x = rc.left+2;
|
|
|
|
points[5].y = rc.top+1;
|
|
|
|
hHighlightBrush = CreateSolidBrush(color_btnhighlight);
|
|
|
|
rgn2 = CreatePolygonRgn(points, DIM(points), ALTERNATE);
|
|
|
|
CombineRgn(rgn, rgn1, rgn2, RGN_AND);
|
|
|
|
FillRgn(hDC, rgn2, hHighlightBrush);
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
/* draw button shadow: */
|
|
|
|
points[0].x = rc.left+2;
|
|
|
|
points[0].y = rc.bottom;
|
|
|
|
points[1].x = rc.left+4;
|
|
|
|
points[1].y = rc.bottom-2;
|
|
|
|
points[2].x = rc.right-3;
|
|
|
|
points[2].y = rc.bottom-2;
|
|
|
|
points[3].x = rc.right-3;
|
|
|
|
points[3].y = rc.top+3;
|
|
|
|
points[4].x = rc.right-1;
|
|
|
|
points[4].y = rc.top;
|
|
|
|
points[5].x = rc.right-1;
|
|
|
|
points[5].y = rc.bottom;
|
|
|
|
hShadowBrush = CreateSolidBrush(color_btnshadow);
|
|
|
|
rgn2 = CreatePolygonRgn(points, DIM(points), ALTERNATE);
|
|
|
|
CombineRgn(rgn, rgn1, rgn2, RGN_AND);
|
|
|
|
FillRgn(hDC, rgn2, hShadowBrush);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* do we have the focus? */
|
|
|
|
if (len >= 1 && GetFocus() == hButton) {
|
|
|
|
dwTextSize = GetTextExtent(hDC, text, len);
|
|
|
|
delta = ((rc.right - rc.left) - LOWORD(dwTextSize) + 1) >> 1;
|
|
|
|
rc.left += delta; rc.right -= delta;
|
|
|
|
GetTextMetrics(hDC, &tm);
|
|
|
|
delta = ((rc.bottom - rc.top) -
|
|
|
|
tm.tmHeight + tm.tmInternalLeading) >> 1;
|
|
|
|
rc.top += delta; rc.bottom -= delta;
|
|
|
|
DrawFocusRect(hDC, &rc);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SelectObject(hDC, (HANDLE)hOldPen);
|
|
|
|
SelectObject(hDC, (HANDLE)hOldBrush);
|
|
|
|
DeleteObject((HANDLE)hFramePen);
|
|
|
|
DeleteObject((HANDLE)hShadowBrush);
|
|
|
|
DeleteObject((HANDLE)hBackgrndBrush);
|
|
|
|
DeleteObject((HANDLE)rgn1);
|
|
|
|
#if 0
|
|
|
|
DeleteObject((HANDLE)rgn2);
|
|
|
|
DeleteObject((HANDLE)rgn);
|
|
|
|
#endif
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
}
|
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
|
|
|
|
static void DrawPressedPushButton(HDC hDC, HWND hButton, RECT rc)
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
{
|
1993-09-29 12:21:49 +00:00
|
|
|
HPEN hOldPen, hShadowPen, hFramePen;
|
|
|
|
HBRUSH hOldBrush, hBackgrndBrush;
|
|
|
|
HRGN rgn1, rgn2, rgn;
|
|
|
|
int len;
|
|
|
|
static char text[50+1];
|
|
|
|
DWORD dwTextSize;
|
|
|
|
int delta;
|
|
|
|
TEXTMETRIC tm;
|
|
|
|
|
|
|
|
hFramePen = CreatePen(PS_SOLID, 1, color_windowframe);
|
|
|
|
hBackgrndBrush = CreateSolidBrush(color_btnface);
|
|
|
|
|
|
|
|
hOldBrush = (HBRUSH)SelectObject(hDC, (HANDLE)hBackgrndBrush);
|
|
|
|
hOldPen = (HPEN)SelectObject(hDC, (HANDLE)hFramePen);
|
|
|
|
SetBkMode(hDC, TRANSPARENT);
|
|
|
|
|
|
|
|
/* give parent a chance to alter parameters: */
|
|
|
|
SendMessage(GetParent(hButton), WM_CTLCOLOR, (WORD)hDC,
|
|
|
|
MAKELPARAM(hButton, CTLCOLOR_BTN));
|
|
|
|
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
|
|
|
|
|
|
|
/* draw button shadow: */
|
|
|
|
hShadowPen = CreatePen(PS_SOLID, 1, color_btnshadow);
|
|
|
|
SelectObject(hDC, (HANDLE)hShadowPen);
|
|
|
|
MoveTo(hDC, rc.left+1, rc.bottom-1);
|
|
|
|
LineTo(hDC, rc.left+1, rc.top+1);
|
|
|
|
LineTo(hDC, rc.right-1, rc.top+1);
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
/* draw button label, if any: */
|
|
|
|
len = GetWindowText(hButton, text, sizeof text);
|
|
|
|
if (len >= 1) {
|
|
|
|
rc.top++; rc.left++;
|
|
|
|
DrawText(hDC, text, len, &rc,
|
|
|
|
DT_SINGLELINE | DT_CENTER| DT_VCENTER);
|
|
|
|
}
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
#if 0
|
|
|
|
/* do we have the focus? */
|
|
|
|
if (len >= 1 && GetFocus() == hButton) {
|
|
|
|
dwTextSize = GetTextExtent(hDC, text, len);
|
|
|
|
delta = ((rc.right - rc.left) - LOWORD(dwTextSize)) >> 1;
|
|
|
|
rc.left += delta; rc.right -= delta;
|
|
|
|
GetTextMetrics(hDC, &tm);
|
|
|
|
delta = ((rc.bottom - rc.top) -
|
|
|
|
tm.tmHeight + tm.tmInternalLeading) >> 1;
|
|
|
|
rc.top += delta; rc.bottom -= delta;
|
|
|
|
DrawFocusRect(hDC, &rc);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
SelectObject(hDC, (HANDLE)hOldPen);
|
|
|
|
SelectObject(hDC, (HANDLE)hOldBrush);
|
|
|
|
DeleteObject((HANDLE)hBackgrndBrush);
|
|
|
|
DeleteObject(SelectObject(hDC, (HANDLE)hFramePen));
|
|
|
|
DeleteObject(SelectObject(hDC, (HANDLE)hShadowPen));
|
Release 0.4.0
Mon Sep 13 05:00:11 1993 Eric Youngdale
* [Makefile] [if1632/relay.c] [include/dlls.h] [selector.c]
[loader/wine.c] [tools/build.c]
Added ability to generate missing functions statistics.
Mon Sep 13 12:09:47 1993 Scott A. Laird (scott@curly)
* [WIN31-APPLETS]
Added new file.
* [if1632/kernel.spec]
Added definitions for GetProfile{Int,String} and SetHandleCount.
* [if1632/keyboard.spec]
Created interface specification for Keyboard driver DLL.
* [if1632/relay.c]
Added keyboard.dll to list of included DLLs.
* [if1632/user.spec]
Added LoadAccelerators definition.
* [loader/resource.c]
Added LoadAccelerators stub.
* [misc/file.c]
Changed OpenFile, and added SetHandleCount (for winfile.exe)
* [misc/keyboard.c]
Added keyboard code.
* [misc/profile.c] [misc/xt.c]
Moved GetPrivateProfile* commands here, and added GetProfile*
commands.
Mon Sep 13 10:24:37 1993 Andrew Bulhak
* [windows/utility.c]
Implemented MulDiv(), OutputDebugString() and wvsprintf()
Fri Sep 10 09:13:30 1993 John Brezak
* [*/Makefile]
Created patch to allow BSD make to build wine.
* [windows/win.c]
Fixed NULL pointer reference.
* [windows/message.c] [misc/xt.c]
Defined HZ to handle system specific timing.
* [windows/graphics.c]
Use M_PI is PI
* [objects/pallete.c]
NetBSD does not have /usr/include/values.h and MAXINT is INT_MAX.
* [dump.c] [ldt.c] [wine.c]
ifdef'ed linux headers for linux compile.
* [loader/ldtlib.c]
Add NetBSD system calls when compiled on that system.
* [loader/selector.c]
Use mmap(MAP_ANON, ...) for NetBSD.
* [if1632/call.S]
Fixed selector assumptions.
Thu Sep 9 20:01:37 1993 David Metcalfe
* [controls/WinButton*] [controls/button.c] [controls/widget.c]
[windows/win.c] [windows/class.c]
Added 3D button control and tied into CreateWindow()
Thu Sep 9 07:35:24 1993 Scott Laird
* [if1632/sound.spec]
Created interface specification for SOUND DLL.
* [if1632/win87em.spec]
Added more functions to the WIN87EM DLL interface specification
* [misc/emulate.c]
Created stubs for the new math emulation functions.
* [misc/sound.c]
Created stubs for the SOUND DLL.
Sun Sep 5 21:02:10 1993 John Burton
* [if1632/kernel.spec]
Added interface specifications for OpenFile, _lclose, _lread, _lopen,
and _lwrite.
* [include/windows.h]
Added OF_ macros
* [misc/file.c]
Implemented OpenFile, _lclose, _lread, _lopen and _lwrite.
Fri Sep 3 18:47:03 1993 Alexandre Julliard
* [windows/dc.c]
Bug fix
* [objects/text.c]
Bug fix
Fri Sep 3 18:47:03 1993 Bob Amstadt
* [objects/linedda.c]
Finished LineDDA().
1993-09-14 16:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1993-09-29 12:21:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|