Release 961023

Tue Oct 22 20:09:52 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [*/Makefile.in] [tools/makedep.c]
	New program to generate dependencies; should be faster and more
	portable than 'gcc -MM'.

	* [*/*]
	Replaced WPARAM and HDC by explicitly-sized types.

	* [windows/hook.c]
	Fixed bug in HOOK_GetHook16 function.

Thu Oct 17 09:13:50 1996  John Harvey <john@division.co.uk>

	* [include/debug.h] [include/stddebug.h]
        Added debug option for win16drv (-debugmsg +win16drv)

	* [graphics/win16drv/init.c]
        Only enable CreateDC if printer=on specified in wine section of
 	wine.conf.
 	printfs changed to dprintf_win16drv.
	Some tidying up.

	* [include/gdi.h] [graphics/x11drv/clipping.c]
	  [graphics/x11drv/Makefile.in]
        Moved SetDeviceClipping into drivers.
This commit is contained in:
Alexandre Julliard 1996-10-23 16:59:13 +00:00
parent bf9130af10
commit 530ee8407c
81 changed files with 1185 additions and 744 deletions

View File

@ -1,13 +1,13 @@
This is release 961013 of Wine, the MS Windows emulator. This is still a This is release 961023 of Wine, the MS Windows emulator. This is still a
developer's only release. There are many bugs and many unimplemented API developer's only release. There are many bugs and many unimplemented API
features. Most applications still do not work correctly. features. Most applications still do not work correctly.
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
forget to include a ChangeLog entry. forget to include a ChangeLog entry.
WHAT'S NEW with Wine-961013: (see ChangeLog for details) WHAT'S NEW with Wine-961023: (see ChangeLog for details)
- Several non Win32-clean data types removed. - Printer driver fixes.
- Graphics driver for metafiles. - Faster make depend.
- Lots of bug fixes. - Lots of bug fixes.
See the README file in the distribution for installation instructions. See the README file in the distribution for installation instructions.
@ -16,10 +16,10 @@ Because of lags created by using mirror, this message may reach you before
the release is available at the ftp sites. The sources will be available the release is available at the ftp sites. The sources will be available
from the following locations: from the following locations:
ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-961013.tar.gz ftp://sunsite.unc.edu/pub/Linux/ALPHA/wine/development/Wine-961023.tar.gz
ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-961013.tar.gz ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/Wine-961023.tar.gz
ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-961013.tar.gz ftp://ftp.infomagic.com/pub/mirrors/linux/wine/development/Wine-961023.tar.gz
ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-961013.tar.gz ftp://aris.com/pub/linux/ALPHA/Wine/development/Wine-961023.tar.gz
It should also be available from any site that mirrors tsx-11 or sunsite. It should also be available from any site that mirrors tsx-11 or sunsite.

View File

@ -1,3 +1,31 @@
----------------------------------------------------------------------
Tue Oct 22 20:09:52 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [*/Makefile.in] [tools/makedep.c]
New program to generate dependencies; should be faster and more
portable than 'gcc -MM'.
* [*/*]
Replaced WPARAM and HDC by explicitly-sized types.
* [windows/hook.c]
Fixed bug in HOOK_GetHook16 function.
Thu Oct 17 09:13:50 1996 John Harvey <john@division.co.uk>
* [include/debug.h] [include/stddebug.h]
Added debug option for win16drv (-debugmsg +win16drv)
* [graphics/win16drv/init.c]
Only enable CreateDC if printer=on specified in wine section of
wine.conf.
printfs changed to dprintf_win16drv.
Some tidying up.
* [include/gdi.h] [graphics/x11drv/clipping.c]
[graphics/x11drv/Makefile.in]
Moved SetDeviceClipping into drivers.
---------------------------------------------------------------------- ----------------------------------------------------------------------
Sun Oct 13 15:32:32 1996 Alexandre Julliard <julliard@lrc.epfl.ch> Sun Oct 13 15:32:32 1996 Alexandre Julliard <julliard@lrc.epfl.ch>

View File

@ -26,17 +26,17 @@ LDLIBS = @LDLIBS@
YACC = @YACC@ YACC = @YACC@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I. DIVINCL = -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include -I$(SRCDIR) -I.
ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS) ALLCFLAGS = $(CFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) $(X_CFLAGS)
LDCOMBINE = ld -r LDCOMBINE = ld -r
RM = rm -f RM = rm -f
BUILD = $(TOPOBJDIR)/tools/build BUILD = $(TOPOBJDIR)/tools/build
MAKEDEP = $(TOPOBJDIR)/tools/makedep
WINERC = $(TOPOBJDIR)/rc/winerc WINERC = $(TOPOBJDIR)/rc/winerc
SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)' SUBMAKE = $(MAKE) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'OPTIONS=$(OPTIONS)'
@SET_MAKE@ @SET_MAKE@
OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS) OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS)
DEPEND_SRCS = $(C_SRCS:%=$(SRCDIR)/%) $(GEN_C_SRCS:%=./%)
# Implicit rules # Implicit rules
@ -68,6 +68,10 @@ DEPEND_SRCS = $(C_SRCS:%=$(SRCDIR)/%) $(GEN_C_SRCS:%=./%)
$(WINERC) check_winerc: $(WINERC) check_winerc:
cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc cd $(TOPOBJDIR)/rc; $(SUBMAKE) winerc
# Rule to rebuild the makedep program
$(MAKEDEP) check_makedep:
cd $(TOPOBJDIR)/tools; $(SUBMAKE) makedep
# Rule for main module # Rule for main module
@ -77,13 +81,11 @@ $(MODULE).o: $(OBJS)
# Misc. rules # Misc. rules
depend:: $(C_SRCS) $(GEN_C_SRCS) depend:: $(MAKEDEP) $(C_SRCS) $(GEN_C_SRCS)
sed '/\#\#\# Dependencies/q' < Makefile > tmp_make $(MAKEDEP) $(DIVINCL) -C. $(GEN_C_SRCS) -C$(SRCDIR) $(C_SRCS)
$(CC) $(ALLCFLAGS) -MM $(DEPEND_SRCS) >> tmp_make
mv tmp_make Makefile
clean:: clean::
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc tmp_make winerctmp.c $(GEN_C_SRCS) $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc winerctmp.c $(GEN_C_SRCS) $(GEN_C_SRCS:.c=.h) $(PROGRAMS)
dummy: dummy:

View File

@ -129,19 +129,16 @@ $(ALLSUBDIRS): dummy
install_programs: dummy install_programs: dummy
@cd programs; $(SUBMAKE) install @cd programs; $(SUBMAKE) install
depend: libdepend emudepend depend: dummy
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS) $(EMUSUBDIRS); do \
libdepend: dummy (cd $$i; $(MAKE) depend) || exit 1; \
for i in $(COMMONSUBDIRS) $(LIBSUBDIRS); do (cd $$i; $(MAKE) depend); done done
emudepend: dummy
for i in $(EMUSUBDIRS); do (cd $$i; $(MAKE) depend); done
etags: etags:
etags `find . -name '*.[chS]' -print` etags `find . -name '*.[chS]' -print`
clean: clean:
for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean); done for i in $(ALLSUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
$(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc
$(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS $(RM) wine wine.sym libwine.a libwine.so.1.0 TAGS
(cd include; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc) (cd include; $(RM) *.o \#*\# *~ *.bak *.orig *.rej *.flc)

View File

@ -114,10 +114,10 @@ LRESULT ButtonWndProc(HWND32 hWnd, UINT32 uMsg, WPARAM32 wParam, LPARAM lParam)
case WM_PAINT: case WM_PAINT:
if (btnPaintFunc[style]) if (btnPaintFunc[style])
{ {
PAINTSTRUCT16 ps; PAINTSTRUCT32 ps;
HDC hdc = BeginPaint16( hWnd, &ps ); HDC32 hdc = BeginPaint32( hWnd, &ps );
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE ); (btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
EndPaint16( hWnd, &ps ); EndPaint32( hWnd, &ps );
} }
break; break;
@ -338,7 +338,7 @@ void PB_PaintGrayOnGray(HDC32 hDC,HFONT32 hFont,RECT32 *rc,char *text)
{ {
static int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55}; static int Pattern[] = {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55};
HBITMAP16 hbm = CreateBitmap(8, 8, 1, 1, Pattern); HBITMAP16 hbm = CreateBitmap(8, 8, 1, 1, Pattern);
HDC hdcMem = CreateCompatibleDC(hDC); HDC32 hdcMem = CreateCompatibleDC(hDC);
HBITMAP16 hbmMem; HBITMAP16 hbmMem;
HBRUSH16 hBr; HBRUSH16 hBr;
RECT32 rect,rc2; RECT32 rect,rc2;

View File

@ -94,7 +94,7 @@ void ComboUpdateWindow(HWND hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL repain
/*********************************************************************** /***********************************************************************
* CBNCCreate * CBNCCreate
*/ */
static LRESULT CBNCCreate(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBNCCreate(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
CREATESTRUCT16 *createStruct; CREATESTRUCT16 *createStruct;
@ -112,7 +112,7 @@ static LRESULT CBNCCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBCreate * CBCreate
*/ */
static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBCreate(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl; LPHEADLIST lphl;
LPHEADCOMBO lphc; LPHEADCOMBO lphc;
@ -206,7 +206,7 @@ static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBDestroy * CBDestroy
*/ */
static LRESULT CBDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBDestroy(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -218,7 +218,7 @@ static LRESULT CBDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBPaint * CBPaint
*/ */
static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBPaint(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -278,7 +278,7 @@ static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetDlgCode * CBGetDlgCode
*/ */
static LRESULT CBGetDlgCode(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetDlgCode(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
return DLGC_WANTARROWS | DLGC_WANTCHARS; return DLGC_WANTARROWS | DLGC_WANTCHARS;
} }
@ -286,7 +286,7 @@ static LRESULT CBGetDlgCode(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBLButtonDown * CBLButtonDown
*/ */
static LRESULT CBLButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBLButtonDown(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
SendMessage16(hwnd,CB_SHOWDROPDOWN,!lphc->DropDownVisible,0); SendMessage16(hwnd,CB_SHOWDROPDOWN,!lphc->DropDownVisible,0);
@ -296,7 +296,7 @@ static LRESULT CBLButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBKeyDown * CBKeyDown
*/ */
static LRESULT CBKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBKeyDown(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
WORD newFocused = lphl->ItemFocused; WORD newFocused = lphl->ItemFocused;
@ -336,7 +336,7 @@ static LRESULT CBKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBChar * CBChar
*/ */
static LRESULT CBChar(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBChar(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
WORD newFocused; WORD newFocused;
@ -362,7 +362,7 @@ static LRESULT CBChar(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBKillFocus * CBKillFocus
*/ */
static LRESULT CBKillFocus(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBKillFocus(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
return 0; return 0;
} }
@ -370,7 +370,7 @@ static LRESULT CBKillFocus(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetFocus * CBSetFocus
*/ */
static LRESULT CBSetFocus(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetFocus(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
return 0; return 0;
} }
@ -378,7 +378,7 @@ static LRESULT CBSetFocus(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBResetContent * CBResetContent
*/ */
static LRESULT CBResetContent(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBResetContent(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -391,7 +391,7 @@ static LRESULT CBResetContent(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBDir * CBDir
*/ */
static LRESULT CBDir(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBDir(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
WORD wRet; WORD wRet;
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
@ -405,7 +405,7 @@ static LRESULT CBDir(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBInsertString * CBInsertString
*/ */
static LRESULT CBInsertString(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBInsertString(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
WORD wRet; WORD wRet;
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
@ -422,7 +422,7 @@ static LRESULT CBInsertString(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBAddString * CBAddString
*/ */
static LRESULT CBAddString(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBAddString(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
WORD wRet; WORD wRet;
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
@ -437,7 +437,7 @@ static LRESULT CBAddString(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBDeleteString * CBDeleteString
*/ */
static LRESULT CBDeleteString(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBDeleteString(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -450,7 +450,7 @@ static LRESULT CBDeleteString(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSelectString * CBSelectString
*/ */
static LRESULT CBSelectString(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSelectString(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
WORD wRet; WORD wRet;
@ -465,7 +465,7 @@ static LRESULT CBSelectString(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBFindString * CBFindString
*/ */
static LRESULT CBFindString(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBFindString(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxFindString(lphl, wParam, (SEGPTR)lParam); return ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
@ -474,7 +474,7 @@ static LRESULT CBFindString(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBFindStringExact * CBFindStringExact
*/ */
static LRESULT CBFindStringExact(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBFindStringExact(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxFindStringExact(lphl, wParam, (SEGPTR)lParam); return ListBoxFindStringExact(lphl, wParam, (SEGPTR)lParam);
@ -483,7 +483,7 @@ static LRESULT CBFindStringExact(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetCount * CBGetCount
*/ */
static LRESULT CBGetCount(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetCount(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return lphl->ItemsCount; return lphl->ItemsCount;
@ -492,7 +492,7 @@ static LRESULT CBGetCount(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetCurSel * CBSetCurSel
*/ */
static LRESULT CBSetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetCurSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
WORD wRet; WORD wRet;
@ -510,7 +510,7 @@ static LRESULT CBSetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetCurSel * CBGetCurSel
*/ */
static LRESULT CBGetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetCurSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return lphl->ItemFocused; return lphl->ItemFocused;
@ -519,7 +519,7 @@ static LRESULT CBGetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetItemHeight * CBGetItemHeight
*/ */
static LRESULT CBGetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetItemHeight(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPLISTSTRUCT lpls = ListBoxGetItem (lphl, wParam); LPLISTSTRUCT lpls = ListBoxGetItem (lphl, wParam);
@ -531,7 +531,7 @@ static LRESULT CBGetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetItemHeight * CBSetItemHeight
*/ */
static LRESULT CBSetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetItemHeight(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxSetItemHeight(lphl, wParam, lParam); return ListBoxSetItemHeight(lphl, wParam, lParam);
@ -540,7 +540,7 @@ static LRESULT CBSetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetRedraw * CBSetRedraw
*/ */
static LRESULT CBSetRedraw(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetRedraw(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
lphl->bRedrawFlag = wParam; lphl->bRedrawFlag = wParam;
@ -550,7 +550,7 @@ static LRESULT CBSetRedraw(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetFont * CBSetFont
*/ */
static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetFont(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -567,7 +567,7 @@ static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetLBTextLen * CBGetLBTextLen
*/ */
static LRESULT CBGetLBTextLen(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetLBTextLen(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
LPLISTSTRUCT lpls = ListBoxGetItem(lphl,wParam); LPLISTSTRUCT lpls = ListBoxGetItem(lphl,wParam);
@ -579,7 +579,7 @@ static LRESULT CBGetLBTextLen(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetLBText * CBGetLBText
*/ */
static LRESULT CBGetLBText(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetLBText(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxGetText(lphl, wParam, (LPSTR)PTR_SEG_TO_LIN(lParam)); return ListBoxGetText(lphl, wParam, (LPSTR)PTR_SEG_TO_LIN(lParam));
@ -588,7 +588,7 @@ static LRESULT CBGetLBText(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBGetItemData * CBGetItemData
*/ */
static LRESULT CBGetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetItemData(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxGetItemData(lphl, wParam); return ListBoxGetItemData(lphl, wParam);
@ -597,7 +597,7 @@ static LRESULT CBGetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBSetItemData * CBSetItemData
*/ */
static LRESULT CBSetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetItemData(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
return ListBoxSetItemData(lphl, wParam, lParam); return ListBoxSetItemData(lphl, wParam, lParam);
@ -606,7 +606,7 @@ static LRESULT CBSetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CBShowDropDown * CBShowDropDown
*/ */
static LRESULT CBShowDropDown(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBShowDropDown(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
RECT32 rect; RECT32 rect;
@ -691,7 +691,7 @@ static BOOL CBCheckSize(HWND hwnd)
/*********************************************************************** /***********************************************************************
* CBCommand * CBCommand
*/ */
static LRESULT CBCommand(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBCommand(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
LPHEADLIST lphl = ComboGetListHeader(hwnd); LPHEADLIST lphl = ComboGetListHeader(hwnd);
@ -751,7 +751,7 @@ static LRESULT CBCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
* CBGetEditSel * CBGetEditSel
* Look out! Under Win32, the parameter packing is very different. * Look out! Under Win32, the parameter packing is very different.
*/ */
static LRESULT CBGetEditSel(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBGetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -765,7 +765,7 @@ static LRESULT CBGetEditSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
* CBSetEditSel * CBSetEditSel
* Look out! Under Win32, the parameter packing is very different. * Look out! Under Win32, the parameter packing is very different.
*/ */
static LRESULT CBSetEditSel(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT CBSetEditSel(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd); LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
@ -778,7 +778,7 @@ static LRESULT CBSetEditSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* ComboWndProc * ComboWndProc
*/ */
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
switch(message) { switch(message) {
case WM_NCCREATE: return CBNCCreate(hwnd, wParam, lParam); case WM_NCCREATE: return CBNCCreate(hwnd, wParam, lParam);
@ -835,7 +835,7 @@ LPHEADLIST CLBoxGetListHeader(HWND hwnd)
/*********************************************************************** /***********************************************************************
* CBLCreate * CBLCreate
*/ */
static LRESULT CBLCreate( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLCreate( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
CREATESTRUCT16 *createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam); CREATESTRUCT16 *createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
SetWindowLong32A(hwnd,0,(LONG)createStruct->lpCreateParams); SetWindowLong32A(hwnd,0,(LONG)createStruct->lpCreateParams);
@ -845,7 +845,7 @@ static LRESULT CBLCreate( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLGetDlgCode * CBLGetDlgCode
*/ */
static LRESULT CBLGetDlgCode( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLGetDlgCode( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
return DLGC_WANTARROWS | DLGC_WANTCHARS; return DLGC_WANTARROWS | DLGC_WANTCHARS;
} }
@ -853,7 +853,7 @@ static LRESULT CBLGetDlgCode( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLKeyDown * CBLKeyDown
*/ */
static LRESULT CBLKeyDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLKeyDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
WORD newFocused = lphl->ItemFocused; WORD newFocused = lphl->ItemFocused;
@ -901,7 +901,7 @@ static LRESULT CBLKeyDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLChar * CBLChar
*/ */
static LRESULT CBLChar( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLChar( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
return 0; return 0;
} }
@ -909,7 +909,7 @@ static LRESULT CBLChar( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLPaint * CBLPaint
*/ */
static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLPaint( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
LPLISTSTRUCT lpls; LPLISTSTRUCT lpls;
@ -986,7 +986,7 @@ static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLKillFocus * CBLKillFocus
*/ */
static LRESULT CBLKillFocus( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLKillFocus( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
/* SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);*/ /* SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);*/
return 0; return 0;
@ -995,7 +995,7 @@ static LRESULT CBLKillFocus( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLActivate * CBLActivate
*/ */
static LRESULT CBLActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLActivate( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
if (wParam == WA_INACTIVE) if (wParam == WA_INACTIVE)
SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0); SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);
@ -1005,7 +1005,7 @@ static LRESULT CBLActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLLButtonDown * CBLLButtonDown
*/ */
static LRESULT CBLLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLLButtonDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
int y; int y;
@ -1030,7 +1030,7 @@ static LRESULT CBLLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLLButtonUp * CBLLButtonUp
*/ */
static LRESULT CBLLButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLLButtonUp( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
@ -1055,7 +1055,7 @@ static LRESULT CBLLButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam )
/*********************************************************************** /***********************************************************************
* CBLMouseMove * CBLMouseMove
*/ */
static LRESULT CBLMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLMouseMove( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
short y; short y;
@ -1102,7 +1102,7 @@ hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.rig
/*********************************************************************** /***********************************************************************
* CBLVScroll * CBLVScroll
*/ */
static LRESULT CBLVScroll( HWND hwnd, WPARAM wParam, LPARAM lParam ) static LRESULT CBLVScroll( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
LPHEADLIST lphl = CLBoxGetListHeader(hwnd); LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
int y; int y;
@ -1204,7 +1204,7 @@ static BOOL CBLCheckSize(HWND hwnd)
/*********************************************************************** /***********************************************************************
* ComboLBoxWndProc * ComboLBoxWndProc
*/ */
LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
switch(message) { switch(message) {
case WM_CREATE: return CBLCreate(hwnd, wParam, lParam); case WM_CREATE: return CBLCreate(hwnd, wParam, lParam);

View File

@ -86,7 +86,7 @@ typedef struct
#define EDIT_SEND_CTLCOLOR(wndPtr,hdc) \ #define EDIT_SEND_CTLCOLOR(wndPtr,hdc) \
(SendMessage32A((wndPtr)->parent->hwndSelf, WM_CTLCOLOREDIT, \ (SendMessage32A((wndPtr)->parent->hwndSelf, WM_CTLCOLOREDIT, \
(WPARAM)(hdc), (LPARAM)(wndPtr)->hwndSelf )) (WPARAM32)(hdc), (LPARAM)(wndPtr)->hwndSelf ))
#define EDIT_NOTIFY_PARENT(wndPtr, wNotifyCode) \ #define EDIT_NOTIFY_PARENT(wndPtr, wNotifyCode) \
(SendMessage32A((wndPtr)->parent->hwndSelf, WM_COMMAND, \ (SendMessage32A((wndPtr)->parent->hwndSelf, WM_COMMAND, \
MAKEWPARAM((wndPtr)->wIDmenu, wNotifyCode), \ MAKEWPARAM((wndPtr)->wIDmenu, wNotifyCode), \
@ -104,7 +104,7 @@ typedef struct
* Files like these should really be kept in alphabetical order. * Files like these should really be kept in alphabetical order.
* *
*/ */
LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM16 wParam, LPARAM lParam);
static void EDIT_BuildLineDefs(WND *wndPtr); static void EDIT_BuildLineDefs(WND *wndPtr);
static INT EDIT_CallWordBreakProc(WND *wndPtr, char *s, INT index, INT count, INT action); static INT EDIT_CallWordBreakProc(WND *wndPtr, char *s, INT index, INT count, INT action);
@ -117,7 +117,7 @@ static UINT EDIT_GetLineHeight(WND *wndPtr);
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT16 rc); static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT16 rc);
static char * EDIT_GetPointer(WND *wndPtr); static char * EDIT_GetPointer(WND *wndPtr);
static char * EDIT_GetPasswordPointer(WND *wndPtr); static char * EDIT_GetPasswordPointer(WND *wndPtr);
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static BOOL EDIT_GetRedraw(WND *wndPtr); static BOOL EDIT_GetRedraw(WND *wndPtr);
static UINT EDIT_GetTextWidth(WND *wndPtr); static UINT EDIT_GetTextWidth(WND *wndPtr);
static UINT EDIT_GetVisibleLineCount(WND *wndPtr); static UINT EDIT_GetVisibleLineCount(WND *wndPtr);
@ -136,74 +136,74 @@ static void EDIT_MovePageUp(WND *wndPtr, BOOL extend);
static void EDIT_MoveUpward(WND *wndPtr, BOOL extend); static void EDIT_MoveUpward(WND *wndPtr, BOOL extend);
static void EDIT_MoveWordBackward(WND *wndPtr, BOOL extend); static void EDIT_MoveWordBackward(WND *wndPtr, BOOL extend);
static void EDIT_MoveWordForward(WND *wndPtr, BOOL extend); static void EDIT_MoveWordForward(WND *wndPtr, BOOL extend);
static void EDIT_PaintLine(WND *wndPtr, HDC hdc, UINT line, BOOL rev); static void EDIT_PaintLine(WND *wndPtr, HDC32 hdc, UINT line, BOOL rev);
static UINT EDIT_PaintText(WND *wndPtr, HDC hdc, INT x, INT y, UINT line, UINT col, UINT count, BOOL rev); static UINT EDIT_PaintText(WND *wndPtr, HDC32 hdc, INT x, INT y, UINT line, UINT col, UINT count, BOOL rev);
static void EDIT_ReleasePointer(WND *wndPtr); static void EDIT_ReleasePointer(WND *wndPtr);
static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static void EDIT_ScrollIntoView(WND *wndPtr); static void EDIT_ScrollIntoView(WND *wndPtr);
static INT EDIT_WndXFromCol(WND *wndPtr, UINT line, UINT col); static INT EDIT_WndXFromCol(WND *wndPtr, UINT line, UINT col);
static INT EDIT_WndYFromLine(WND *wndPtr, UINT line); static INT EDIT_WndYFromLine(WND *wndPtr, UINT line);
static INT EDIT_WordBreakProc(char *s, INT index, INT count, INT action); static INT EDIT_WordBreakProc(char *s, INT index, INT count, INT action);
static LRESULT EDIT_EM_CanUndo(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_CanUndo(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_EmptyUndoBuffer(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_EmptyUndoBuffer(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_FmtLines(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_FmtLines(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetFirstVisibleLine(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetFirstVisibleLine(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetHandle(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetLine(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetLine(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetLineCount(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetLineCount(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetModify(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetPasswordChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetThumb(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetThumb(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_GetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_GetWordBreakProc(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_LimitText(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_LimitText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_LineFromChar(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_LineFromChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_LineIndex(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_LineIndex(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_LineLength(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_LineLength(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_ReplaceSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_Scroll(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_Scroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetModify(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetPasswordChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetReadOnly(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetReadOnly(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetRectNP(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetRectNP(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_SetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_SetWordBreakProc(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_EM_Undo(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_EM_Undo(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Char(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Char(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Cut(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Cut(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Destroy(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Destroy(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_GetDlgCode(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_GetDlgCode(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_GetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_GetFont(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_GetText(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_GetText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_GetTextLength(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_GetTextLength(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_HScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_HScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_KeyDown(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_KeyDown(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_KillFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_KillFocus(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_LButtonDblClk(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_LButtonDblClk(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_LButtonDown(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_LButtonDown(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_LButtonUp(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_LButtonUp(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Paste(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Paste(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_SetFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_SetFocus(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_SetRedraw(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_SetRedraw(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_SetText(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_SetText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
static LRESULT EDIT_WM_VScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam); static LRESULT EDIT_WM_VScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam);
/********************************************************************* /*********************************************************************
@ -235,7 +235,7 @@ static LRESULT EDIT_WM_VScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam);
* EditWndProc() * EditWndProc()
* *
*/ */
LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM16 wParam, LPARAM lParam)
{ {
LRESULT lResult = 0L; LRESULT lResult = 0L;
WND *wndPtr = WIN_FindWndPtr(hwnd); WND *wndPtr = WIN_FindWndPtr(hwnd);
@ -482,7 +482,10 @@ LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
lResult = EDIT_WM_VScroll(wndPtr, wParam, lParam); lResult = EDIT_WM_VScroll(wndPtr, wParam, lParam);
break; break;
default: default:
if (msg >= WM_USER) /* Some programs pass messages obtained through
* RegisterWindowMessage() (>= 0xc000); we just ignore them
*/
if ((msg >= WM_USER) && (msg < 0xc000))
fprintf(stdnimp, "edit: undocumented message %d >= WM_USER, please report.\n", msg); fprintf(stdnimp, "edit: undocumented message %d >= WM_USER, please report.\n", msg);
lResult = DefWindowProc16(hwnd, msg, wParam, lParam); lResult = DefWindowProc16(hwnd, msg, wParam, lParam);
break; break;
@ -796,7 +799,7 @@ static char *EDIT_GetPasswordPointer(WND *wndPtr)
* It is used internally, as if there were no pointer difficulties. * It is used internally, as if there were no pointer difficulties.
* *
*/ */
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
GetClientRect16( wndPtr->hwndSelf, (LPRECT16)lParam ); GetClientRect16( wndPtr->hwndSelf, (LPRECT16)lParam );
return 0L; return 0L;
@ -1246,7 +1249,7 @@ static void EDIT_MoveWordForward(WND *wndPtr, BOOL extend)
* EDIT_PaintLine * EDIT_PaintLine
* *
*/ */
static void EDIT_PaintLine(WND *wndPtr, HDC hdc, UINT line, BOOL rev) static void EDIT_PaintLine(WND *wndPtr, HDC32 hdc, UINT line, BOOL rev)
{ {
UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L); UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L);
UINT vlc = EDIT_GetVisibleLineCount(wndPtr); UINT vlc = EDIT_GetVisibleLineCount(wndPtr);
@ -1288,7 +1291,7 @@ static void EDIT_PaintLine(WND *wndPtr, HDC hdc, UINT line, BOOL rev)
* EDIT_PaintText * EDIT_PaintText
* *
*/ */
static UINT EDIT_PaintText(WND *wndPtr, HDC hdc, INT x, INT y, UINT line, UINT col, UINT count, BOOL rev) static UINT EDIT_PaintText(WND *wndPtr, HDC32 hdc, INT x, INT y, UINT line, UINT col, UINT count, BOOL rev)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
COLORREF BkColor; COLORREF BkColor;
@ -1349,7 +1352,7 @@ static void EDIT_ReleasePointer(WND *wndPtr)
* It is used internally, as if there were no pointer difficulties. * It is used internally, as if there were no pointer difficulties.
* *
*/ */
static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
const char *str = (char *)lParam; const char *str = (char *)lParam;
int strl = strlen(str); int strl = strlen(str);
@ -1556,7 +1559,7 @@ static INT EDIT_WordBreakProc(char *s, INT index, INT count, INT action)
* EM_CANUNDO * EM_CANUNDO
* *
*/ */
static LRESULT EDIT_EM_CanUndo(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_CanUndo(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return 0L; return 0L;
} }
@ -1567,7 +1570,7 @@ static LRESULT EDIT_EM_CanUndo(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_EMPTYUNDOBUFFER * EM_EMPTYUNDOBUFFER
* *
*/ */
static LRESULT EDIT_EM_EmptyUndoBuffer(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_EmptyUndoBuffer(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return 0L; return 0L;
} }
@ -1578,7 +1581,7 @@ static LRESULT EDIT_EM_EmptyUndoBuffer(WND *wndPtr, WPARAM wParam, LPARAM lParam
* EM_FMTLINES * EM_FMTLINES
* *
*/ */
static LRESULT EDIT_EM_FmtLines(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_FmtLines(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
fprintf(stdnimp, "edit: EM_FMTLINES: message not implemented.\n"); fprintf(stdnimp, "edit: EM_FMTLINES: message not implemented.\n");
return wParam ? -1L : 0L; return wParam ? -1L : 0L;
@ -1590,7 +1593,7 @@ static LRESULT EDIT_EM_FmtLines(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETFIRSTVISIBLELINE * EM_GETFIRSTVISIBLELINE
* *
*/ */
static LRESULT EDIT_EM_GetFirstVisibleLine(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetFirstVisibleLine(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1603,7 +1606,7 @@ static LRESULT EDIT_EM_GetFirstVisibleLine(WND *wndPtr, WPARAM wParam, LPARAM lP
* EM_GETHANDLE * EM_GETHANDLE
* *
*/ */
static LRESULT EDIT_EM_GetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetHandle(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1616,7 +1619,7 @@ static LRESULT EDIT_EM_GetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETLINE * EM_GETLINE
* *
*/ */
static LRESULT EDIT_EM_GetLine(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetLine(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
char *text; char *text;
char *src; char *src;
@ -1647,7 +1650,7 @@ static LRESULT EDIT_EM_GetLine(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETLINECOUNT * EM_GETLINECOUNT
* *
*/ */
static LRESULT EDIT_EM_GetLineCount(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetLineCount(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1660,7 +1663,7 @@ static LRESULT EDIT_EM_GetLineCount(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETMODIFY * EM_GETMODIFY
* *
*/ */
static LRESULT EDIT_EM_GetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetModify(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1673,7 +1676,7 @@ static LRESULT EDIT_EM_GetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETPASSWORDCHAR * EM_GETPASSWORDCHAR
* *
*/ */
static LRESULT EDIT_EM_GetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetPasswordChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1686,7 +1689,7 @@ static LRESULT EDIT_EM_GetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam
* EM_GETRECT * EM_GETRECT
* *
*/ */
static LRESULT EDIT_EM_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return EDIT_GetRect(wndPtr, wParam, (LPARAM)PTR_SEG_TO_LIN(lParam)); return EDIT_GetRect(wndPtr, wParam, (LPARAM)PTR_SEG_TO_LIN(lParam));
} }
@ -1697,7 +1700,7 @@ static LRESULT EDIT_EM_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETSEL * EM_GETSEL
* *
*/ */
static LRESULT EDIT_EM_GetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1712,7 +1715,7 @@ static LRESULT EDIT_EM_GetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* FIXME: undocumented: is this right ? * FIXME: undocumented: is this right ?
* *
*/ */
static LRESULT EDIT_EM_GetThumb(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetThumb(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return MAKELONG(EDIT_WM_VScroll(wndPtr, EM_GETTHUMB, 0L), return MAKELONG(EDIT_WM_VScroll(wndPtr, EM_GETTHUMB, 0L),
EDIT_WM_HScroll(wndPtr, EM_GETTHUMB, 0L)); EDIT_WM_HScroll(wndPtr, EM_GETTHUMB, 0L));
@ -1724,7 +1727,7 @@ static LRESULT EDIT_EM_GetThumb(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_GETWORDBREAKPROC * EM_GETWORDBREAKPROC
* *
*/ */
static LRESULT EDIT_EM_GetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_GetWordBreakProc(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1737,7 +1740,7 @@ static LRESULT EDIT_EM_GetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lPara
* EM_LIMITTEXT * EM_LIMITTEXT
* *
*/ */
static LRESULT EDIT_EM_LimitText(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_LimitText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1761,7 +1764,7 @@ static LRESULT EDIT_EM_LimitText(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_LINEFROMCHAR * EM_LINEFROMCHAR
* *
*/ */
static LRESULT EDIT_EM_LineFromChar(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_LineFromChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT l; UINT l;
@ -1781,7 +1784,7 @@ static LRESULT EDIT_EM_LineFromChar(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_LINEINDEX * EM_LINEINDEX
* *
*/ */
static LRESULT EDIT_EM_LineIndex(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_LineIndex(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
UINT e; UINT e;
@ -1806,7 +1809,7 @@ static LRESULT EDIT_EM_LineIndex(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_LINELENGTH * EM_LINELENGTH
* *
*/ */
static LRESULT EDIT_EM_LineLength(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_LineLength(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
UINT s; UINT s;
@ -1834,7 +1837,7 @@ static LRESULT EDIT_EM_LineLength(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_LINESCROLL * EM_LINESCROLL
* *
*/ */
static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L); UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
@ -1882,7 +1885,7 @@ static LRESULT EDIT_EM_LineScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_REPLACESEL * EM_REPLACESEL
* *
*/ */
static LRESULT EDIT_EM_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_ReplaceSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return (LRESULT)EDIT_ReplaceSel(wndPtr, wParam, return (LRESULT)EDIT_ReplaceSel(wndPtr, wParam,
(LPARAM)(char *)PTR_SEG_TO_LIN(lParam)); (LPARAM)(char *)PTR_SEG_TO_LIN(lParam));
@ -1896,7 +1899,7 @@ static LRESULT EDIT_EM_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* FIXME: undocumented message. * FIXME: undocumented message.
* *
*/ */
static LRESULT EDIT_EM_Scroll(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_Scroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
fprintf(stdnimp, "edit: EM_SCROLL: message not implemented (undocumented), please report.\n"); fprintf(stdnimp, "edit: EM_SCROLL: message not implemented (undocumented), please report.\n");
return 0L; return 0L;
@ -1908,7 +1911,7 @@ static LRESULT EDIT_EM_Scroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETHANDLE * EM_SETHANDLE
* *
*/ */
static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1938,7 +1941,7 @@ static LRESULT EDIT_EM_SetHandle(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETMODIFY * EM_SETMODIFY
* *
*/ */
static LRESULT EDIT_EM_SetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetModify(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1952,7 +1955,7 @@ static LRESULT EDIT_EM_SetModify(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETPASSWORDCHAR * EM_SETPASSWORDCHAR
* *
*/ */
static LRESULT EDIT_EM_SetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetPasswordChar(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -1966,7 +1969,7 @@ static LRESULT EDIT_EM_SetPasswordChar(WND *wndPtr, WPARAM wParam, LPARAM lParam
* EM_SETREADONLY * EM_SETREADONLY
* *
*/ */
static LRESULT EDIT_EM_SetReadOnly(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetReadOnly(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
if ((BOOL)wParam) if ((BOOL)wParam)
wndPtr->dwStyle |= ES_READONLY; wndPtr->dwStyle |= ES_READONLY;
@ -1981,7 +1984,7 @@ static LRESULT EDIT_EM_SetReadOnly(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETRECT * EM_SETRECT
* *
*/ */
static LRESULT EDIT_EM_SetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetRect(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
fprintf(stdnimp,"edit: EM_SETRECT: message not implemented, please report.\n"); fprintf(stdnimp,"edit: EM_SETRECT: message not implemented, please report.\n");
return 0L; return 0L;
@ -1993,7 +1996,7 @@ static LRESULT EDIT_EM_SetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETRECTNP * EM_SETRECTNP
* *
*/ */
static LRESULT EDIT_EM_SetRectNP(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetRectNP(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
fprintf(stdnimp,"edit: EM_SETRECTNP: message not implemented, please report.\n"); fprintf(stdnimp,"edit: EM_SETRECTNP: message not implemented, please report.\n");
return 0L; return 0L;
@ -2005,7 +2008,7 @@ static LRESULT EDIT_EM_SetRectNP(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETSEL * EM_SETSEL
* *
*/ */
static LRESULT EDIT_EM_SetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetSel(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
UINT ns = LOWORD(lParam); UINT ns = LOWORD(lParam);
@ -2056,7 +2059,7 @@ static LRESULT EDIT_EM_SetSel(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETTABSTOPS * EM_SETTABSTOPS
* *
*/ */
static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2081,7 +2084,7 @@ static LRESULT EDIT_EM_SetTabStops(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* EM_SETWORDBREAKPROC * EM_SETWORDBREAKPROC
* *
*/ */
static LRESULT EDIT_EM_SetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_SetWordBreakProc(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2095,7 +2098,7 @@ static LRESULT EDIT_EM_SetWordBreakProc(WND *wndPtr, WPARAM wParam, LPARAM lPara
* EM_UNDO * EM_UNDO
* *
*/ */
static LRESULT EDIT_EM_Undo(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_EM_Undo(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return 0L; return 0L;
} }
@ -2106,7 +2109,7 @@ static LRESULT EDIT_EM_Undo(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_CHAR * WM_CHAR
* *
*/ */
static LRESULT EDIT_WM_Char(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Char(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
char str[2]; char str[2];
unsigned char c = (unsigned char)wParam; unsigned char c = (unsigned char)wParam;
@ -2143,7 +2146,7 @@ static LRESULT EDIT_WM_Char(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_CLEAR * WM_CLEAR
* *
*/ */
static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
@ -2175,7 +2178,7 @@ static LRESULT EDIT_WM_Clear(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_COPY * WM_COPY
* *
*/ */
static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
@ -2209,7 +2212,7 @@ static LRESULT EDIT_WM_Copy(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_CREATE * WM_CREATE
* *
*/ */
static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam); CREATESTRUCT16 *cs = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
EDITSTATE *es; EDITSTATE *es;
@ -2267,7 +2270,7 @@ static LRESULT EDIT_WM_Create(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_CUT * WM_CUT
* *
*/ */
static LRESULT EDIT_WM_Cut(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Cut(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDIT_WM_Copy(wndPtr, 0, 0L); EDIT_WM_Copy(wndPtr, 0, 0L);
EDIT_WM_Clear(wndPtr, 0, 0L); EDIT_WM_Clear(wndPtr, 0, 0L);
@ -2280,7 +2283,7 @@ static LRESULT EDIT_WM_Cut(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_DESTROY * WM_DESTROY
* *
*/ */
static LRESULT EDIT_WM_Destroy(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Destroy(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2300,7 +2303,7 @@ static LRESULT EDIT_WM_Destroy(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_ENABLE * WM_ENABLE
* *
*/ */
static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDIT_InvalidateText(wndPtr, 0, -1); EDIT_InvalidateText(wndPtr, 0, -1);
return 0L; return 0L;
@ -2312,7 +2315,7 @@ static LRESULT EDIT_WM_Enable(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_ERASEBKGND * WM_ERASEBKGND
* *
*/ */
static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
HBRUSH16 hBrush; HBRUSH16 hBrush;
RECT16 rc; RECT16 rc;
@ -2322,15 +2325,15 @@ static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam)
hBrush = (HBRUSH16)GetStockObject(WHITE_BRUSH); hBrush = (HBRUSH16)GetStockObject(WHITE_BRUSH);
GetClientRect16(wndPtr->hwndSelf, &rc); GetClientRect16(wndPtr->hwndSelf, &rc);
IntersectClipRect((HDC)wParam, rc.left, rc.top, rc.right, rc.bottom); IntersectClipRect((HDC16)wParam, rc.left, rc.top, rc.right, rc.bottom);
GetClipBox16((HDC)wParam, &rc); GetClipBox16((HDC16)wParam, &rc);
/* /*
* FIXME: specs say that we should UnrealizeObject() the brush, * FIXME: specs say that we should UnrealizeObject() the brush,
* but the specs of UnrealizeObject() say that we shouldn't * but the specs of UnrealizeObject() say that we shouldn't
* unrealize a stock object. The default brush that * unrealize a stock object. The default brush that
* DefWndProc() returns is ... a stock object. * DefWndProc() returns is ... a stock object.
*/ */
FillRect16((HDC)wParam, &rc, hBrush); FillRect16((HDC16)wParam, &rc, hBrush);
return -1L; return -1L;
} }
@ -2340,7 +2343,7 @@ static LRESULT EDIT_WM_EraseBkGnd(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_GETDLGCODE * WM_GETDLGCODE
* *
*/ */
static LRESULT EDIT_WM_GetDlgCode(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_GetDlgCode(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
return DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS; return DLGC_HASSETSEL | DLGC_WANTCHARS | DLGC_WANTARROWS;
} }
@ -2351,7 +2354,7 @@ static LRESULT EDIT_WM_GetDlgCode(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_GETFONT * WM_GETFONT
* *
*/ */
static LRESULT EDIT_WM_GetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_GetFont(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2364,7 +2367,7 @@ static LRESULT EDIT_WM_GetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_GETTEXT * WM_GETTEXT
* *
*/ */
static LRESULT EDIT_WM_GetText(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_GetText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
char *text = EDIT_GetPointer(wndPtr); char *text = EDIT_GetPointer(wndPtr);
int len; int len;
@ -2384,7 +2387,7 @@ static LRESULT EDIT_WM_GetText(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_GETTEXTLENGTH * WM_GETTEXTLENGTH
* *
*/ */
static LRESULT EDIT_WM_GetTextLength(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_GetTextLength(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
char *text = EDIT_GetPointer(wndPtr); char *text = EDIT_GetPointer(wndPtr);
@ -2399,7 +2402,7 @@ static LRESULT EDIT_WM_GetTextLength(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* FIXME: scrollbar code itself is broken, so this one is a hack. * FIXME: scrollbar code itself is broken, so this one is a hack.
* *
*/ */
static LRESULT EDIT_WM_HScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_HScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT ww = EDIT_GetWndWidth(wndPtr); UINT ww = EDIT_GetWndWidth(wndPtr);
UINT tw = EDIT_GetTextWidth(wndPtr); UINT tw = EDIT_GetTextWidth(wndPtr);
@ -2463,7 +2466,7 @@ static LRESULT EDIT_WM_HScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* (i.e. non-printable keys) & Backspace & Delete * (i.e. non-printable keys) & Backspace & Delete
* *
*/ */
static LRESULT EDIT_WM_KeyDown(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_KeyDown(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
@ -2550,7 +2553,7 @@ static LRESULT EDIT_WM_KeyDown(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_KILLFOCUS * WM_KILLFOCUS
* *
*/ */
static LRESULT EDIT_WM_KillFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_KillFocus(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s; UINT s;
UINT e; UINT e;
@ -2573,7 +2576,7 @@ static LRESULT EDIT_WM_KillFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* The caret position has been set on the WM_LBUTTONDOWN message * The caret position has been set on the WM_LBUTTONDOWN message
* *
*/ */
static LRESULT EDIT_WM_LButtonDblClk(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_LButtonDblClk(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s; UINT s;
UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
@ -2594,7 +2597,7 @@ static LRESULT EDIT_WM_LButtonDblClk(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_LBUTTONDOWN * WM_LBUTTONDOWN
* *
*/ */
static LRESULT EDIT_WM_LButtonDown(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_LButtonDown(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
INT x = (INT)LOWORD(lParam); INT x = (INT)LOWORD(lParam);
INT y = (INT)HIWORD(lParam); INT y = (INT)HIWORD(lParam);
@ -2627,7 +2630,7 @@ static LRESULT EDIT_WM_LButtonDown(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_LBUTTONUP * WM_LBUTTONUP
* *
*/ */
static LRESULT EDIT_WM_LButtonUp(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_LButtonUp(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
if (GetCapture32() == wndPtr->hwndSelf) if (GetCapture32() == wndPtr->hwndSelf)
ReleaseCapture(); ReleaseCapture();
@ -2640,7 +2643,7 @@ static LRESULT EDIT_WM_LButtonUp(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_MOUSEMOVE * WM_MOUSEMOVE
* *
*/ */
static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
INT x; INT x;
INT y; INT y;
@ -2673,7 +2676,7 @@ static LRESULT EDIT_WM_MouseMove(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_PAINT * WM_PAINT
* *
*/ */
static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
PAINTSTRUCT16 ps; PAINTSTRUCT16 ps;
UINT i; UINT i;
@ -2717,7 +2720,7 @@ static LRESULT EDIT_WM_Paint(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_PASTE * WM_PASTE
* *
*/ */
static LRESULT EDIT_WM_Paste(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Paste(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
HGLOBAL16 hsrc; HGLOBAL16 hsrc;
char *src; char *src;
@ -2738,7 +2741,7 @@ static LRESULT EDIT_WM_Paste(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SETCURSOR * WM_SETCURSOR
* *
*/ */
static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
if (LOWORD(lParam) == HTCLIENT) { if (LOWORD(lParam) == HTCLIENT) {
SetCursor(LoadCursor16(0, IDC_IBEAM)); SetCursor(LoadCursor16(0, IDC_IBEAM));
@ -2753,7 +2756,7 @@ static LRESULT EDIT_WM_SetCursor(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SETFOCUS * WM_SETFOCUS
* *
*/ */
static LRESULT EDIT_WM_SetFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_SetFocus(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT s = LOWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L)); UINT e = HIWORD(EDIT_EM_GetSel(wndPtr, 0, 0L));
@ -2773,7 +2776,7 @@ static LRESULT EDIT_WM_SetFocus(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SETFONT * WM_SETFONT
* *
*/ */
static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
TEXTMETRIC16 tm; TEXTMETRIC16 tm;
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2809,7 +2812,7 @@ static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SETREDRAW * WM_SETREDRAW
* *
*/ */
static LRESULT EDIT_WM_SetRedraw(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_SetRedraw(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDITSTATE *es = EDITSTATEPTR(wndPtr); EDITSTATE *es = EDITSTATEPTR(wndPtr);
@ -2823,7 +2826,7 @@ static LRESULT EDIT_WM_SetRedraw(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SETTEXT * WM_SETTEXT
* *
*/ */
static LRESULT EDIT_WM_SetText(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_SetText(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
EDIT_EM_SetSel(wndPtr, 1, MAKELPARAM(0, -1)); EDIT_EM_SetSel(wndPtr, 1, MAKELPARAM(0, -1));
EDIT_WM_Clear(wndPtr, 0, 0L); EDIT_WM_Clear(wndPtr, 0, 0L);
@ -2841,7 +2844,7 @@ static LRESULT EDIT_WM_SetText(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* WM_SIZE * WM_SIZE
* *
*/ */
static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
if (EDIT_GetRedraw(wndPtr) && if (EDIT_GetRedraw(wndPtr) &&
((wParam == SIZE_MAXIMIZED) || ((wParam == SIZE_MAXIMIZED) ||
@ -2861,7 +2864,7 @@ static LRESULT EDIT_WM_Size(WND *wndPtr, WPARAM wParam, LPARAM lParam)
* FIXME: scrollbar code itself is broken, so this one is a hack. * FIXME: scrollbar code itself is broken, so this one is a hack.
* *
*/ */
static LRESULT EDIT_WM_VScroll(WND *wndPtr, WPARAM wParam, LPARAM lParam) static LRESULT EDIT_WM_VScroll(WND *wndPtr, WPARAM32 wParam, LPARAM lParam)
{ {
UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L); UINT lc = (UINT)EDIT_EM_GetLineCount(wndPtr, 0, 0L);
UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L); UINT fv = (UINT)EDIT_EM_GetFirstVisibleLine(wndPtr, 0, 0L);

View File

@ -200,8 +200,8 @@ LPLISTSTRUCT ListBoxGetItem(LPHEADLIST lphl, UINT uIndex)
} }
void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, LPLISTSTRUCT lpls, void ListBoxDrawItem(HWND hwnd, LPHEADLIST lphl, HDC16 hdc, LPLISTSTRUCT lpls,
RECT16 *rect, WORD itemAction, WORD itemState) RECT16 *rect, WORD itemAction, WORD itemState)
{ {
if (lphl->OwnerDrawn) if (lphl->OwnerDrawn)
{ {
@ -286,7 +286,7 @@ BOOL32 lbDeleteItemNotify(LPHEADLIST lphl, LPLISTSTRUCT lpls)
delItem->hwndItem = lphl->hSelf; delItem->hwndItem = lphl->hSelf;
delItem->itemData = lpls->mis.itemData; delItem->itemData = lpls->mis.itemData;
ret = SendMessage16( lphl->hParent, WM_DELETEITEM, (WPARAM)lphl->CtlID, ret = SendMessage16( lphl->hParent, WM_DELETEITEM, (WPARAM16)lphl->CtlID,
(LPARAM)SEGPTR_GET(delItem) ); (LPARAM)SEGPTR_GET(delItem) );
SEGPTR_FREE(delItem); SEGPTR_FREE(delItem);
return ret; return ret;
@ -397,7 +397,8 @@ int ListBoxAskCompare(LPHEADLIST lphl, int startItem, SEGPTR matchData, BOOL exa
itemCmp->itemID2 = -1; itemCmp->itemID2 = -1;
itemCmp->itemData2 = matchData; itemCmp->itemData2 = matchData;
b = SendMessage16( lphl->hParent, WM_COMPAREITEM, (WPARAM)lphl->CtlID, b = SendMessage16( lphl->hParent, WM_COMPAREITEM,
(WPARAM16)lphl->CtlID,
(LPARAM)SEGPTR_GET(itemCmp) ); (LPARAM)SEGPTR_GET(itemCmp) );
} }
@ -1400,7 +1401,7 @@ static LONG LBSetRedraw(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************** /***********************************************************************
* LBSetFont * LBSetFont
*/ */
static LONG LBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam) static LONG LBSetFont(HWND hwnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd); LPHEADLIST lphl = ListBoxGetStorageHeader(hwnd);
HDC32 hdc; HDC32 hdc;
@ -1455,7 +1456,7 @@ static LONG LBPaint(HWND hwnd, WORD wParam, LONG lParam)
hOldFont = SelectObject(hdc, lphl->hFont); hOldFont = SelectObject(hdc, lphl->hFont);
hBrush = (HBRUSH16)SendMessage32A( lphl->hParent, WM_CTLCOLORLISTBOX, hBrush = (HBRUSH16)SendMessage32A( lphl->hParent, WM_CTLCOLORLISTBOX,
(WPARAM)hdc, (LPARAM)hwnd); (WPARAM32)hdc, (LPARAM)hwnd);
if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH); if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
FillRect16(hdc, &rect, hBrush); FillRect16(hdc, &rect, hBrush);
@ -2076,7 +2077,7 @@ static LONG LBSetItemHeight(HWND hwnd, WORD wParam, LONG lParam)
/*********************************************************************** /***********************************************************************
* LBPassToParent * LBPassToParent
*/ */
static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
WND* ptrWnd = WIN_FindWndPtr(hwnd); WND* ptrWnd = WIN_FindWndPtr(hwnd);
@ -2090,7 +2091,7 @@ static LRESULT LBPassToParent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
/*********************************************************************** /***********************************************************************
* ListBoxWndProc * ListBoxWndProc
*/ */
LRESULT ListBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT ListBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
switch (message) { switch (message) {
case WM_CREATE: return LBCreate(hwnd, wParam, lParam); case WM_CREATE: return LBCreate(hwnd, wParam, lParam);

View File

@ -87,7 +87,7 @@ static BOOL fEndMenuCalled = FALSE;
#define IS_STRING_ITEM(flags) (!((flags) & (MF_BITMAP | MF_OWNERDRAW | \ #define IS_STRING_ITEM(flags) (!((flags) & (MF_BITMAP | MF_OWNERDRAW | \
MF_MENUBARBREAK | MF_MENUBREAK | MF_SEPARATOR))) MF_MENUBARBREAK | MF_MENUBREAK | MF_SEPARATOR)))
extern void NC_DrawSysButton(HWND hwnd, HDC hdc, BOOL down); /* nonclient.c */ extern void NC_DrawSysButton(HWND hwnd, HDC32 hdc, BOOL down); /*nonclient.c*/
extern BOOL NC_GetSysPopupPos(WND* wndPtr, RECT16* rect); extern BOOL NC_GetSysPopupPos(WND* wndPtr, RECT16* rect);
extern HTASK16 TASK_GetNextTask(HTASK16); extern HTASK16 TASK_GetNextTask(HTASK16);
@ -345,7 +345,7 @@ static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU16 hmenu, UINT key )
* *
* Calculate the size of the menu item and store it in lpitem->rect. * Calculate the size of the menu item and store it in lpitem->rect.
*/ */
static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner, static void MENU_CalcItemSize( HDC32 hdc, MENUITEM *lpitem, HWND hwndOwner,
int orgX, int orgY, BOOL menuBar ) int orgX, int orgY, BOOL menuBar )
{ {
DWORD dwSize; DWORD dwSize;
@ -484,8 +484,8 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
* *
* Calculate the size of the menu bar. * Calculate the size of the menu bar.
*/ */
static void MENU_MenuBarCalcSize( HDC hdc, LPRECT16 lprect, LPPOPUPMENU lppop, static void MENU_MenuBarCalcSize( HDC32 hdc, LPRECT16 lprect,
HWND hwndOwner ) LPPOPUPMENU lppop, HWND hwndOwner )
{ {
MENUITEM *lpitem; MENUITEM *lpitem;
int start, i, orgX, orgY, maxY, helpPos; int start, i, orgX, orgY, maxY, helpPos;
@ -552,7 +552,7 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT16 lprect, LPPOPUPMENU lppop,
* *
* Draw a single menu item. * Draw a single menu item.
*/ */
static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, MENUITEM *lpitem, static void MENU_DrawMenuItem( HWND hwnd, HDC32 hdc, MENUITEM *lpitem,
UINT height, BOOL menuBar ) UINT height, BOOL menuBar )
{ {
RECT16 rect; RECT16 rect;
@ -704,7 +704,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HDC hdc, MENUITEM *lpitem,
* *
* Paint a popup menu. * Paint a popup menu.
*/ */
static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU16 hmenu ) static void MENU_DrawPopupMenu( HWND hwnd, HDC32 hdc, HMENU16 hmenu )
{ {
POPUPMENU *menu; POPUPMENU *menu;
MENUITEM *item; MENUITEM *item;
@ -725,7 +725,8 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU16 hmenu )
* *
* Paint a menu bar. Returns the height of the menu bar. * Paint a menu bar. Returns the height of the menu bar.
*/ */
UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw) UINT MENU_DrawMenuBar( HDC32 hDC, LPRECT16 lprect, HWND hwnd,
BOOL suppress_draw)
{ {
LPPOPUPMENU lppop; LPPOPUPMENU lppop;
int i; int i;
@ -803,7 +804,7 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU16 hmenu, UINT id, int x, int y,
menu->items[menu->FocusedItem].item_flags &= ~(MF_HILITE|MF_MOUSESELECT); menu->items[menu->FocusedItem].item_flags &= ~(MF_HILITE|MF_MOUSESELECT);
menu->FocusedItem = NO_SELECTED_ITEM; menu->FocusedItem = NO_SELECTED_ITEM;
} }
SendMessage16( hwndOwner, WM_INITMENUPOPUP, (WPARAM)hmenu, SendMessage16( hwndOwner, WM_INITMENUPOPUP, (WPARAM16)hmenu,
MAKELONG( id, (menu->wFlags & MF_SYSMENU) ? 1 : 0 )); MAKELONG( id, (menu->wFlags & MF_SYSMENU) ? 1 : 0 ));
MENU_PopupMenuCalcSize( menu, hwndOwner ); MENU_PopupMenuCalcSize( menu, hwndOwner );
@ -862,7 +863,7 @@ static BOOL MENU_ShowPopup(HWND hwndOwner, HMENU16 hmenu, UINT id, int x, int y,
if( !skip_init ) if( !skip_init )
{ {
MENU_SwitchTPWndTo(GetCurrentTask()); MENU_SwitchTPWndTo(GetCurrentTask());
SendMessage16( pTopPWnd->hwndSelf, WM_USER, (WPARAM)hmenu, 0L); SendMessage16( pTopPWnd->hwndSelf, WM_USER, (WPARAM16)hmenu, 0L);
} }
menu->hWnd = pTopPWnd->hwndSelf; menu->hWnd = pTopPWnd->hwndSelf;
} }
@ -1470,7 +1471,7 @@ static LRESULT MENU_DoNextMenu( HWND* hwndOwner, HMENU16* hmenu,
|| menu->FocusedItem == SYSMENU_SELECTED || menu->FocusedItem == SYSMENU_SELECTED
|| ((menu->wFlags & (MF_POPUP | MF_SYSMENU)) == (MF_POPUP | MF_SYSMENU)) ) || ((menu->wFlags & (MF_POPUP | MF_SYSMENU)) == (MF_POPUP | MF_SYSMENU)) )
{ {
LRESULT l = SendMessage16( *hwndOwner, WM_NEXTMENU, (WPARAM)vk, LRESULT l = SendMessage16( *hwndOwner, WM_NEXTMENU, (WPARAM16)vk,
(LPARAM)((menu->FocusedItem == SYSMENU_SELECTED) (LPARAM)((menu->FocusedItem == SYSMENU_SELECTED)
? GetSystemMenu( *hwndOwner, 0) ? GetSystemMenu( *hwndOwner, 0)
: *hmenu)); : *hmenu));
@ -1930,7 +1931,7 @@ BOOL32 TrackPopupMenu32( HMENU32 hMenu, UINT32 wFlags, INT32 x, INT32 y,
/*********************************************************************** /***********************************************************************
* PopupMenuWndProc * PopupMenuWndProc
*/ */
LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam)
{ {
switch(message) switch(message)
{ {

View File

@ -6,19 +6,19 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <windows.h> #include "windows.h"
#include "win.h" #include "win.h"
#include "static.h" #include "static.h"
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc ); static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc ); static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc );
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc ); static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc );
static COLORREF color_windowframe, color_background, color_window; static COLORREF color_windowframe, color_background, color_window;
typedef void (*pfPaint)( WND *, HDC); typedef void (*pfPaint)( WND *, HDC32 );
#define LAST_STATIC_TYPE SS_LEFTNOWORDWRAP #define LAST_STATIC_TYPE SS_LEFTNOWORDWRAP
@ -67,7 +67,7 @@ static HICON16 STATIC_SetIcon( WND *wndPtr, HICON16 hicon )
/*********************************************************************** /***********************************************************************
* StaticWndProc * StaticWndProc
*/ */
LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM16 wParam, LPARAM lParam)
{ {
LRESULT lResult = 0; LRESULT lResult = 0;
WND *wndPtr = WIN_FindWndPtr(hWnd); WND *wndPtr = WIN_FindWndPtr(hWnd);
@ -180,7 +180,7 @@ LRESULT StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
} }
static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc ) static void STATIC_PaintTextfn( WND *wndPtr, HDC32 hdc )
{ {
RECT16 rc; RECT16 rc;
HBRUSH16 hBrush; HBRUSH16 hBrush;
@ -228,7 +228,7 @@ static void STATIC_PaintTextfn( WND *wndPtr, HDC hdc )
if (wndPtr->text) DrawText16( hdc, wndPtr->text, -1, &rc, wFormat ); if (wndPtr->text) DrawText16( hdc, wndPtr->text, -1, &rc, wFormat );
} }
static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc ) static void STATIC_PaintRectfn( WND *wndPtr, HDC32 hdc )
{ {
RECT16 rc; RECT16 rc;
HBRUSH16 hBrush; HBRUSH16 hBrush;
@ -268,7 +268,7 @@ static void STATIC_PaintRectfn( WND *wndPtr, HDC hdc )
} }
static void STATIC_PaintIconfn( WND *wndPtr, HDC hdc ) static void STATIC_PaintIconfn( WND *wndPtr, HDC32 hdc )
{ {
RECT16 rc; RECT16 rc;
HBRUSH16 hbrush; HBRUSH16 hbrush;

View File

@ -29,7 +29,4 @@ y.tab.c y.tab.h: dbg.y
lex.yy.c: debug.l lex.yy.c: debug.l
$(LEX) -8 -I $(SRCDIR)/debug.l $(LEX) -8 -I $(SRCDIR)/debug.l
clean::
$(RM) y.tab.h
### Dependencies: ### Dependencies:

View File

@ -12,29 +12,26 @@ hour.
To add a new language to the list of languages that Wine can handle To add a new language to the list of languages that Wine can handle
you must... you must...
1. Edit resources/Makefile.in variable "LANGUAGES" to include a new 1. Edit ./wine.man (search for -language) to show the new language
abbreviation for the language.
2. Edit ./wine.man (search for -language) to show the new language
abbreviation. abbreviation.
3. Edit misc/main.c variable "Languages" to contain the new language 2. Edit misc/main.c variable "Languages" to contain the new language
abbreviation and language ID. Also edit macro "USAGE" to show the abbreviation and language ID. Also edit macro "USAGE" to show the
new abbreviation. new abbreviation.
4. Edit include/options.h enum "WINE_LANGUAGE" to have a member called 3. Edit include/options.h enum "WINE_LANGUAGE" to have a member called
LANG_XX where XX is the new abbreviation. LANG_XX where XX is the new abbreviation.
5. Edit misc/ole2nls.c function "GetUserDefaultLCID" to contain an 4. Edit misc/ole2nls.c function "GetUserDefaultLCID" to contain an
extra case for your language. The correct return values seem to extra case for your language. The correct return values seem to
be a mystery, but don't worry. be a mystery, but don't worry.
6. Edit resources/sysrec.c to include "sysres_XX.h" where XX is the 5. Edit resources/sysrec.c to include "sysres_XX.h" where XX is the
abbreviation for your language. (That file will be produced auto- abbreviation for your language. (That file will be produced auto-
matically.) Edit variable "SYSRES_Resources" to contain an entry matically.) Edit variable "SYSRES_Resources" to contain an entry
for your language. for your language.
7. Create a new file, resources/sysres_XX.rc, where XX is the 6. Create a new file, resources/sysres_XX.rc, where XX is the
abbreviation that you chose. Your best bet is to copy one of the abbreviation that you chose. Your best bet is to copy one of the
other *.rc files and start translating. [Warning: the author of other *.rc files and start translating. [Warning: the author of
this file does not know the details of the structure of these this file does not know the details of the structure of these
@ -46,6 +43,9 @@ you must...
copy the positions from (say) English. In particular, items within copy the positions from (say) English. In particular, items within
one menu should have different highlighted letters. one menu should have different highlighted letters.
7. Edit resources/Makefile.in to add the name of the new file to the
SYSRES_SRCS variable.
8. Edit misc/ole2nls.c function "GetLocaleInfoA" to contain a case for 8. Edit misc/ole2nls.c function "GetLocaleInfoA" to contain a case for
your language. your language.

View File

@ -59,6 +59,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
NULL, /* pSelectPalette */ NULL, /* pSelectPalette */
NULL, /* pSetBkColor */ NULL, /* pSetBkColor */
NULL, /* pSetBkMode */ NULL, /* pSetBkMode */
NULL, /* pSetDeviceClipping */
NULL, /* pSetDIBitsToDevice */ NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */

View File

@ -10,6 +10,8 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include "windows.h"
#include "module.h"
#include "win16drv.h" #include "win16drv.h"
#include "gdi.h" #include "gdi.h"
#include "bitmap.h" #include "bitmap.h"
@ -79,6 +81,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL, /* pSelectPalette */ NULL, /* pSelectPalette */
NULL, /* pSetBkColor */ NULL, /* pSetBkColor */
NULL, /* pSetBkMode */ NULL, /* pSetBkMode */
NULL, /* pSetDeviceClipping */
NULL, /* pSetDIBitsToDevice */ NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */
@ -112,6 +115,7 @@ static LOADED_PRINTER_DRIVER *gapLoadedPrinterDrivers[MAX_PRINTER_DRIVERS];
BOOL32 WIN16DRV_Init(void) BOOL32 WIN16DRV_Init(void)
{ {
return DRIVER_RegisterDriver( NULL /* generic driver */, &WIN16DRV_Funcs ); return DRIVER_RegisterDriver( NULL /* generic driver */, &WIN16DRV_Funcs );
} }
/* Tempory functions, for initialising structures */ /* Tempory functions, for initialising structures */
@ -152,7 +156,7 @@ void InitDrawMode(LPDRAWMODE lpDrawMode)
* Thunking utility functions * Thunking utility functions
*/ */
static BOOL32 AddData(SEGPTR *pSegPtr, void *pData, int nSize, SEGPTR Limit) static BOOL32 AddData(SEGPTR *pSegPtr, const void *pData, int nSize, SEGPTR Limit)
{ {
BOOL32 bRet = FALSE; BOOL32 bRet = FALSE;
char *pBuffer = PTR_SEG_TO_LIN((*pSegPtr)); char *pBuffer = PTR_SEG_TO_LIN((*pSegPtr));
@ -165,7 +169,7 @@ static BOOL32 AddData(SEGPTR *pSegPtr, void *pData, int nSize, SEGPTR Limit)
SEGPTR SegPtrOld = *pSegPtr; SEGPTR SegPtrOld = *pSegPtr;
SEGPTR SegPtrNew; SEGPTR SegPtrNew;
printf("AddData: Copying %d from %p to %p(0x%x)\n", nSize, pData, pBuffer, (UINT32)*pSegPtr); dprintf_win16drv(stddeb, "AddData: Copying %d from %p to %p(0x%x)\n", nSize, pData, pBuffer, (UINT32)*pSegPtr);
memcpy(pBuffer, pData, nSize); memcpy(pBuffer, pData, nSize);
SegPtrNew = (SegPtrOld + nSize + 1); SegPtrNew = (SegPtrOld + nSize + 1);
*pdw = (DWORD)SegPtrNew; *pdw = (DWORD)SegPtrNew;
@ -179,7 +183,7 @@ static BOOL32 GetParamData(SEGPTR SegPtrSrc,void *pDataDest, int nSize)
char *pSrc = PTR_SEG_TO_LIN(SegPtrSrc); char *pSrc = PTR_SEG_TO_LIN(SegPtrSrc);
char *pDest = pDataDest; char *pDest = pDataDest;
printf("GetParamData: Copying %d from %lx(%lx) to %lx\n", nSize, (DWORD)pSrc, (DWORD)SegPtrSrc, (DWORD)pDataDest); dprintf_win16drv(stddeb, "GetParamData: Copying %d from %lx(%lx) to %lx\n", nSize, (DWORD)pSrc, (DWORD)SegPtrSrc, (DWORD)pDataDest);
memcpy(pDest, pSrc, nSize); memcpy(pDest, pSrc, nSize);
return TRUE; return TRUE;
} }
@ -195,7 +199,7 @@ static void GetPrinterDriverFunctions(HINSTANCE16 hInst, LOADED_PRINTER_DRIVER *
LoadPrinterDrvFunc(FUNC_ENUMDFONTS, ORD_ENUMDFONTS); /* 6 */ LoadPrinterDrvFunc(FUNC_ENUMDFONTS, ORD_ENUMDFONTS); /* 6 */
LoadPrinterDrvFunc(FUNC_REALIZEOBJECT, ORD_REALIZEOBJECT);/* 10 */ LoadPrinterDrvFunc(FUNC_REALIZEOBJECT, ORD_REALIZEOBJECT);/* 10 */
LoadPrinterDrvFunc(FUNC_EXTTEXTOUT, ORD_EXTTEXTOUT); /* 14 */ LoadPrinterDrvFunc(FUNC_EXTTEXTOUT, ORD_EXTTEXTOUT); /* 14 */
printf ("got func CONTROL 0x%p enable 0x%p enumDfonts 0x%p realizeobject 0x%p extextout 0x%p\n", dprintf_win16drv (stddeb,"got func CONTROL 0x%p enable 0x%p enumDfonts 0x%p realizeobject 0x%p extextout 0x%p\n",
pLPD->fn[FUNC_CONTROL], pLPD->fn[FUNC_CONTROL],
pLPD->fn[FUNC_ENABLE], pLPD->fn[FUNC_ENABLE],
pLPD->fn[FUNC_ENUMDFONTS], pLPD->fn[FUNC_ENUMDFONTS],
@ -221,7 +225,7 @@ static LOADED_PRINTER_DRIVER *FindPrinterDriverFromPDEVICE(SEGPTR segptrPDEVICE)
return pLPD; return pLPD;
} }
static LOADED_PRINTER_DRIVER *FindPrinterDriverFromName(char *pszDriver) static LOADED_PRINTER_DRIVER *FindPrinterDriverFromName(const char *pszDriver)
{ {
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
int nDriverSlot = 0; int nDriverSlot = 0;
@ -233,7 +237,7 @@ static LOADED_PRINTER_DRIVER *FindPrinterDriverFromName(char *pszDriver)
ptmpLPD = gapLoadedPrinterDrivers[nDriverSlot++]; ptmpLPD = gapLoadedPrinterDrivers[nDriverSlot++];
if (ptmpLPD != NULL) if (ptmpLPD != NULL)
{ {
printf("Comparing %s,%s\n",ptmpLPD->szDriver,pszDriver); dprintf_win16drv(stddeb, "Comparing %s,%s\n",ptmpLPD->szDriver,pszDriver);
/* Found driver store info, exit loop */ /* Found driver store info, exit loop */
if (lstrcmpi32A(ptmpLPD->szDriver, pszDriver) == 0) if (lstrcmpi32A(ptmpLPD->szDriver, pszDriver) == 0)
pLPD = ptmpLPD; pLPD = ptmpLPD;
@ -282,7 +286,7 @@ static LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver)
strcat(drvName, ".DRV"); strcat(drvName, ".DRV");
hInst = LoadLibrary(drvName); hInst = LoadLibrary(drvName);
} }
printf("Loaded the library\n"); dprintf_win16drv(stddeb, "Loaded the library\n");
if (hInst <= 32) if (hInst <= 32)
@ -304,7 +308,7 @@ static LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver)
/* Get DS for the printer module */ /* Get DS for the printer module */
pLPD->ds_reg = hInst; pLPD->ds_reg = hInst;
printf("DS for %s is %x\n", pszDriver, pLPD->ds_reg); dprintf_win16drv(stddeb, "DS for %s is %x\n", pszDriver, pLPD->ds_reg);
/* Get address of printer driver functions */ /* Get address of printer driver functions */
GetPrinterDriverFunctions(hInst, pLPD); GetPrinterDriverFunctions(hInst, pLPD);
@ -336,7 +340,7 @@ INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPT
WORD wRet = 0; WORD wRet = 0;
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
printf("PRTDRV_Control: %08x 0x%x %08lx %08lx\n", (unsigned int)lpDestDev, wfunction, lpInData, lpOutData); dprintf_win16drv(stddeb, "PRTDRV_Control: %08x 0x%x %08lx %08lx\n", (unsigned int)lpDestDev, wfunction, lpInData, lpOutData);
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL) if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{ {
@ -345,7 +349,7 @@ INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPT
if (pLPD->fn[FUNC_CONTROL] == NULL) if (pLPD->fn[FUNC_CONTROL] == NULL)
{ {
printf("PRTDRV_Control: Not supported by driver\n"); dprintf_win16drv(stddeb, "PRTDRV_Control: Not supported by driver\n");
return 0; return 0;
} }
@ -357,7 +361,7 @@ INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPT
wRet = CallTo16_word_lwll(pLPD->fn[FUNC_CONTROL], wRet = CallTo16_word_lwll(pLPD->fn[FUNC_CONTROL],
lP1, wP2, lP3, lP4); lP1, wP2, lP3, lP4);
} }
printf("PRTDRV_Control: return %x\n", wRet); dprintf_win16drv(stddeb, "PRTDRV_Control: return %x\n", wRet);
return wRet; return wRet;
return 0; return 0;
@ -372,7 +376,7 @@ static WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
WORD wRet = 0; WORD wRet = 0;
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
printf("PRTDRV_Enable: %s %s\n",lpDestDevType, lpOutputFile); dprintf_win16drv(stddeb, "PRTDRV_Enable: %s %s\n",lpDestDevType, lpOutputFile);
/* Get the printer driver info */ /* Get the printer driver info */
if (wStyle == INITPDEVICE) if (wStyle == INITPDEVICE)
@ -393,7 +397,7 @@ static WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
if (pLPD->fn[FUNC_ENABLE] == NULL) if (pLPD->fn[FUNC_ENABLE] == NULL)
{ {
printf("PRTDRV_Enable: Not supported by driver\n"); dprintf_win16drv(stddeb, "PRTDRV_Enable: Not supported by driver\n");
return 0; return 0;
} }
@ -433,7 +437,7 @@ static WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
GetParamData(lP1, lpDevInfo, nSize); GetParamData(lP1, lpDevInfo, nSize);
} }
} }
printf("PRTDRV_Enable: return %x\n", wRet); dprintf_win16drv(stddeb, "PRTDRV_Enable: return %x\n", wRet);
return wRet; return wRet;
} }
@ -461,7 +465,7 @@ WORD WineEnumDFontCallback(LPLOGFONT16 lpLogFont, LPTEXTMETRIC16 lpTextMetrics,
/* Make sure we have the right structure */ /* Make sure we have the right structure */
if (pWEPFC != NULL ) if (pWEPFC != NULL )
{ {
printf("mode is 0x%x\n",pWEPFC->nMode); dprintf_win16drv(stddeb, "mode is 0x%x\n",pWEPFC->nMode);
switch (pWEPFC->nMode) switch (pWEPFC->nMode)
{ {
@ -475,7 +479,7 @@ WORD WineEnumDFontCallback(LPLOGFONT16 lpLogFont, LPTEXTMETRIC16 lpTextMetrics,
{ {
PRINTER_FONTS_INFO *pPFI; PRINTER_FONTS_INFO *pPFI;
printf("WineEnumDFontCallback: Found %s %x\n", dprintf_win16drv(stddeb, "WineEnumDFontCallback: Found %s %x\n",
lpLogFont->lfFaceName, wFontType); lpLogFont->lfFaceName, wFontType);
pPFI = &pWEPFC->pLPD->paPrinterFonts[pWEPFC->nCount]; pPFI = &pWEPFC->pLPD->paPrinterFonts[pWEPFC->nCount];
@ -488,7 +492,7 @@ WORD WineEnumDFontCallback(LPLOGFONT16 lpLogFont, LPTEXTMETRIC16 lpTextMetrics,
} }
wRet = 1; wRet = 1;
} }
printf("WineEnumDFontCallback: returnd %d\n", wRet); dprintf_win16drv(stddeb, "WineEnumDFontCallback: returnd %d\n", wRet);
return wRet; return wRet;
} }
@ -501,7 +505,7 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
WORD wRet = 0; WORD wRet = 0;
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
printf("PRTDRV_EnumDFonts:\n"); dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts:\n");
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL) if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{ {
@ -513,7 +517,7 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
if (pLPD->fn[FUNC_ENUMDFONTS] == NULL) if (pLPD->fn[FUNC_ENUMDFONTS] == NULL)
{ {
printf("PRTDRV_EnumDFonts: Not supported by driver\n"); dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts: Not supported by driver\n");
return 0; return 0;
} }
@ -540,7 +544,7 @@ WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
else else
printf("Failed to find device\n"); printf("Failed to find device\n");
printf("PRTDRV_EnumDFonts: return %x\n", wRet); dprintf_win16drv(stddeb, "PRTDRV_EnumDFonts: return %x\n", wRet);
return wRet; return wRet;
} }
@ -554,7 +558,7 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
WORD dwRet = 0; WORD dwRet = 0;
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
printf("PRTDRV_RealizeObject:\n"); dprintf_win16drv(stddeb, "PRTDRV_RealizeObject:\n");
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL) if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{ {
@ -566,7 +570,7 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
if (pLPD->fn[FUNC_REALIZEOBJECT] == NULL) if (pLPD->fn[FUNC_REALIZEOBJECT] == NULL)
{ {
printf("PRTDRV_RealizeObject: Not supported by driver\n"); dprintf_win16drv(stddeb, "PRTDRV_RealizeObject: Not supported by driver\n");
return 0; return 0;
} }
@ -601,7 +605,7 @@ DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
lP1, wP2, lP3, lP4, lP5); lP1, wP2, lP3, lP4, lP5);
} }
printf("PRTDRV_RealizeObject: return %x\n", dwRet); dprintf_win16drv(stddeb, "PRTDRV_RealizeObject: return %x\n", dwRet);
return dwRet; return dwRet;
} }
@ -620,8 +624,16 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
/* Realizing fonts */ /* Realizing fonts */
TEXTXFORM TextXForm; TEXTXFORM TextXForm;
int nSize; int nSize;
char printerEnabled[20];
PROFILE_GetWineIniString( "wine", "printer", "off",
printerEnabled, sizeof(printerEnabled) );
if (strcmp(printerEnabled,"on"))
{
printf("WIN16DRV_CreateDC disabled in wine.conf file\n");
return FALSE;
}
printf("In creatdc for (%s,%s,%s) initData 0x%p\n",driver, device, output, initData); dprintf_win16drv(stddeb, "In creatdc for (%s,%s,%s) initData 0x%p\n",driver, device, output, initData);
physDev = (WIN16DRV_PDEVICE *)HeapAlloc( SystemHeap, 0, sizeof(*physDev) ); physDev = (WIN16DRV_PDEVICE *)HeapAlloc( SystemHeap, 0, sizeof(*physDev) );
if (!physDev) return FALSE; if (!physDev) return FALSE;
@ -630,11 +642,11 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
pLPD = LoadPrinterDriver(driver); pLPD = LoadPrinterDriver(driver);
if (pLPD == NULL) if (pLPD == NULL)
{ {
printf("LPGDI_CreateDC: Failed to find printer driver\n"); dprintf_win16drv(stddeb, "LPGDI_CreateDC: Failed to find printer driver\n");
HeapFree( SystemHeap, 0, physDev ); HeapFree( SystemHeap, 0, physDev );
return FALSE; return FALSE;
} }
printf("windevCreateDC pLPD 0x%p\n", pLPD); dprintf_win16drv(stddeb, "windevCreateDC pLPD 0x%p\n", pLPD);
/* Now Get the device capabilities from the printer driver */ /* Now Get the device capabilities from the printer driver */
@ -646,6 +658,14 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
/* Add this to the DC */ /* Add this to the DC */
dc->w.devCaps = printerDevCaps; dc->w.devCaps = printerDevCaps;
dc->w.hVisRgn = CreateRectRgn(0, 0, dc->w.devCaps->horzRes, dc->w.devCaps->vertRes);
dc->w.bitsPerPixel = dc->w.devCaps->bitsPixel;
printf("Got devcaps width %d height %d bits %d planes %d\n",
dc->w.devCaps->horzRes,
dc->w.devCaps->vertRes,
dc->w.devCaps->bitsPixel,
dc->w.devCaps->planes);
/* Now we allocate enough memory for the PDEVICE structure */ /* Now we allocate enough memory for the PDEVICE structure */
/* The size of this varies between printer drivers */ /* The size of this varies between printer drivers */
@ -662,7 +682,7 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
pPDH = (PDEVICE_HEADER *)(PTR_SEG_TO_LIN(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER)); pPDH = (PDEVICE_HEADER *)(PTR_SEG_TO_LIN(physDev->segptrPDEVICE) - sizeof(PDEVICE_HEADER));
pPDH->pLPD = pLPD; pPDH->pLPD = pLPD;
printf("PRTDRV_Enable: PDEVICE allocated %08lx\n",(DWORD)(physDev->segptrPDEVICE)); dprintf_win16drv(stddeb, "PRTDRV_Enable: PDEVICE allocated %08lx\n",(DWORD)(physDev->segptrPDEVICE));
/* Now get the printer driver to initialise this data */ /* Now get the printer driver to initialise this data */
wRet = PRTDRV_Enable((LPVOID)physDev->segptrPDEVICE, INITPDEVICE, device, driver, output, NULL); wRet = PRTDRV_Enable((LPVOID)physDev->segptrPDEVICE, INITPDEVICE, device, driver, output, NULL);
@ -690,7 +710,7 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
/* Allocate a buffer to store all of the fonts */ /* Allocate a buffer to store all of the fonts */
pLPD->nPrinterFonts = wepfc.nCount; pLPD->nPrinterFonts = wepfc.nCount;
printf("Got %d fonts\n",wepfc.nCount); dprintf_win16drv(stddeb, "Got %d fonts\n",wepfc.nCount);
if (wepfc.nCount > 0) if (wepfc.nCount > 0)
{ {
@ -737,7 +757,7 @@ BOOL32 WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output,
{ {
FONTINFO *p = (FONTINFO *)PTR_SEG_TO_LIN(physDev->segptrFontInfo); FONTINFO *p = (FONTINFO *)PTR_SEG_TO_LIN(physDev->segptrFontInfo);
printf("T:%d VR:%d HR:%d, F:%d L:%d\n", dprintf_win16drv(stddeb, "T:%d VR:%d HR:%d, F:%d L:%d\n",
p->dfType, p->dfType,
p->dfVertRes, p->dfHorizRes, p->dfVertRes, p->dfHorizRes,
p->dfFirstCHAR, p->dfLastCHAR p->dfFirstCHAR, p->dfLastCHAR
@ -789,7 +809,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
DWORD dwRet = 0; DWORD dwRet = 0;
LOADED_PRINTER_DRIVER *pLPD = NULL; LOADED_PRINTER_DRIVER *pLPD = NULL;
printf("PRTDRV_ExtTextOut:\n"); dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut:\n");
if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL) if ((pLPD = FindPrinterDriverFromPDEVICE(lpDestDev)) != NULL)
{ {
@ -801,7 +821,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
if (pLPD->fn[FUNC_EXTTEXTOUT] == NULL) if (pLPD->fn[FUNC_EXTTEXTOUT] == NULL)
{ {
printf("PRTDRV_ExtTextOut: Not supported by driver\n"); dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut: Not supported by driver\n");
return 0; return 0;
} }
@ -813,7 +833,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
{ {
lP4 = SegPtr; lP4 = SegPtr;
nSize = sizeof(RECT16); nSize = sizeof(RECT16);
printf("Adding lpClipRect\n"); dprintf_win16drv(stddeb, "Adding lpClipRect\n");
AddData(&SegPtr, lpClipRect, nSize, Limit); AddData(&SegPtr, lpClipRect, nSize, Limit);
} }
@ -825,7 +845,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
/* TTD WARNING THIS STRING ISNT NULL TERMINATED */ /* TTD WARNING THIS STRING ISNT NULL TERMINATED */
lP5 = SegPtr; lP5 = SegPtr;
nSize = strlen(lpString); nSize = strlen(lpString);
printf("Adding string size %d\n",nSize); dprintf_win16drv(stddeb, "Adding string size %d\n",nSize);
AddData(&SegPtr, lpString, nSize, Limit); AddData(&SegPtr, lpString, nSize, Limit);
} }
@ -841,7 +861,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
{ {
lP8 = SegPtr; lP8 = SegPtr;
nSize = sizeof(DRAWMODE); nSize = sizeof(DRAWMODE);
printf("adding lpDrawMode\n"); dprintf_win16drv(stddeb, "adding lpDrawMode\n");
AddData(&SegPtr, lpDrawMode, nSize, Limit); AddData(&SegPtr, lpDrawMode, nSize, Limit);
} }
@ -852,28 +872,28 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
{ {
lP9 = SegPtr; lP9 = SegPtr;
nSize = sizeof(TEXTXFORM); nSize = sizeof(TEXTXFORM);
printf("Adding TextXForm\n"); dprintf_win16drv(stddeb, "Adding TextXForm\n");
AddData(&SegPtr, lpTextXForm, nSize, Limit); AddData(&SegPtr, lpTextXForm, nSize, Limit);
} }
else else
lP9 = 0L; lP9 = 0L;
if (lpCharWidths != NULL) if (lpCharWidths != NULL)
printf("PRTDRV_ExtTextOut: Char widths not supported\n"); dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut: Char widths not supported\n");
lP10 = 0; lP10 = 0;
if (lpOpaqueRect != NULL) if (lpOpaqueRect != NULL)
{ {
lP11 = SegPtr; lP11 = SegPtr;
nSize = sizeof(RECT16); nSize = sizeof(RECT16);
printf("Adding opaqueRect\n"); dprintf_win16drv(stddeb, "Adding opaqueRect\n");
AddData(&SegPtr, lpOpaqueRect, nSize, Limit); AddData(&SegPtr, lpOpaqueRect, nSize, Limit);
} }
else else
lP11 = 0L; lP11 = 0L;
wP12 = wOptions; wP12 = wOptions;
printf("Calling exttextout 0x%lx 0x%x 0x%x 0x%lx\n0x%lx 0x%x 0x%lx 0x%lx\n" dprintf_win16drv(stddeb, "Calling exttextout 0x%lx 0x%x 0x%x 0x%lx\n0x%lx 0x%x 0x%lx 0x%lx\n"
"0x%lx 0x%lx 0x%lx 0x%x\n",lP1, wP2, wP3, lP4, "0x%lx 0x%lx 0x%lx 0x%x\n",lP1, wP2, wP3, lP4,
lP5, wP6, lP7, lP8, lP9, lP10, lP5, wP6, lP7, lP8, lP9, lP10,
lP11, wP12); lP11, wP12);
@ -882,7 +902,7 @@ DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
lP5, wP6, lP7, lP8, lP9, lP10, lP5, wP6, lP7, lP8, lP9, lP10,
lP11, wP12); lP11, wP12);
} }
printf("PRTDRV_ExtTextOut: return %lx\n", dwRet); dprintf_win16drv(stddeb, "PRTDRV_ExtTextOut: return %lx\n", dwRet);
return dwRet; return dwRet;
} }
@ -913,7 +933,7 @@ static BOOL16 windrvExtTextOut16( DC *dc, INT16 x, INT16 y, UINT16 flags, const
if (count == 0) if (count == 0)
return FALSE; return FALSE;
printf("LPGDI_ExtTextOut: %04x %d %d %x %p %*s %p\n", dc->hSelf, x, y, dprintf_win16drv(stddeb, "LPGDI_ExtTextOut: %04x %d %d %x %p %*s %p\n", dc->hSelf, x, y,
flags, lprect, count > 0 ? count : 8, str, lpDx); flags, lprect, count > 0 ? count : 8, str, lpDx);
InitTextXForm(lpTextXForm); InitTextXForm(lpTextXForm);
@ -1055,7 +1075,7 @@ HANDLE16 OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC)
HANDLE16 hHandle = SP_ERROR; HANDLE16 hHandle = SP_ERROR;
PPRINTJOB pPrintJob; PPRINTJOB pPrintJob;
printf("OpenJob: \"%s\" \"%s\" %04x\n", lpOutput, lpTitle, hDC); dprintf_win16drv(stddeb, "OpenJob: \"%s\" \"%s\" %04x\n", lpOutput, lpTitle, hDC);
pPrintJob = gPrintJobsTable[0]; pPrintJob = gPrintJobsTable[0];
if (pPrintJob == NULL) if (pPrintJob == NULL)
@ -1080,7 +1100,7 @@ HANDLE16 OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC)
gPrintJobsTable[pPrintJob->nIndex] = pPrintJob; gPrintJobsTable[pPrintJob->nIndex] = pPrintJob;
} }
} }
printf("OpenJob: return %04x\n", hHandle); dprintf_win16drv(stddeb, "OpenJob: return %04x\n", hHandle);
return hHandle; return hHandle;
} }
@ -1089,7 +1109,7 @@ int CloseJob(HANDLE16 hJob)
int nRet = SP_ERROR; int nRet = SP_ERROR;
PPRINTJOB pPrintJob = NULL; PPRINTJOB pPrintJob = NULL;
printf("CloseJob: %04x\n", hJob); dprintf_win16drv(stddeb, "CloseJob: %04x\n", hJob);
pPrintJob = FindPrintJobFromHandle(hJob); pPrintJob = FindPrintJobFromHandle(hJob);
if (pPrintJob != NULL) if (pPrintJob != NULL)
@ -1107,7 +1127,7 @@ int WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch)
int nRet = SP_ERROR; int nRet = SP_ERROR;
PPRINTJOB pPrintJob = NULL; PPRINTJOB pPrintJob = NULL;
printf("WriteSpool: %04x %08lx %04x\n", hJob, (DWORD)lpData, cch); dprintf_win16drv(stddeb, "WriteSpool: %04x %08lx %04x\n", hJob, (DWORD)lpData, cch);
pPrintJob = FindPrintJobFromHandle(hJob); pPrintJob = FindPrintJobFromHandle(hJob);
if (pPrintJob != NULL && pPrintJob->fd >= 0 && cch) if (pPrintJob != NULL && pPrintJob->fd >= 0 && cch)
@ -1124,7 +1144,7 @@ int WriteDialog(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg)
{ {
int nRet = 0; int nRet = 0;
printf("WriteDialog: %04x %04x \"%s\"\n", hJob, cchMsg, lpMsg); dprintf_win16drv(stddeb, "WriteDialog: %04x %04x \"%s\"\n", hJob, cchMsg, lpMsg);
nRet = MessageBox(NULL, lpMsg, "Printing Error", MB_OKCANCEL); nRet = MessageBox(NULL, lpMsg, "Printing Error", MB_OKCANCEL);
return nRet; return nRet;
@ -1134,7 +1154,7 @@ int DeleteJob(HANDLE16 hJob, WORD wNotUsed)
{ {
int nRet; int nRet;
printf("DeleteJob: %04x\n", hJob); dprintf_win16drv(stddeb, "DeleteJob: %04x\n", hJob);
nRet = FreePrintJob(hJob); nRet = FreePrintJob(hJob);
return nRet; return nRet;
@ -1147,13 +1167,13 @@ int DeleteJob(HANDLE16 hJob, WORD wNotUsed)
*/ */
int StartSpoolPage(HANDLE16 hJob) int StartSpoolPage(HANDLE16 hJob)
{ {
printf("StartSpoolPage GDI.246 unimplemented\n"); dprintf_win16drv(stddeb, "StartSpoolPage GDI.246 unimplemented\n");
return 1; return 1;
} }
int EndSpoolPage(HANDLE16 hJob) int EndSpoolPage(HANDLE16 hJob)
{ {
printf("EndSpoolPage GDI.247 unimplemented\n"); dprintf_win16drv(stddeb, "EndSpoolPage GDI.247 unimplemented\n");
return 1; return 1;
} }
@ -1161,6 +1181,6 @@ int EndSpoolPage(HANDLE16 hJob)
DWORD GetSpoolJob(int nOption, LONG param) DWORD GetSpoolJob(int nOption, LONG param)
{ {
DWORD retval = 0; DWORD retval = 0;
printf("In GetSpoolJob param 0x%lx noption %d\n",param, nOption); dprintf_win16drv(stddeb, "In GetSpoolJob param 0x%lx noption %d\n",param, nOption);
return retval; return retval;
} }

View File

@ -6,6 +6,7 @@ VPATH = @srcdir@
MODULE = x11drv MODULE = x11drv
C_SRCS = \ C_SRCS = \
clipping.c \
font.c \ font.c \
init.c init.c

View File

@ -0,0 +1,34 @@
/*
* DC clipping functions
*
* Copyright 1993 Alexandre Julliard
*/
#include <stdio.h>
#include "dc.h"
#include "x11drv.h"
#include "region.h"
#include "stddebug.h"
#include "debug.h"
/***********************************************************************
* X11DRV_SetDeviceClipping
*/
void X11DRV_SetDeviceClipping( DC * dc )
{
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr(dc->w.hGCClipRgn, REGION_MAGIC);
if (!obj)
{
fprintf( stderr, "X11DRV_SetDeviceClipping: Rgn is 0. Please report this.\n");
exit(1);
}
if (obj->xrgn)
{
XSetRegion( display, dc->u.x.gc, obj->xrgn );
XSetClipOrigin( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
}
else /* Clip everything */
{
XSetClipRectangles( display, dc->u.x.gc, 0, 0, NULL, 0, 0 );
}
}

View File

@ -59,6 +59,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
NULL, /* pSelectPalette */ NULL, /* pSelectPalette */
NULL, /* pSetBkColor */ NULL, /* pSetBkColor */
NULL, /* pSetBkMode */ NULL, /* pSetBkMode */
X11DRV_SetDeviceClipping, /* pSetDeviceClipping */
NULL, /* pSetDIBitsToDevice */ NULL, /* pSetDIBitsToDevice */
NULL, /* pSetMapMode */ NULL, /* pSetMapMode */
NULL, /* pSetMapperFlags */ NULL, /* pSetMapperFlags */

View File

@ -328,7 +328,7 @@ BOOL16 THUNK_UnhookWindowsHookEx16( HHOOK hhook )
{ {
THUNK *thunk = (THUNK *)HOOK_GetProc16( hhook ); THUNK *thunk = (THUNK *)HOOK_GetProc16( hhook );
BOOL16 ret = UnhookWindowsHookEx16( hhook ); BOOL16 ret = UnhookWindowsHookEx16( hhook );
THUNK_Free( thunk ); if (thunk) THUNK_Free( thunk );
return ret; return ret;
} }

View File

@ -17,5 +17,5 @@ typedef struct {
BOOL bRedrawFlag; BOOL bRedrawFlag;
} HEADCOMBO,*LPHEADCOMBO; } HEADCOMBO,*LPHEADCOMBO;
LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam);
LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam);

View File

@ -133,7 +133,7 @@ typedef FINDREPLACE *LPFINDREPLACE;
typedef struct { typedef struct {
DWORD lStructSize; DWORD lStructSize;
HWND hwndOwner; /* caller's window handle */ HWND hwndOwner; /* caller's window handle */
HDC hDC; /* printer DC/IC or NULL */ HDC16 hDC; /* printer DC/IC or NULL */
SEGPTR lpLogFont; /* ptr. to a LOGFONT struct */ SEGPTR lpLogFont; /* ptr. to a LOGFONT struct */
short iPointSize; /* 10 * size in points of selected font */ short iPointSize; /* 10 * size in points of selected font */
DWORD Flags WINE_PACKED; /* enum. type flags */ DWORD Flags WINE_PACKED; /* enum. type flags */
@ -208,7 +208,7 @@ typedef struct {
HWND hwndOwner; HWND hwndOwner;
HGLOBAL16 hDevMode; HGLOBAL16 hDevMode;
HGLOBAL16 hDevNames; HGLOBAL16 hDevNames;
HDC hDC; HDC16 hDC;
DWORD Flags; DWORD Flags;
UINT nFromPage; UINT nFromPage;
UINT nToPage; UINT nToPage;
@ -285,14 +285,14 @@ BOOL PrintDlg( SEGPTR print);
BOOL ReplaceText( SEGPTR find); BOOL ReplaceText( SEGPTR find);
BOOL ChooseFont(LPCHOOSEFONT lpChFont); BOOL ChooseFont(LPCHOOSEFONT lpChFont);
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT ColorDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
LRESULT FormatCharDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam); LRESULT FormatCharDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -91,6 +91,7 @@
#undef DEBUG_VER #undef DEBUG_VER
#undef DEBUG_VXD #undef DEBUG_VXD
#undef DEBUG_WIN #undef DEBUG_WIN
#undef DEBUG_WIN16DRV
#undef DEBUG_WIN32 #undef DEBUG_WIN32
#undef DEBUG_WINSOCK #undef DEBUG_WINSOCK
#endif #endif
@ -171,6 +172,7 @@
#define DEBUG_VER #define DEBUG_VER
#define DEBUG_VXD #define DEBUG_VXD
#define DEBUG_WIN #define DEBUG_WIN
#define DEBUG_WIN16DRV
#define DEBUG_WIN32 #define DEBUG_WIN32
#define DEBUG_WINSOCK #define DEBUG_WINSOCK
#endif #endif
@ -553,6 +555,11 @@ short debug_msg_enabled[]={
#else #else
0, 0,
#endif #endif
#ifdef DEBUG_WIN16DRV
1,
#else
0,
#endif
#ifdef DEBUG_WIN32 #ifdef DEBUG_WIN32
1, 1,
#else #else
@ -1546,8 +1553,21 @@ extern short debug_msg_enabled[];
#endif #endif
#ifdef DEBUG_RUNTIME #ifdef DEBUG_RUNTIME
#define dprintf_win32 if(!debug_msg_enabled[75]) ; else fprintf #define dprintf_win16drv if(!debug_msg_enabled[75]) ; else fprintf
#define debugging_win32 debug_msg_enabled[75] #define debugging_win16drv debug_msg_enabled[75]
#else
#ifdef DEBUG_WIN16DRV
#define dprintf_win16drv fprintf
#define debugging_win16drv 1
#else
#define dprintf_win16drv while(0) fprintf
#define debugging_win16drv 0
#endif
#endif
#ifdef DEBUG_RUNTIME
#define dprintf_win32 if(!debug_msg_enabled[76]) ; else fprintf
#define debugging_win32 debug_msg_enabled[76]
#else #else
#ifdef DEBUG_WIN32 #ifdef DEBUG_WIN32
#define dprintf_win32 fprintf #define dprintf_win32 fprintf
@ -1559,8 +1579,8 @@ extern short debug_msg_enabled[];
#endif #endif
#ifdef DEBUG_RUNTIME #ifdef DEBUG_RUNTIME
#define dprintf_winsock if(!debug_msg_enabled[76]) ; else fprintf #define dprintf_winsock if(!debug_msg_enabled[77]) ; else fprintf
#define debugging_winsock debug_msg_enabled[76] #define debugging_winsock debug_msg_enabled[77]
#else #else
#ifdef DEBUG_WINSOCK #ifdef DEBUG_WINSOCK
#define dprintf_winsock fprintf #define dprintf_winsock fprintf
@ -1650,6 +1670,7 @@ static char *debug_msg_name[] = {
"ver", "ver",
"vxd", "vxd",
"win", "win",
"win16drv",
"win32", "win32",
"winsock", "winsock",
"" ""

View File

@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS
HPALETTE32 (*pSelectPalette)(DC*,HPALETTE32,BOOL32); HPALETTE32 (*pSelectPalette)(DC*,HPALETTE32,BOOL32);
COLORREF (*pSetBkColor)(DC*,COLORREF); COLORREF (*pSetBkColor)(DC*,COLORREF);
WORD (*pSetBkMode)(DC*,WORD); WORD (*pSetBkMode)(DC*,WORD);
VOID (*pSetDeviceClipping)(DC*);
INT32 (*pSetDIBitsToDevice)(DC*,INT32,INT32,DWORD,DWORD,INT32,INT32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32); INT32 (*pSetDIBitsToDevice)(DC*,INT32,INT32,DWORD,DWORD,INT32,INT32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32);
WORD (*pSetMapMode)(DC*,WORD); WORD (*pSetMapMode)(DC*,WORD);
DWORD (*pSetMapperFlags)(DC*,DWORD); DWORD (*pSetMapperFlags)(DC*,DWORD);

View File

@ -64,10 +64,10 @@ extern int ListBoxGetItemRect(LPHEADLIST lphl, WORD wIndex, LPRECT16 rect);
extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height); extern int ListBoxSetItemHeight(LPHEADLIST lphl, WORD wIndex, long height);
extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar); extern int ListBoxFindNextMatch(LPHEADLIST lphl, WORD wChar);
extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC hdc, extern void ListBoxDrawItem (HWND hwnd, LPHEADLIST lphl, HDC16 hdc,
LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction, LPLISTSTRUCT lpls, RECT16 *rect, WORD itemAction,
WORD itemState); WORD itemState);
extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y); extern int ListBoxFindMouse(LPHEADLIST lphl, int X, int Y);
extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls); extern void ListBoxAskMeasure(LPHEADLIST lphl, LPLISTSTRUCT lpls);
extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); extern LRESULT ListBoxWndProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam);

View File

@ -21,7 +21,7 @@
#define WM_MDICALCCHILDSCROLL 0x10AC /* this is exactly what Windows uses */ #define WM_MDICALCCHILDSCROLL 0x10AC /* this is exactly what Windows uses */
extern LRESULT MDIClientWndProc(HWND hwnd, UINT message, extern LRESULT MDIClientWndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam); /* mdi.c */ WPARAM16 wParam, LPARAM lParam); /* mdi.c */
typedef struct tagMDIWCL typedef struct tagMDIWCL
{ {

View File

@ -12,8 +12,9 @@ extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
int orgX, int orgY ); int orgX, int orgY );
extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt ); extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT16 pt );
extern void MENU_TrackKbdMenuBar( WND*, UINT wParam, INT vkey); extern void MENU_TrackKbdMenuBar( WND*, UINT wParam, INT vkey);
extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT16 lprect, extern UINT MENU_DrawMenuBar( HDC32 hDC, LPRECT16 lprect,
HWND hwnd, BOOL suppress_draw ); HWND hwnd, BOOL suppress_draw );
extern LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam ); extern LRESULT PopupMenuWndProc( HWND hwnd, UINT message,
WPARAM16 wParam, LPARAM lParam );
#endif /* __WINE_MENU_H */ #endif /* __WINE_MENU_H */

View File

@ -1257,7 +1257,7 @@ typedef struct {
typedef struct { typedef struct {
DWORD dwCallback; DWORD dwCallback;
RECT16 rc; RECT16 rc;
HDC hDC; HDC16 hDC;
} MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS; } MCI_ANIM_UPDATE_PARMS, *LPMCI_ANIM_UPDATE_PARMS;
#define MCI_OVLY_OPEN_WS 0x00010000L #define MCI_OVLY_OPEN_WS 0x00010000L

View File

@ -2,7 +2,7 @@
#define __MSDOS_H #define __MSDOS_H
#include <dirent.h> #include <dirent.h>
#include <windows.h> #include "windows.h"
#include "comm.h" #include "comm.h"
struct fcb { struct fcb {

View File

@ -13,12 +13,12 @@ extern void NC_GetMinMaxInfo( HWND hwnd, POINT16 *maxSize, POINT16 *maxPos,
POINT16 *minTrack, POINT16 *maxTrack ); POINT16 *minTrack, POINT16 *maxTrack );
extern void NC_DoNCPaint( HWND hwnd, HRGN32 clip, BOOL suppress_menupaint ); extern void NC_DoNCPaint( HWND hwnd, HRGN32 clip, BOOL suppress_menupaint );
extern LONG NC_HandleNCPaint( HWND hwnd , HRGN32 clip); extern LONG NC_HandleNCPaint( HWND hwnd , HRGN32 clip);
extern LONG NC_HandleNCActivate( WND *pwnd, WPARAM wParam ); extern LONG NC_HandleNCActivate( WND *pwnd, WPARAM16 wParam );
extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT16 *winRect ); extern LONG NC_HandleNCCalcSize( WND *pWnd, RECT16 *winRect );
extern LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt ); extern LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt );
extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ); extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam );
extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam); extern LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam);
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT16 pt ); extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt );
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ); extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam );
#endif /* __WINE_NONCLIENT_H */ #endif /* __WINE_NONCLIENT_H */

View File

@ -221,7 +221,7 @@ typedef struct _OLEOBJECTVTBL {
OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *); OLESTATUS (*CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,OLE_LPCSTR,LPOLEOBJECT *);
OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT); OLESTATUS (*Equal)(LPOLEOBJECT,LPOLEOBJECT);
OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT); OLESTATUS (*CopyToClipBoard)(LPOLEOBJECT);
OLESTATUS (*Draw)(LPOLEOBJECT,HDC,LPRECT16,LPRECT16,HDC); OLESTATUS (*Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT16); OLESTATUS (*Activate)(LPOLEOBJECT,UINT,BOOL,BOOL,HWND,LPRECT16);
OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL16,UINT); OLESTATUS (*Execute)(LPOLEOBJECT,HGLOBAL16,UINT);
OLESTATUS (*Close)(LPOLEOBJECT); OLESTATUS (*Close)(LPOLEOBJECT);

View File

@ -81,6 +81,6 @@ DWORD SHGetFileInfo32W(LPCWSTR,DWORD,SHFILEINFO32W*,UINT32,UINT32);
#define SE_ERR_DDEBUSY 30 #define SE_ERR_DDEBUSY 30
#define SE_ERR_NOASSOC 31 #define SE_ERR_NOASSOC 31
LRESULT AboutDlgProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam); LRESULT AboutDlgProc(HWND hWnd,UINT msg,WPARAM16 wParam,LPARAM lParam);
#endif /* __WINE_SHELL_H */ #endif /* __WINE_SHELL_H */

View File

@ -17,6 +17,6 @@ typedef struct
HICON16 hIcon; /* Icon handle for SS_ICON controls */ HICON16 hIcon; /* Icon handle for SS_ICON controls */
} STATICINFO; } STATICINFO;
extern LRESULT StaticWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam ); extern LRESULT StaticWndProc(HWND hWnd,UINT uMsg,WPARAM16 wParam,LPARAM lParam );
#endif /* STATIC_H */ #endif /* STATIC_H */

View File

@ -151,6 +151,7 @@
#undef DEBUG_VER #undef DEBUG_VER
#undef DEBUG_VXD #undef DEBUG_VXD
#undef DEBUG_WIN #undef DEBUG_WIN
#undef DEBUG_WIN16DRV
#undef DEBUG_WIN32 #undef DEBUG_WIN32
#undef DEBUG_WINSOCK #undef DEBUG_WINSOCK
#endif #endif
@ -231,6 +232,7 @@
#define DEBUG_VER #define DEBUG_VER
#define DEBUG_VXD #define DEBUG_VXD
#define DEBUG_WIN #define DEBUG_WIN
#define DEBUG_WIN16DRV
#define DEBUG_WIN32 #define DEBUG_WIN32
#define DEBUG_WINSOCK #define DEBUG_WINSOCK
#endif #endif

View File

@ -4907,15 +4907,11 @@ LPSTR lstrcpynWtoA(LPSTR,LPCWSTR,INT32);
typedef INT32 INT; typedef INT32 INT;
typedef UINT32 UINT; typedef UINT32 UINT;
typedef BOOL32 BOOL; typedef BOOL32 BOOL;
typedef WPARAM32 WPARAM;
typedef HANDLE32 HDC;
typedef HANDLE32 HWND; typedef HANDLE32 HWND;
# else /* WINELIB32 */ # else /* WINELIB32 */
typedef INT16 INT; typedef INT16 INT;
typedef UINT16 UINT; typedef UINT16 UINT;
typedef BOOL16 BOOL; typedef BOOL16 BOOL;
typedef WPARAM16 WPARAM;
typedef HANDLE16 HDC;
typedef HANDLE16 HWND; typedef HANDLE16 HWND;
# endif /* WINELIB32 */ # endif /* WINELIB32 */
#endif /* __WINE__ */ #endif /* __WINE__ */
@ -4942,17 +4938,17 @@ void AnsiToOemBuff(LPCSTR,LPSTR,UINT);
LPSTR AnsiUpper(LPSTR); LPSTR AnsiUpper(LPSTR);
UINT AnsiUpperBuff(LPSTR,UINT); UINT AnsiUpperBuff(LPSTR,UINT);
BOOL AnyPopup(void); BOOL AnyPopup(void);
BOOL Arc(HDC,INT,INT,INT,INT,INT,INT,INT,INT); BOOL Arc(HDC16,INT,INT,INT,INT,INT,INT,INT,INT);
UINT ArrangeIconicWindows(HWND); UINT ArrangeIconicWindows(HWND);
HDWP16 BeginDeferWindowPos(INT); HDWP16 BeginDeferWindowPos(INT);
BOOL BitBlt(HDC,INT,INT,INT,INT,HDC,INT,INT,DWORD); BOOL BitBlt(HDC16,INT,INT,INT,INT,HDC16,INT,INT,DWORD);
BOOL BringWindowToTop(HWND); BOOL BringWindowToTop(HWND);
void CalcChildScroll(HWND,WORD); void CalcChildScroll(HWND,WORD);
BOOL CallMsgFilter(SEGPTR,INT); BOOL CallMsgFilter(SEGPTR,INT);
LRESULT CallNextHookEx(HHOOK,INT,WPARAM,LPARAM); LRESULT CallNextHookEx(HHOOK,INT,WPARAM16,LPARAM);
BOOL ChangeClipboardChain(HWND,HWND); BOOL ChangeClipboardChain(HWND,HWND);
INT CheckMenuItem(HMENU16,UINT,UINT); INT CheckMenuItem(HMENU16,UINT,UINT);
BOOL Chord(HDC,INT,INT,INT,INT,INT,INT,INT,INT); BOOL Chord(HDC16,INT,INT,INT,INT,INT,INT,INT,INT);
BOOL CloseClipboard(void); BOOL CloseClipboard(void);
void CloseSound(void); void CloseSound(void);
BOOL CloseWindow(HWND); BOOL CloseWindow(HWND);
@ -4961,14 +4957,14 @@ HMETAFILE16 CopyMetaFile(HMETAFILE16,LPCSTR);
INT CountClipboardFormats(void); INT CountClipboardFormats(void);
INT CountVoiceNotes(INT); INT CountVoiceNotes(INT);
HBRUSH16 CreateBrushIndirect(const LOGBRUSH16*); HBRUSH16 CreateBrushIndirect(const LOGBRUSH16*);
HDC CreateCompatibleDC(HDC); HDC16 CreateCompatibleDC(HDC16);
HCURSOR16 CreateCursor(HINSTANCE16,INT,INT,INT,INT,const BYTE*,const BYTE*); HCURSOR16 CreateCursor(HINSTANCE16,INT,INT,INT,INT,const BYTE*,const BYTE*);
HGLOBAL16 CreateCursorIconIndirect(HINSTANCE16,CURSORICONINFO*,const BYTE*,const BYTE*); HGLOBAL16 CreateCursorIconIndirect(HINSTANCE16,CURSORICONINFO*,const BYTE*,const BYTE*);
HDC CreateDC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*); HDC16 CreateDC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*);
HBRUSH16 CreateDIBPatternBrush(HGLOBAL16,UINT); HBRUSH16 CreateDIBPatternBrush(HGLOBAL16,UINT);
HBITMAP16 CreateDIBitmap(HDC,BITMAPINFOHEADER*,DWORD,LPVOID,BITMAPINFO*,UINT); HBITMAP16 CreateDIBitmap(HDC16,BITMAPINFOHEADER*,DWORD,LPVOID,BITMAPINFO*,UINT);
HBRUSH16 CreateHatchBrush(INT,COLORREF); HBRUSH16 CreateHatchBrush(INT,COLORREF);
HDC CreateIC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*); HDC16 CreateIC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*);
HICON16 CreateIcon(HINSTANCE16,INT,INT,BYTE,BYTE,const BYTE*,const BYTE*); HICON16 CreateIcon(HINSTANCE16,INT,INT,BYTE,BYTE,const BYTE*,const BYTE*);
HMENU16 CreateMenu(void); HMENU16 CreateMenu(void);
HPALETTE16 CreatePalette(const LOGPALETTE*); HPALETTE16 CreatePalette(const LOGPALETTE*);
@ -4980,7 +4976,7 @@ HBRUSH16 CreateSolidBrush(COLORREF);
DWORD DefHookProc(short,WORD,DWORD,HHOOK*); DWORD DefHookProc(short,WORD,DWORD,HHOOK*);
HDWP16 DeferWindowPos(HDWP16,HWND,HWND,INT,INT,INT,INT,UINT); HDWP16 DeferWindowPos(HDWP16,HWND,HWND,INT,INT,INT,INT,UINT);
ATOM DeleteAtom(ATOM); ATOM DeleteAtom(ATOM);
BOOL DeleteDC(HDC); BOOL DeleteDC(HDC16);
BOOL DeleteMenu(HMENU16,UINT,UINT); BOOL DeleteMenu(HMENU16,UINT,UINT);
BOOL DeleteObject(HGDIOBJ16); BOOL DeleteObject(HGDIOBJ16);
BOOL DestroyCursor(HCURSOR16); BOOL DestroyCursor(HCURSOR16);
@ -4993,57 +4989,57 @@ BOOL DlgDirSelect(HWND,LPSTR,INT);
BOOL DlgDirSelectComboBox(HWND,LPSTR,INT); BOOL DlgDirSelectComboBox(HWND,LPSTR,INT);
BOOL16 DragDetect(HWND16,POINT16); BOOL16 DragDetect(HWND16,POINT16);
DWORD DragObject(HWND, HWND, WORD, HANDLE16, WORD, HCURSOR16); DWORD DragObject(HWND, HWND, WORD, HANDLE16, WORD, HCURSOR16);
BOOL DrawIcon(HDC,INT,INT,HICON16); BOOL DrawIcon(HDC16,INT,INT,HICON16);
void DrawMenuBar(HWND); void DrawMenuBar(HWND);
DWORD DumpIcon(SEGPTR,WORD*,SEGPTR*,SEGPTR*); DWORD DumpIcon(SEGPTR,WORD*,SEGPTR*,SEGPTR*);
BOOL Ellipse(HDC,INT,INT,INT,INT); BOOL Ellipse(HDC16,INT,INT,INT,INT);
BOOL EmptyClipboard(void); BOOL EmptyClipboard(void);
BOOL EnableMenuItem(HMENU16,UINT,UINT); BOOL EnableMenuItem(HMENU16,UINT,UINT);
BOOL EnableWindow(HWND,BOOL); BOOL EnableWindow(HWND,BOOL);
BOOL EndDeferWindowPos(HDWP16); BOOL EndDeferWindowPos(HDWP16);
UINT16 EnumClipboardFormats(UINT16); UINT16 EnumClipboardFormats(UINT16);
INT EnumFontFamilies(HDC,LPCSTR,FONTENUMPROC16,LPARAM); INT EnumFontFamilies(HDC16,LPCSTR,FONTENUMPROC16,LPARAM);
INT EnumFonts(HDC,LPCSTR,FONTENUMPROC16,LPARAM); INT EnumFonts(HDC16,LPCSTR,FONTENUMPROC16,LPARAM);
BOOL EnumMetaFile(HDC,HMETAFILE16,MFENUMPROC16,LPARAM); BOOL EnumMetaFile(HDC16,HMETAFILE16,MFENUMPROC16,LPARAM);
INT EnumObjects(HDC,INT,GOBJENUMPROC16,LPARAM); INT EnumObjects(HDC16,INT,GOBJENUMPROC16,LPARAM);
INT Escape(HDC,INT,INT,SEGPTR,SEGPTR); INT Escape(HDC16,INT,INT,SEGPTR,SEGPTR);
int ExcludeClipRect(HDC,short,short,short,short); int ExcludeClipRect(HDC16,short,short,short,short);
int ExcludeVisRect(HDC,short,short,short,short); int ExcludeVisRect(HDC16,short,short,short,short);
BOOL ExitWindows(DWORD,WORD); BOOL ExitWindows(DWORD,WORD);
HICON16 ExtractIcon(HINSTANCE16,LPCSTR,WORD); HICON16 ExtractIcon(HINSTANCE16,LPCSTR,WORD);
void FatalAppExit(UINT,LPCSTR); void FatalAppExit(UINT,LPCSTR);
void FatalExit(int); void FatalExit(int);
BOOL FillRgn(HDC,HRGN32,HBRUSH16); BOOL FillRgn(HDC16,HRGN32,HBRUSH16);
ATOM FindAtom(SEGPTR); ATOM FindAtom(SEGPTR);
HINSTANCE16 FindExecutable(LPCSTR,LPCSTR,LPSTR); HINSTANCE16 FindExecutable(LPCSTR,LPCSTR,LPSTR);
BOOL FlashWindow(HWND,BOOL); BOOL FlashWindow(HWND,BOOL);
BOOL FrameRgn(HDC,HRGN32,HBRUSH16,int,int); BOOL FrameRgn(HDC16,HRGN32,HBRUSH16,int,int);
void FreeLibrary(HINSTANCE16); void FreeLibrary(HINSTANCE16);
UINT GDIRealizePalette(HDC); UINT GDIRealizePalette(HDC16);
HPALETTE16 GDISelectPalette(HDC,HPALETTE16,WORD); HPALETTE16 GDISelectPalette(HDC16,HPALETTE16,WORD);
HWND GetActiveWindow(void); HWND GetActiveWindow(void);
DWORD GetAspectRatioFilter(HDC); DWORD GetAspectRatioFilter(HDC16);
int GetAsyncKeyState(int); int GetAsyncKeyState(int);
WORD GetAtomName(ATOM,LPSTR,short); WORD GetAtomName(ATOM,LPSTR,short);
COLORREF GetBkColor(HDC); COLORREF GetBkColor(HDC16);
WORD GetBkMode(HDC); WORD GetBkMode(HDC16);
DWORD GetBrushOrg(HDC); DWORD GetBrushOrg(HDC16);
BOOL GetCharABCWidths(HDC,UINT,UINT,LPABC16); BOOL GetCharABCWidths(HDC16,UINT,UINT,LPABC16);
BOOL GetCharWidth(HDC,WORD,WORD,LPINT16); BOOL GetCharWidth(HDC16,WORD,WORD,LPINT16);
HRGN32 GetClipRgn(HDC); HRGN32 GetClipRgn(HDC16);
HANDLE16 GetClipboardData(WORD); HANDLE16 GetClipboardData(WORD);
int GetClipboardFormatName(WORD,LPSTR,short); int GetClipboardFormatName(WORD,LPSTR,short);
HWND GetClipboardOwner(void); HWND GetClipboardOwner(void);
HWND GetClipboardViewer(void); HWND GetClipboardViewer(void);
HBRUSH16 GetControlBrush(HWND,HDC,WORD); HBRUSH16 GetControlBrush(HWND,HDC16,WORD);
DWORD GetCurrentPosition(HDC); DWORD GetCurrentPosition(HDC16);
DWORD GetCurrentTime(void); DWORD GetCurrentTime(void);
HCURSOR16 GetCursor(void); HCURSOR16 GetCursor(void);
DWORD GetDCOrg(HDC); DWORD GetDCOrg(HDC16);
HDC GetDCState(HDC); HDC16 GetDCState(HDC16);
int GetDIBits(HDC,HBITMAP16,WORD,WORD,LPSTR,LPBITMAPINFO,WORD); int GetDIBits(HDC16,HBITMAP16,WORD,WORD,LPSTR,LPBITMAPINFO,WORD);
SEGPTR GetDOSEnvironment(void); SEGPTR GetDOSEnvironment(void);
int GetDeviceCaps(HDC,WORD); int GetDeviceCaps(HDC16,WORD);
DWORD GetDialogBaseUnits(void); DWORD GetDialogBaseUnits(void);
HWND GetDlgItem(HWND,WORD); HWND GetDlgItem(HWND,WORD);
WORD GetDlgItemInt(HWND,WORD,BOOL*,BOOL); WORD GetDlgItemInt(HWND,WORD,BOOL*,BOOL);
@ -5053,13 +5049,13 @@ DWORD GetFreeSpace(UINT16);
DWORD GetHeapSpaces(HMODULE16); DWORD GetHeapSpaces(HMODULE16);
BOOL GetInputState(void); BOOL GetInputState(void);
int GetKBCodePage(void); int GetKBCodePage(void);
int GetKerningPairs(HDC,int,LPKERNINGPAIR16); int GetKerningPairs(HDC16,int,LPKERNINGPAIR16);
int GetKeyNameText(LONG,LPSTR,int); int GetKeyNameText(LONG,LPSTR,int);
INT GetKeyState(INT); INT GetKeyState(INT);
void GetKeyboardState(BYTE*); void GetKeyboardState(BYTE*);
int GetKeyboardType(int); int GetKeyboardType(int);
HWND GetLastActivePopup(HWND); HWND GetLastActivePopup(HWND);
WORD GetMapMode(HDC); WORD GetMapMode(HDC16);
HMENU16 GetMenu(HWND); HMENU16 GetMenu(HWND);
DWORD GetMenuCheckMarkDimensions(void); DWORD GetMenuCheckMarkDimensions(void);
INT GetMenuItemCount(HMENU16); INT GetMenuItemCount(HMENU16);
@ -5075,13 +5071,13 @@ HGLOBAL16 GetMetaFileBits(HMETAFILE16);
INT16 GetModuleFileName(HINSTANCE16,LPSTR,INT16); INT16 GetModuleFileName(HINSTANCE16,LPSTR,INT16);
HMODULE16 GetModuleHandle(LPCSTR); HMODULE16 GetModuleHandle(LPCSTR);
INT16 GetModuleUsage(HINSTANCE16); INT16 GetModuleUsage(HINSTANCE16);
DWORD GetNearestColor(HDC,DWORD); DWORD GetNearestColor(HDC16,DWORD);
WORD GetNearestPaletteIndex(HPALETTE16,DWORD); WORD GetNearestPaletteIndex(HPALETTE16,DWORD);
HWND GetNextWindow(HWND,WORD); HWND GetNextWindow(HWND,WORD);
HWND GetOpenClipboardWindow(void); HWND GetOpenClipboardWindow(void);
WORD GetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY); WORD GetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY);
DWORD GetPixel(HDC,short,short); DWORD GetPixel(HDC16,short,short);
WORD GetPolyFillMode(HDC); WORD GetPolyFillMode(HDC16);
int GetPriorityClipboardFormat(WORD*,short); int GetPriorityClipboardFormat(WORD*,short);
UINT GetPrivateProfileInt(LPCSTR,LPCSTR,INT,LPCSTR); UINT GetPrivateProfileInt(LPCSTR,LPCSTR,INT,LPCSTR);
INT GetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT,LPCSTR); INT GetPrivateProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT,LPCSTR);
@ -5089,47 +5085,47 @@ UINT GetProfileInt(LPCSTR,LPCSTR,INT);
INT GetProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT); INT GetProfileString(LPCSTR,LPCSTR,LPCSTR,LPSTR,INT);
DWORD GetQueueStatus(UINT); DWORD GetQueueStatus(UINT);
BOOL GetRasterizerCaps(LPRASTERIZER_STATUS,UINT); BOOL GetRasterizerCaps(LPRASTERIZER_STATUS,UINT);
WORD GetROP2(HDC); WORD GetROP2(HDC16);
WORD GetRelAbs(HDC); WORD GetRelAbs(HDC16);
HGDIOBJ16 GetStockObject(INT16); HGDIOBJ16 GetStockObject(INT16);
WORD GetStretchBltMode(HDC); WORD GetStretchBltMode(HDC16);
HMENU16 GetSubMenu(HMENU16,short); HMENU16 GetSubMenu(HMENU16,short);
HMENU16 GetSystemMenu(HWND,BOOL); HMENU16 GetSystemMenu(HWND,BOOL);
int GetSystemMetrics(WORD); int GetSystemMetrics(WORD);
WORD GetSystemPaletteEntries(HDC,WORD,WORD,LPPALETTEENTRY); WORD GetSystemPaletteEntries(HDC16,WORD,WORD,LPPALETTEENTRY);
WORD GetSystemPaletteUse(HDC); WORD GetSystemPaletteUse(HDC16);
DWORD GetTabbedTextExtent(HDC,LPSTR,int,int,LPINT16); DWORD GetTabbedTextExtent(HDC16,LPSTR,int,int,LPINT16);
BYTE GetTempDrive(BYTE); BYTE GetTempDrive(BYTE);
WORD GetTextAlign(HDC); WORD GetTextAlign(HDC16);
short GetTextCharacterExtra(HDC); short GetTextCharacterExtra(HDC16);
COLORREF GetTextColor(HDC); COLORREF GetTextColor(HDC16);
DWORD GetTextExtent(HDC,LPCSTR,short); DWORD GetTextExtent(HDC16,LPCSTR,short);
INT GetTextFace(HDC,INT,LPSTR); INT GetTextFace(HDC16,INT,LPSTR);
LPINT16 GetThresholdEvent(void); LPINT16 GetThresholdEvent(void);
int GetThresholdStatus(void); int GetThresholdStatus(void);
HWND GetTopWindow(HWND); HWND GetTopWindow(HWND);
DWORD GetViewportExt(HDC); DWORD GetViewportExt(HDC16);
DWORD GetViewportOrg(HDC); DWORD GetViewportOrg(HDC16);
BOOL GetWinDebugInfo(LPWINDEBUGINFO,UINT); BOOL GetWinDebugInfo(LPWINDEBUGINFO,UINT);
LONG GetWinFlags(void); LONG GetWinFlags(void);
HWND GetWindow(HWND,WORD); HWND GetWindow(HWND,WORD);
DWORD GetWindowExt(HDC); DWORD GetWindowExt(HDC16);
DWORD GetWindowOrg(HDC); DWORD GetWindowOrg(HDC16);
int GetWindowTextLength(HWND); int GetWindowTextLength(HWND);
ATOM GlobalDeleteAtom(ATOM); ATOM GlobalDeleteAtom(ATOM);
void GlobalFix(HGLOBAL16); void GlobalFix(HGLOBAL16);
BOOL16 GlobalUnWire(HGLOBAL16); BOOL16 GlobalUnWire(HGLOBAL16);
void GlobalUnfix(HGLOBAL16); void GlobalUnfix(HGLOBAL16);
SEGPTR GlobalWire(HGLOBAL16); SEGPTR GlobalWire(HGLOBAL16);
BOOL GrayString(HDC,HBRUSH16,GRAYSTRINGPROC16,LPARAM,INT,INT,INT,INT,INT); BOOL GrayString(HDC16,HBRUSH16,GRAYSTRINGPROC16,LPARAM,INT,INT,INT,INT,INT);
BOOL HiliteMenuItem(HWND,HMENU16,UINT,UINT); BOOL HiliteMenuItem(HWND,HMENU16,UINT,UINT);
BOOL InSendMessage(void); BOOL InSendMessage(void);
WORD InitAtomTable(WORD); WORD InitAtomTable(WORD);
HRGN32 InquireVisRgn(HDC); HRGN32 InquireVisRgn(HDC16);
int IntersectClipRect(HDC,short,short,short,short); int IntersectClipRect(HDC16,short,short,short,short);
int IntersectVisRect(HDC,short,short,short,short); int IntersectVisRect(HDC16,short,short,short,short);
void InvalidateRgn(HWND32,HRGN32,BOOL32); void InvalidateRgn(HWND32,HRGN32,BOOL32);
BOOL InvertRgn(HDC,HRGN32); BOOL InvertRgn(HDC16,HRGN32);
BOOL IsChild(HWND,HWND); BOOL IsChild(HWND,HWND);
BOOL IsClipboardFormatAvailable(WORD); BOOL IsClipboardFormatAvailable(WORD);
BOOL IsDialogMessage(HWND,LPMSG16); BOOL IsDialogMessage(HWND,LPMSG16);
@ -5141,7 +5137,7 @@ BOOL IsValidMetaFile(HMETAFILE16);
BOOL IsWindowEnabled(HWND); BOOL IsWindowEnabled(HWND);
BOOL IsWindowVisible(HWND); BOOL IsWindowVisible(HWND);
BOOL IsZoomed(HWND); BOOL IsZoomed(HWND);
BOOL LineTo(HDC,short,short); BOOL LineTo(HDC16,short,short);
HINSTANCE16 LoadLibrary(LPCSTR); HINSTANCE16 LoadLibrary(LPCSTR);
HINSTANCE16 LoadModule(LPCSTR,LPVOID); HINSTANCE16 LoadModule(LPCSTR,LPVOID);
FARPROC16 LocalNotify(FARPROC16); FARPROC16 LocalNotify(FARPROC16);
@ -5149,21 +5145,21 @@ HMENU16 LookupMenuHandle(HMENU16,INT);
WORD MapVirtualKey(WORD,WORD); WORD MapVirtualKey(WORD,WORD);
void MessageBeep(WORD); void MessageBeep(WORD);
int MessageBox(HWND,LPCSTR,LPCSTR,WORD); int MessageBox(HWND,LPCSTR,LPCSTR,WORD);
DWORD MoveTo(HDC,short,short); DWORD MoveTo(HDC16,short,short);
BOOL MoveWindow(HWND,short,short,short,short,BOOL); BOOL MoveWindow(HWND,short,short,short,short,BOOL);
DWORD OemKeyScan(WORD); DWORD OemKeyScan(WORD);
BOOL OemToAnsi(LPCSTR,LPSTR); BOOL OemToAnsi(LPCSTR,LPSTR);
void OemToAnsiBuff(LPCSTR,LPSTR,INT); void OemToAnsiBuff(LPCSTR,LPSTR,INT);
int OffsetClipRgn(HDC,short,short); int OffsetClipRgn(HDC16,short,short);
BOOL OpenClipboard(HWND); BOOL OpenClipboard(HWND);
BOOL OpenIcon(HWND); BOOL OpenIcon(HWND);
int OpenSound(void); int OpenSound(void);
void OutputDebugString(LPCSTR); void OutputDebugString(LPCSTR);
BOOL PaintRgn(HDC,HRGN32); BOOL PaintRgn(HDC16,HRGN32);
BOOL PatBlt(HDC,short,short,short,short,DWORD); BOOL PatBlt(HDC16,short,short,short,short,DWORD);
BOOL Pie(HDC,INT,INT,INT,INT,INT,INT,INT,INT); BOOL Pie(HDC16,INT,INT,INT,INT,INT,INT,INT,INT);
BOOL PlayMetaFile(HDC,HMETAFILE16); BOOL PlayMetaFile(HDC16,HMETAFILE16);
void PlayMetaFileRecord(HDC,LPHANDLETABLE16,LPMETARECORD,WORD); void PlayMetaFileRecord(HDC16,LPHANDLETABLE16,LPMETARECORD,WORD);
BOOL PostMessage(HWND,WORD,WORD,LONG); BOOL PostMessage(HWND,WORD,WORD,LONG);
void PostQuitMessage(INT); void PostQuitMessage(INT);
void ProfClear(void); void ProfClear(void);
@ -5174,30 +5170,30 @@ void ProfSampRate(int,int);
void ProfSetup(int,int); void ProfSetup(int,int);
void ProfStart(void); void ProfStart(void);
void ProfStop(void); void ProfStop(void);
BOOL PtVisible(HDC,short,short); BOOL PtVisible(HDC16,short,short);
WORD RealizeDefaultPalette(HDC); WORD RealizeDefaultPalette(HDC16);
BOOL Rectangle(HDC,INT,INT,INT,INT); BOOL Rectangle(HDC16,INT,INT,INT,INT);
WORD RegisterClipboardFormat(LPCSTR); WORD RegisterClipboardFormat(LPCSTR);
BOOL RemoveFontResource(LPSTR); BOOL RemoveFontResource(LPSTR);
BOOL RemoveMenu(HMENU16,UINT,UINT); BOOL RemoveMenu(HMENU16,UINT,UINT);
void ReplyMessage(LRESULT); void ReplyMessage(LRESULT);
HDC ResetDC(HDC,LPVOID); HDC16 ResetDC(HDC16,LPVOID);
BOOL ResizePalette(HPALETTE16,UINT); BOOL ResizePalette(HPALETTE16,UINT);
BOOL RestoreDC(HDC,short); BOOL RestoreDC(HDC16,short);
int RestoreVisRgn(HDC); int RestoreVisRgn(HDC16);
BOOL RoundRect(HDC,INT,INT,INT,INT,INT,INT); BOOL RoundRect(HDC16,INT,INT,INT,INT,INT,INT);
int SaveDC(HDC); int SaveDC(HDC16);
HRGN32 SaveVisRgn(HDC); HRGN32 SaveVisRgn(HDC16);
void ScrollChildren(HWND,UINT,WPARAM,LPARAM); void ScrollChildren(HWND,UINT,WPARAM16,LPARAM);
BOOL ScrollDC(HDC,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16); BOOL ScrollDC(HDC16,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16);
void ScrollWindow(HWND,short,short,LPRECT16,LPRECT16); void ScrollWindow(HWND,short,short,LPRECT16,LPRECT16);
int ScrollWindowEx(HWND,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16,WORD); int ScrollWindowEx(HWND,short,short,LPRECT16,LPRECT16,HRGN32,LPRECT16,WORD);
int SelectClipRgn(HDC,HRGN32); int SelectClipRgn(HDC16,HRGN32);
HGDIOBJ16 SelectObject(HDC,HGDIOBJ16); HGDIOBJ16 SelectObject(HDC16,HGDIOBJ16);
HPALETTE16 SelectPalette(HDC,HPALETTE16,BOOL); HPALETTE16 SelectPalette(HDC16,HPALETTE16,BOOL);
int SelectVisRgn(HDC,HRGN32); int SelectVisRgn(HDC16,HRGN32);
HWND SetActiveWindow(HWND); HWND SetActiveWindow(HWND);
WORD SetBkMode(HDC,WORD); WORD SetBkMode(HDC16,WORD);
HANDLE16 SetClipboardData(WORD,HANDLE16); HANDLE16 SetClipboardData(WORD,HANDLE16);
HWND SetClipboardViewer(HWND); HWND SetClipboardViewer(HWND);
void SetConvertHook(BOOL); void SetConvertHook(BOOL);
@ -5205,33 +5201,33 @@ BOOL SetConvertParams(int,int);
BOOL32 SetCurrentDirectory(LPCSTR); BOOL32 SetCurrentDirectory(LPCSTR);
HCURSOR16 SetCursor(HCURSOR16); HCURSOR16 SetCursor(HCURSOR16);
void SetCursorPos(short,short); void SetCursorPos(short,short);
void SetDCState(HDC,HDC); void SetDCState(HDC16,HDC16);
void SetDoubleClickTime(WORD); void SetDoubleClickTime(WORD);
int SetEnvironment(LPCSTR,LPCSTR,WORD); int SetEnvironment(LPCSTR,LPCSTR,WORD);
UINT SetErrorMode(UINT); UINT SetErrorMode(UINT);
WORD SetHookFlags(HDC,WORD); WORD SetHookFlags(HDC16,WORD);
void SetKeyboardState(BYTE*); void SetKeyboardState(BYTE*);
WORD SetMapMode(HDC,WORD); WORD SetMapMode(HDC16,WORD);
DWORD SetMapperFlags(HDC,DWORD); DWORD SetMapperFlags(HDC16,DWORD);
BOOL SetMenu(HWND,HMENU16); BOOL SetMenu(HWND,HMENU16);
BOOL SetMenuItemBitmaps(HMENU16,UINT,UINT,HBITMAP16,HBITMAP16); BOOL SetMenuItemBitmaps(HMENU16,UINT,UINT,HBITMAP16,HBITMAP16);
BOOL SetMessageQueue(int); BOOL SetMessageQueue(int);
HMETAFILE16 SetMetaFileBits(HGLOBAL16); HMETAFILE16 SetMetaFileBits(HGLOBAL16);
WORD SetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY); WORD SetPaletteEntries(HPALETTE16,WORD,WORD,LPPALETTEENTRY);
HWND SetParent(HWND,HWND); HWND SetParent(HWND,HWND);
COLORREF SetPixel(HDC,short,short,COLORREF); COLORREF SetPixel(HDC16,short,short,COLORREF);
WORD SetPolyFillMode(HDC,WORD); WORD SetPolyFillMode(HDC16,WORD);
WORD SetROP2(HDC,WORD); WORD SetROP2(HDC16,WORD);
WORD SetRelAbs(HDC,WORD); WORD SetRelAbs(HDC16,WORD);
FARPROC16 SetResourceHandler(HINSTANCE16,LPSTR,FARPROC16); FARPROC16 SetResourceHandler(HINSTANCE16,LPSTR,FARPROC16);
int SetSoundNoise(int,int); int SetSoundNoise(int,int);
WORD SetStretchBltMode(HDC,WORD); WORD SetStretchBltMode(HDC16,WORD);
LONG SetSwapAreaSize(WORD); LONG SetSwapAreaSize(WORD);
void SetSysColors(int,LPINT16,COLORREF*); void SetSysColors(int,LPINT16,COLORREF*);
WORD SetSystemPaletteUse(HDC,WORD); WORD SetSystemPaletteUse(HDC16,WORD);
WORD SetTextAlign(HDC,WORD); WORD SetTextAlign(HDC16,WORD);
short SetTextCharacterExtra(HDC,short); short SetTextCharacterExtra(HDC16,short);
short SetTextJustification(HDC,short,short); short SetTextJustification(HDC16,short,short);
int SetVoiceAccent(int,int,int,int,int); int SetVoiceAccent(int,int,int,int,int);
int SetVoiceEnvelope(int,int,int); int SetVoiceEnvelope(int,int,int);
int SetVoiceNote(int,int,int,int); int SetVoiceNote(int,int,int,int);
@ -5247,19 +5243,19 @@ BOOL ShowWindow(HWND,int);
DWORD SizeofResource(HMODULE16,HRSRC16); DWORD SizeofResource(HMODULE16,HRSRC16);
int StartSound(void); int StartSound(void);
int StopSound(void); int StopSound(void);
BOOL StretchBlt(HDC,short,short,short,short,HDC,short,short,short,short,DWORD); BOOL StretchBlt(HDC16,short,short,short,short,HDC16,short,short,short,short,DWORD);
int StretchDIBits(HDC,WORD,WORD,WORD,WORD,WORD,WORD,WORD,WORD,LPSTR,LPBITMAPINFO,WORD,DWORD); int StretchDIBits(HDC16,WORD,WORD,WORD,WORD,WORD,WORD,WORD,WORD,LPSTR,LPBITMAPINFO,WORD,DWORD);
BOOL SwapMouseButton(BOOL); BOOL SwapMouseButton(BOOL);
void SwapRecording(WORD); void SwapRecording(WORD);
int SyncAllVoices(void); int SyncAllVoices(void);
BOOL SystemParametersInfo(UINT,UINT,LPVOID,UINT); BOOL SystemParametersInfo(UINT,UINT,LPVOID,UINT);
LONG TabbedTextOut(HDC,short,short,LPSTR,short,short,LPINT16,short); LONG TabbedTextOut(HDC16,short,short,LPSTR,short,short,LPINT16,short);
int ToAscii(WORD,WORD,LPSTR,LPVOID,WORD); int ToAscii(WORD,WORD,LPSTR,LPVOID,WORD);
INT16 TranslateAccelerator(HWND,HACCEL16,LPMSG16); INT16 TranslateAccelerator(HWND,HACCEL16,LPMSG16);
BOOL TranslateMDISysAccel(HWND,LPMSG16); BOOL TranslateMDISysAccel(HWND,LPMSG16);
BOOL TranslateMessage(LPMSG16); BOOL TranslateMessage(LPMSG16);
BOOL UnrealizeObject(HGDIOBJ16); BOOL UnrealizeObject(HGDIOBJ16);
int UpdateColors(HDC); int UpdateColors(HDC16);
void ValidateCodeSegments(void); void ValidateCodeSegments(void);
LPSTR ValidateFreeSpaces(void); LPSTR ValidateFreeSpaces(void);
void ValidateRgn(HWND32,HRGN32); void ValidateRgn(HWND32,HRGN32);

View File

@ -52,5 +52,6 @@ struct tagDC;
extern BOOL32 X11DRV_GetTextExtentPoint( struct tagDC *dc, LPCSTR str, extern BOOL32 X11DRV_GetTextExtentPoint( struct tagDC *dc, LPCSTR str,
INT32 count, LPSIZE32 size ); INT32 count, LPSIZE32 size );
extern VOID X11DRV_SetDeviceClipping(struct tagDC *dc);
#endif /* __WINE_X11DRV_H */ #endif /* __WINE_X11DRV_H */

View File

@ -41,23 +41,23 @@ int CallTo32_LargeStack( int (*func)(), int nbargs, ...)
} }
} }
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT AboutDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ColorDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ColorDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ComboBoxWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ComboBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ComboLBoxWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ComboLBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT EditWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT EditWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FileOpenDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT FileOpenDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FileSaveDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT FileSaveDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT FindTextDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT FindTextDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ListBoxWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ListBoxWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT MDIClientWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT MDIClientWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PopupMenuWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT PopupMenuWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PrintDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT PrintDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT PrintSetupDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT PrintSetupDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ReplaceTextDlgProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ReplaceTextDlgProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT ScrollBarWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT ScrollBarWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT StaticWndProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT StaticWndProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT SystemMessageBoxProc(HWND,UINT,WPARAM,LPARAM); extern LRESULT SystemMessageBoxProc(HWND,UINT,WPARAM16,LPARAM);
extern LRESULT TASK_Reschedule(void); extern LRESULT TASK_Reschedule(void);
/*********************************************************************** /***********************************************************************

View File

@ -10,11 +10,13 @@ C_SRCS = \
hello.c \ hello.c \
hello2.c \ hello2.c \
hello3.c \ hello3.c \
hello3res.c \
hello4.c \ hello4.c \
new.c \ new.c \
rolex.c rolex.c
GEN_C_SRCS = \
hello3res.c
all: check_winerc $(PROGRAMS) all: check_winerc $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
@ -37,9 +39,6 @@ new: new.o
rolex: rolex.o rolex: rolex.o
$(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS) $(CC) -o rolex rolex.o $(LDOPTIONS) $(ALL_LIBS)
clean::
$(RM) $(PROGRAMS) hello3res.c hello3res.h
hello3res.c hello3res.h: $(WINERC) hello3res.c hello3res.h: $(WINERC)
### Dependencies: ### Dependencies:

View File

@ -359,7 +359,8 @@ BOOL32 CLIPBOARD_RenderFormat(LPCLIPFORMAT lpFormat)
{ {
if( lpFormat->wDataPresent && !lpFormat->hData ) if( lpFormat->wDataPresent && !lpFormat->hData )
if( IsWindow(hWndClipOwner) ) if( IsWindow(hWndClipOwner) )
SendMessage16(hWndClipOwner,WM_RENDERFORMAT,(WPARAM)lpFormat->wFormatID,0L); SendMessage16(hWndClipOwner,WM_RENDERFORMAT,
(WPARAM16)lpFormat->wFormatID,0L);
else else
{ {
dprintf_clipboard(stddeb,"\thWndClipOwner (%04x) is lost!\n", dprintf_clipboard(stddeb,"\thWndClipOwner (%04x) is lost!\n",
@ -633,7 +634,8 @@ BOOL ChangeClipboardChain(HWND hWnd, HWND hWndNext)
dprintf_clipboard(stdnimp, "ChangeClipboardChain(%04x, %04x)\n", hWnd, hWndNext); dprintf_clipboard(stdnimp, "ChangeClipboardChain(%04x, %04x)\n", hWnd, hWndNext);
if( hWndViewer ) if( hWndViewer )
bRet = !SendMessage16( hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext); bRet = !SendMessage16( hWndViewer, WM_CHANGECBCHAIN,
(WPARAM16)hWnd, (LPARAM)hWndNext);
else else
dprintf_clipboard(stddeb,"ChangeClipboardChain: hWndViewer is lost\n"); dprintf_clipboard(stddeb,"ChangeClipboardChain: hWndViewer is lost\n");

View File

@ -214,14 +214,14 @@ static LPSTR FILEDLG_GetFileType(LPSTR cfptr, LPSTR fptr, WORD index)
/*********************************************************************** /***********************************************************************
* FILEDLG_WMDrawItem [internal] * FILEDLG_WMDrawItem [internal]
*/ */
static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,int savedlg) static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM16 wParam, LPARAM lParam,int savedlg)
{ {
LPDRAWITEMSTRUCT16 lpdis = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam); LPDRAWITEMSTRUCT16 lpdis = (LPDRAWITEMSTRUCT16)PTR_SEG_TO_LIN(lParam);
char *str; char *str;
HBRUSH16 hBrush; HBRUSH16 hBrush;
HBITMAP16 hBitmap, hPrevBitmap; HBITMAP16 hBitmap, hPrevBitmap;
BITMAP16 bm; BITMAP16 bm;
HDC hMemDC; HDC16 hMemDC;
if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1) if (lpdis->CtlType == ODT_LISTBOX && lpdis->CtlID == lst1)
{ {
@ -306,7 +306,7 @@ static LONG FILEDLG_WMDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam,int saved
/*********************************************************************** /***********************************************************************
* FILEDLG_WMMeasureItem [internal] * FILEDLG_WMMeasureItem [internal]
*/ */
static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) static LONG FILEDLG_WMMeasureItem(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
BITMAP16 bm; BITMAP16 bm;
LPMEASUREITEMSTRUCT16 lpmeasure; LPMEASUREITEMSTRUCT16 lpmeasure;
@ -333,7 +333,7 @@ static int FILEDLG_HookCallChk(LPOPENFILENAME lpofn)
* FILEDLG_WMInitDialog [internal] * FILEDLG_WMInitDialog [internal]
*/ */
static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam) static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
int i, n; int i, n;
LPOPENFILENAME lpofn; LPOPENFILENAME lpofn;
@ -422,7 +422,7 @@ static LONG FILEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* FILEDLG_WMCommand [internal] * FILEDLG_WMCommand [internal]
*/ */
static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
LONG lRet; LONG lRet;
LPOPENFILENAME lpofn; LPOPENFILENAME lpofn;
@ -614,7 +614,7 @@ static LRESULT FILEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* FileOpenDlgProc (COMMDLG.6) * FileOpenDlgProc (COMMDLG.6)
*/ */
LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(GetWindowLong32A(hWnd, DWL_USER)); LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(GetWindowLong32A(hWnd, DWL_USER));
@ -637,14 +637,14 @@ LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
return FILEDLG_WMCommand(hWnd, wParam, lParam); return FILEDLG_WMCommand(hWnd, wParam, lParam);
#if 0 #if 0
case WM_CTLCOLOR: case WM_CTLCOLOR:
SetBkColor((HDC)wParam, 0x00C0C0C0); SetBkColor((HDC16)wParam, 0x00C0C0C0);
switch (HIWORD(lParam)) switch (HIWORD(lParam))
{ {
case CTLCOLOR_BTN: case CTLCOLOR_BTN:
SetTextColor((HDC)wParam, 0x00000000); SetTextColor((HDC16)wParam, 0x00000000);
return hGRAYBrush; return hGRAYBrush;
case CTLCOLOR_STATIC: case CTLCOLOR_STATIC:
SetTextColor((HDC)wParam, 0x00000000); SetTextColor((HDC16)wParam, 0x00000000);
return hGRAYBrush; return hGRAYBrush;
} }
break; break;
@ -657,7 +657,7 @@ LRESULT FileOpenDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* FileSaveDlgProc (COMMDLG.7) * FileSaveDlgProc (COMMDLG.7)
*/ */
LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(GetWindowLong32A(hWnd, DWL_USER)); LPOPENFILENAME lpofn = (LPOPENFILENAME)PTR_SEG_TO_LIN(GetWindowLong32A(hWnd, DWL_USER));
@ -684,14 +684,14 @@ LRESULT FileSaveDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
/* /*
case WM_CTLCOLOR: case WM_CTLCOLOR:
SetBkColor((HDC)wParam, 0x00C0C0C0); SetBkColor((HDC16)wParam, 0x00C0C0C0);
switch (HIWORD(lParam)) switch (HIWORD(lParam))
{ {
case CTLCOLOR_BTN: case CTLCOLOR_BTN:
SetTextColor((HDC)wParam, 0x00000000); SetTextColor((HDC16)wParam, 0x00000000);
return hGRAYBrush; return hGRAYBrush;
case CTLCOLOR_STATIC: case CTLCOLOR_STATIC:
SetTextColor((HDC)wParam, 0x00000000); SetTextColor((HDC16)wParam, 0x00000000);
return hGRAYBrush; return hGRAYBrush;
} }
return FALSE; return FALSE;
@ -764,7 +764,7 @@ BOOL ReplaceText( SEGPTR find )
/*********************************************************************** /***********************************************************************
* FINDDLG_WMInitDialog [internal] * FINDDLG_WMInitDialog [internal]
*/ */
static LRESULT FINDDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam) static LRESULT FINDDLG_WMInitDialog(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPFINDREPLACE lpfr; LPFINDREPLACE lpfr;
@ -809,7 +809,7 @@ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* FINDDLG_WMCommand [internal] * FINDDLG_WMCommand [internal]
*/ */
static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPFINDREPLACE lpfr; LPFINDREPLACE lpfr;
int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING ); int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING );
@ -852,7 +852,7 @@ static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* FindTextDlgProc (COMMDLG.13) * FindTextDlgProc (COMMDLG.13)
*/ */
LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
switch (wMsg) { switch (wMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
@ -867,7 +867,7 @@ LRESULT FindTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* REPLACEDLG_WMInitDialog [internal] * REPLACEDLG_WMInitDialog [internal]
*/ */
static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam) static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPFINDREPLACE lpfr; LPFINDREPLACE lpfr;
@ -903,7 +903,7 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* REPLACEDLG_WMCommand [internal] * REPLACEDLG_WMCommand [internal]
*/ */
static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam, LPARAM lParam)
{ {
LPFINDREPLACE lpfr; LPFINDREPLACE lpfr;
int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING ); int uFindReplaceMessage = RegisterWindowMessage32A( FINDMSGSTRING );
@ -972,7 +972,7 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* ReplaceTextDlgProc (COMMDLG.14) * ReplaceTextDlgProc (COMMDLG.14)
*/ */
LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT ReplaceTextDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
switch (wMsg) { switch (wMsg) {
case WM_INITDIALOG: case WM_INITDIALOG:
@ -1018,7 +1018,7 @@ BOOL PrintDlg( SEGPTR printdlg )
/*********************************************************************** /***********************************************************************
* PrintDlgProc (COMMDLG.21) * PrintDlgProc (COMMDLG.21)
*/ */
LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
switch (wMsg) switch (wMsg)
{ {
@ -1045,7 +1045,7 @@ LRESULT PrintDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* PrintSetupDlgProc (COMMDLG.22) * PrintSetupDlgProc (COMMDLG.22)
*/ */
LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) LRESULT PrintSetupDlgProc(HWND hWnd, UINT wMsg, WPARAM16 wParam, LPARAM lParam)
{ {
switch (wMsg) switch (wMsg)
{ {
@ -1176,7 +1176,7 @@ struct CCPRIVATE
{ {
LPCHOOSECOLOR lpcc; /* points to public known data structure */ LPCHOOSECOLOR lpcc; /* points to public known data structure */
int nextuserdef; /* next free place in user defined color array */ int nextuserdef; /* next free place in user defined color array */
HDC hdcMem; /* color graph used for BitBlt() */ HDC16 hdcMem; /* color graph used for BitBlt() */
HBITMAP16 hbmMem; /* color graph bitmap */ HBITMAP16 hbmMem; /* color graph bitmap */
RECT16 fullsize; /* original dialog window size */ RECT16 fullsize; /* original dialog window size */
UINT msetrgb; /* # of SETRGBSTRING message (today not used) */ UINT msetrgb; /* # of SETRGBSTRING message (today not used) */
@ -1866,7 +1866,7 @@ static BOOL CC_HookCallChk(LPCHOOSECOLOR lpcc)
/*********************************************************************** /***********************************************************************
* CC_WMInitDialog [internal] * CC_WMInitDialog [internal]
*/ */
static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam) static LONG CC_WMInitDialog(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
int i,res; int i,res;
HWND hwnd; HWND hwnd;
@ -1936,7 +1936,7 @@ static LONG CC_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CC_WMCommand [internal] * CC_WMCommand [internal]
*/ */
static LRESULT CC_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam) static LRESULT CC_WMCommand(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
int r,g,b,i,xx; int r,g,b,i,xx;
UINT cokmsg; UINT cokmsg;
@ -2063,7 +2063,7 @@ static LRESULT CC_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CC_WMPaint [internal] * CC_WMPaint [internal]
*/ */
static LRESULT CC_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam) static LRESULT CC_WMPaint(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER); struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER);
/* we have to paint dialog children except text and buttons */ /* we have to paint dialog children except text and buttons */
@ -2090,7 +2090,7 @@ static LRESULT CC_WMPaint(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CC_WMLButtonDown [internal] * CC_WMLButtonDown [internal]
*/ */
static LRESULT CC_WMLButtonDown(HWND hDlg, WPARAM wParam, LPARAM lParam) static LRESULT CC_WMLButtonDown(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER); struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER);
int r,g,b,i; int r,g,b,i;
@ -2139,7 +2139,7 @@ static LRESULT CC_WMLButtonDown(HWND hDlg, WPARAM wParam, LPARAM lParam)
* ColorDlgProc (COMMDLG.8) * ColorDlgProc (COMMDLG.8)
*/ */
LRESULT ColorDlgProc(HWND hDlg, UINT message, LRESULT ColorDlgProc(HWND hDlg, UINT message,
UINT wParam, LONG lParam) WPARAM16 wParam, LONG lParam)
{ {
int res; int res;
struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER); struct CCPRIVATE * lpp=(struct CCPRIVATE *)GetWindowLong32A(hDlg, DWL_USER);
@ -2302,7 +2302,7 @@ INT16 FontFamilyEnumProc( SEGPTR logfont, SEGPTR metrics,
* *
* Fill font style information into combobox (without using font.c directly) * Fill font style information into combobox (without using font.c directly)
*/ */
static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, LPLOGFONT16 lplf, static int SetFontStylesToCombo2(HWND hwnd, HDC16 hdc, LPLOGFONT16 lplf,
LPTEXTMETRIC16 lptm) LPTEXTMETRIC16 lptm)
{ {
#define FSTYLES 4 #define FSTYLES 4
@ -2402,7 +2402,7 @@ INT16 FontStyleEnumProc( SEGPTR logfont, SEGPTR metrics,
if (!SendMessage16(hcmb2,CB_GETCOUNT,0,0)) if (!SendMessage16(hcmb2,CB_GETCOUNT,0,0))
{ {
HDC hdc= (lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC) ? lpcf->hDC : GetDC32(hDlg); HDC32 hdc= (lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC) ? lpcf->hDC : GetDC32(hDlg);
i=SetFontStylesToCombo2(hcmb2,hdc,lplf,lptm); i=SetFontStylesToCombo2(hcmb2,hdc,lplf,lptm);
if (!(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC)) if (!(lpcf->Flags & CF_PRINTERFONTS && lpcf->hDC))
ReleaseDC32(hDlg,hdc); ReleaseDC32(hDlg,hdc);
@ -2416,7 +2416,7 @@ INT16 FontStyleEnumProc( SEGPTR logfont, SEGPTR metrics,
/*********************************************************************** /***********************************************************************
* CFn_WMInitDialog [internal] * CFn_WMInitDialog [internal]
*/ */
LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam) LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
HDC32 hdc; HDC32 hdc;
int i,j,res,init=0; int i,j,res,init=0;
@ -2532,7 +2532,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CFn_WMMeasureItem [internal] * CFn_WMMeasureItem [internal]
*/ */
LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam) LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
BITMAP16 bm; BITMAP16 bm;
LPMEASUREITEMSTRUCT16 lpmi=PTR_SEG_TO_LIN((LPMEASUREITEMSTRUCT16)lParam); LPMEASUREITEMSTRUCT16 lpmi=PTR_SEG_TO_LIN((LPMEASUREITEMSTRUCT16)lParam);
@ -2548,7 +2548,7 @@ LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CFn_WMDrawItem [internal] * CFn_WMDrawItem [internal]
*/ */
LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam) LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
HBRUSH16 hBrush; HBRUSH16 hBrush;
char *buffer; char *buffer;
@ -2556,7 +2556,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
COLORREF cr; COLORREF cr;
RECT16 rect; RECT16 rect;
#if 0 #if 0
HDC hMemDC; HDC16 hMemDC;
int nFontType; int nFontType;
HBITMAP16 hBitmap; /* for later TT usage */ HBITMAP16 hBitmap; /* for later TT usage */
#endif #endif
@ -2640,7 +2640,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CFn_WMCtlColor [internal] * CFn_WMCtlColor [internal]
*/ */
LRESULT CFn_WMCtlColor(HWND hDlg, WPARAM wParam, LPARAM lParam) LRESULT CFn_WMCtlColor(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER); LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER);
@ -2656,12 +2656,12 @@ LRESULT CFn_WMCtlColor(HWND hDlg, WPARAM wParam, LPARAM lParam)
/*********************************************************************** /***********************************************************************
* CFn_WMCommand [internal] * CFn_WMCommand [internal]
*/ */
LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam) LRESULT CFn_WMCommand(HWND hDlg, WPARAM16 wParam, LPARAM lParam)
{ {
HFONT16 hFont; HFONT16 hFont;
int i,j; int i,j;
long l; long l;
HDC hdc; HDC16 hdc;
LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER); LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER);
LPLOGFONT16 lpxx=PTR_SEG_TO_LIN(lpcf->lpLogFont); LPLOGFONT16 lpxx=PTR_SEG_TO_LIN(lpcf->lpLogFont);
@ -2793,7 +2793,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam)
2. some CF_.. flags are not supported 2. some CF_.. flags are not supported
3. some TType extensions 3. some TType extensions
*/ */
LRESULT FormatCharDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) LRESULT FormatCharDlgProc(HWND hDlg, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER); LPCHOOSEFONT lpcf=(LPCHOOSEFONT)GetWindowLong32A(hDlg, DWL_USER);
if (message!=WM_INITDIALOG) if (message!=WM_INITDIALOG)

View File

@ -9,7 +9,7 @@
#include "windows.h" #include "windows.h"
#include "gdi.h" #include "gdi.h"
INT Escape( HDC hdc, INT nEscape, INT cbInput, INT Escape( HDC16 hdc, INT nEscape, INT cbInput,
SEGPTR lpszInData, SEGPTR lpvOutData ) SEGPTR lpszInData, SEGPTR lpvOutData )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );

View File

@ -47,7 +47,7 @@ OLESTATUS OleRevokeClientDoc(LHCLIENTDOC hServerDoc)
/*********************************************************************** /***********************************************************************
* OleIsDcMeta * OleIsDcMeta
*/ */
BOOL OleIsDcMeta(HDC hdc) BOOL OleIsDcMeta(HDC16 hdc)
{ {
dprintf_ole(stddeb,"OleIsDCMeta(%04x)\n",hdc); dprintf_ole(stddeb,"OleIsDCMeta(%04x)\n",hdc);
return GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0; return GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0;

View File

@ -351,7 +351,7 @@ static char AppName[128], AppMisc[1536];
/************************************************************************* /*************************************************************************
* AboutDlgProc [SHELL.33] * AboutDlgProc [SHELL.33]
*/ */
LRESULT AboutDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT AboutDlgProc(HWND hWnd, UINT msg, WPARAM16 wParam, LPARAM lParam)
{ {
char Template[512], AppTitle[512]; char Template[512], AppTitle[512];

View File

@ -1183,7 +1183,7 @@ static void recv_message(int sig)
} }
result = PostMessage(message.hWnd, message.wMsg, result = PostMessage(message.hWnd, message.wMsg,
(WPARAM)message.handle, message.lParam); (WPARAM16)message.handle, message.lParam);
if (result != FALSE) { if (result != FALSE) {
message_is_valid = 1; message_is_valid = 1;
break; break;

View File

@ -345,7 +345,7 @@ MCISTR_Open(_MCISTR_PROTO_) {
FLAG1("shareable",MCI_OPEN_SHAREABLE); FLAG1("shareable",MCI_OPEN_SHAREABLE);
if (!strcmp(keywords[i],"alias") && (i+1<nrofkeywords)) { if (!strcmp(keywords[i],"alias") && (i+1<nrofkeywords)) {
dwFlags |= MCI_OPEN_ALIAS; dwFlags |= MCI_OPEN_ALIAS;
pU->openParams.lpstrAlias=SEGPTR_GET(SEGPTR_STRDUP(keywords[i])); pU->openParams.lpstrAlias=SEGPTR_GET(SEGPTR_STRDUP(keywords[i+1]));
i+=2; i+=2;
continue; continue;
} }

View File

@ -1287,7 +1287,7 @@ BOOL BITBLT_InternalStretchBlt( DC *dcDst, short xDst, short yDst,
/*********************************************************************** /***********************************************************************
* PatBlt (GDI.29) * PatBlt (GDI.29)
*/ */
BOOL PatBlt( HDC hdc, short left, short top, BOOL PatBlt( HDC16 hdc, short left, short top,
short width, short height, DWORD rop) short width, short height, DWORD rop)
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -1312,8 +1312,8 @@ BOOL PatBlt( HDC hdc, short left, short top,
/*********************************************************************** /***********************************************************************
* BitBlt (GDI.34) * BitBlt (GDI.34)
*/ */
BOOL BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, INT height, BOOL BitBlt( HDC16 hdcDst, INT xDst, INT yDst, INT width, INT height,
HDC hdcSrc, INT xSrc, INT ySrc, DWORD rop ) HDC16 hdcSrc, INT xSrc, INT ySrc, DWORD rop )
{ {
DC *dcDst, *dcSrc; DC *dcDst, *dcSrc;
@ -1340,9 +1340,9 @@ BOOL BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, INT height,
/*********************************************************************** /***********************************************************************
* StretchBlt (GDI.35) * StretchBlt (GDI.35)
*/ */
BOOL StretchBlt( HDC hdcDst, short xDst, short yDst, BOOL StretchBlt( HDC16 hdcDst, short xDst, short yDst,
short widthDst, short heightDst, short widthDst, short heightDst,
HDC hdcSrc, short xSrc, short ySrc, HDC16 hdcSrc, short xSrc, short ySrc,
short widthSrc, short heightSrc, DWORD rop ) short widthSrc, short heightSrc, DWORD rop )
{ {
DC *dcDst, *dcSrc; DC *dcDst, *dcSrc;

View File

@ -18,29 +18,6 @@
(dc)->hookProc( (dc)->hSelf, DCHC_INVALIDVISRGN, (dc)->dwHookData, 0 ); \ (dc)->hookProc( (dc)->hSelf, DCHC_INVALIDVISRGN, (dc)->dwHookData, 0 ); \
} while(0) } while(0)
/***********************************************************************
* CLIPPING_SetDeviceClipping
*
* Set the clip region of the physical device.
*/
static void CLIPPING_SetDeviceClipping( DC * dc )
{
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr(dc->w.hGCClipRgn, REGION_MAGIC);
if (!obj)
{
fprintf( stderr, "SetDeviceClipping: Rgn is 0. Please report this.\n");
exit(1);
}
if (obj->xrgn)
{
XSetRegion( display, dc->u.x.gc, obj->xrgn );
XSetClipOrigin( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
}
else /* Clip everything */
{
XSetClipRectangles( display, dc->u.x.gc, 0, 0, NULL, 0, 0 );
}
}
/*********************************************************************** /***********************************************************************
@ -68,14 +45,14 @@ void CLIPPING_UpdateGCRegion( DC * dc )
CombineRgn( dc->w.hGCClipRgn, dc->w.hVisRgn, 0, RGN_COPY ); CombineRgn( dc->w.hGCClipRgn, dc->w.hVisRgn, 0, RGN_COPY );
else else
CombineRgn( dc->w.hGCClipRgn, dc->w.hClipRgn, dc->w.hVisRgn, RGN_AND ); CombineRgn( dc->w.hGCClipRgn, dc->w.hClipRgn, dc->w.hVisRgn, RGN_AND );
CLIPPING_SetDeviceClipping( dc ); if (dc->funcs->pSetDeviceClipping) dc->funcs->pSetDeviceClipping( dc );
} }
/*********************************************************************** /***********************************************************************
* SelectClipRgn (GDI.44) * SelectClipRgn (GDI.44)
*/ */
int SelectClipRgn( HDC hdc, HRGN32 hrgn ) int SelectClipRgn( HDC16 hdc, HRGN32 hrgn )
{ {
int retval; int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -103,7 +80,7 @@ int SelectClipRgn( HDC hdc, HRGN32 hrgn )
/*********************************************************************** /***********************************************************************
* SelectVisRgn (GDI.105) * SelectVisRgn (GDI.105)
*/ */
int SelectVisRgn( HDC hdc, HRGN32 hrgn ) int SelectVisRgn( HDC16 hdc, HRGN32 hrgn )
{ {
int retval; int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -122,7 +99,7 @@ int SelectVisRgn( HDC hdc, HRGN32 hrgn )
/*********************************************************************** /***********************************************************************
* OffsetClipRgn (GDI.32) * OffsetClipRgn (GDI.32)
*/ */
int OffsetClipRgn( HDC hdc, short x, short y ) int OffsetClipRgn( HDC16 hdc, short x, short y )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) if (!dc)
@ -148,7 +125,7 @@ int OffsetClipRgn( HDC hdc, short x, short y )
/*********************************************************************** /***********************************************************************
* OffsetVisRgn (GDI.102) * OffsetVisRgn (GDI.102)
*/ */
int OffsetVisRgn( HDC hdc, short x, short y ) int OffsetVisRgn( HDC16 hdc, short x, short y )
{ {
int retval; int retval;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -200,7 +177,7 @@ int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
/*********************************************************************** /***********************************************************************
* ExcludeClipRect (GDI.21) * ExcludeClipRect (GDI.21)
*/ */
int ExcludeClipRect( HDC hdc, short left, short top, int ExcludeClipRect( HDC16 hdc, short left, short top,
short right, short bottom ) short right, short bottom )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -226,7 +203,7 @@ int ExcludeClipRect( HDC hdc, short left, short top,
/*********************************************************************** /***********************************************************************
* IntersectClipRect (GDI.22) * IntersectClipRect (GDI.22)
*/ */
int IntersectClipRect( HDC hdc, short left, short top, int IntersectClipRect( HDC16 hdc, short left, short top,
short right, short bottom ) short right, short bottom )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -292,7 +269,8 @@ static int CLIPPING_IntersectVisRect( DC * dc, short left, short top,
/*********************************************************************** /***********************************************************************
* ExcludeVisRect (GDI.73) * ExcludeVisRect (GDI.73)
*/ */
int ExcludeVisRect( HDC hdc, short left, short top, short right, short bottom ) int ExcludeVisRect( HDC16 hdc, short left, short top,
short right, short bottom )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
@ -306,7 +284,7 @@ int ExcludeVisRect( HDC hdc, short left, short top, short right, short bottom )
/*********************************************************************** /***********************************************************************
* IntersectVisRect (GDI.98) * IntersectVisRect (GDI.98)
*/ */
int IntersectVisRect( HDC hdc, short left, short top, int IntersectVisRect( HDC16 hdc, short left, short top,
short right, short bottom ) short right, short bottom )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -321,7 +299,7 @@ int IntersectVisRect( HDC hdc, short left, short top,
/*********************************************************************** /***********************************************************************
* PtVisible (GDI.103) * PtVisible (GDI.103)
*/ */
BOOL PtVisible( HDC hdc, short x, short y ) BOOL PtVisible( HDC16 hdc, short x, short y )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return ERROR; if (!dc) return ERROR;
@ -396,7 +374,7 @@ INT32 GetClipBox32( HDC32 hdc, LPRECT32 rect )
/*********************************************************************** /***********************************************************************
* SaveVisRgn (GDI.129) * SaveVisRgn (GDI.129)
*/ */
HRGN32 SaveVisRgn( HDC hdc ) HRGN32 SaveVisRgn( HDC16 hdc )
{ {
HRGN32 copy; HRGN32 copy;
RGNOBJ *obj, *copyObj; RGNOBJ *obj, *copyObj;
@ -426,7 +404,7 @@ HRGN32 SaveVisRgn( HDC hdc )
/*********************************************************************** /***********************************************************************
* RestoreVisRgn (GDI.130) * RestoreVisRgn (GDI.130)
*/ */
int RestoreVisRgn( HDC hdc ) int RestoreVisRgn( HDC16 hdc )
{ {
HRGN32 saved; HRGN32 saved;
RGNOBJ *obj, *savedObj; RGNOBJ *obj, *savedObj;

View File

@ -608,10 +608,10 @@ BOOL DestroyCursor( HCURSOR16 hCursor )
/*********************************************************************** /***********************************************************************
* DrawIcon (USER.84) * DrawIcon (USER.84)
*/ */
BOOL DrawIcon( HDC hdc, INT x, INT y, HICON16 hIcon ) BOOL DrawIcon( HDC16 hdc, INT x, INT y, HICON16 hIcon )
{ {
CURSORICONINFO *ptr; CURSORICONINFO *ptr;
HDC hMemDC; HDC16 hMemDC;
HBITMAP16 hXorBits, hAndBits; HBITMAP16 hXorBits, hAndBits;
COLORREF oldFg, oldBg; COLORREF oldFg, oldBg;

View File

@ -366,7 +366,7 @@ BOOL32 DC_SetupGCForText( DC * dc )
/*********************************************************************** /***********************************************************************
* GetDCState (GDI.179) * GetDCState (GDI.179)
*/ */
HDC GetDCState( HDC hdc ) HDC16 GetDCState( HDC16 hdc )
{ {
DC * newdc, * dc; DC * newdc, * dc;
HGDIOBJ16 handle; HGDIOBJ16 handle;
@ -381,7 +381,7 @@ HDC GetDCState( HDC hdc )
memcpy( &newdc->w, &dc->w, sizeof(dc->w) ); memcpy( &newdc->w, &dc->w, sizeof(dc->w) );
memcpy( &newdc->u.x.pen, &dc->u.x.pen, sizeof(dc->u.x.pen) ); memcpy( &newdc->u.x.pen, &dc->u.x.pen, sizeof(dc->u.x.pen) );
newdc->hSelf = (HDC)handle; newdc->hSelf = (HDC32)handle;
newdc->saveLevel = 0; newdc->saveLevel = 0;
newdc->w.flags |= DC_SAVED; newdc->w.flags |= DC_SAVED;
@ -400,7 +400,7 @@ HDC GetDCState( HDC hdc )
/*********************************************************************** /***********************************************************************
* SetDCState (GDI.180) * SetDCState (GDI.180)
*/ */
void SetDCState( HDC hdc, HDC hdcs ) void SetDCState( HDC16 hdc, HDC16 hdcs )
{ {
DC * dc, * dcs; DC * dc, * dcs;
HRGN32 hVisRgn, hClipRgn, hGCClipRgn; HRGN32 hVisRgn, hClipRgn, hGCClipRgn;
@ -439,9 +439,9 @@ void SetDCState( HDC hdc, HDC hdcs )
/*********************************************************************** /***********************************************************************
* SaveDC (GDI.30) * SaveDC (GDI.30)
*/ */
int SaveDC( HDC hdc ) int SaveDC( HDC16 hdc )
{ {
HDC hdcs; HDC16 hdcs;
DC * dc, * dcs; DC * dc, * dcs;
dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -464,7 +464,7 @@ int SaveDC( HDC hdc )
/*********************************************************************** /***********************************************************************
* RestoreDC (GDI.39) * RestoreDC (GDI.39)
*/ */
BOOL RestoreDC( HDC hdc, short level ) BOOL RestoreDC( HDC16 hdc, short level )
{ {
DC * dc, * dcs; DC * dc, * dcs;
@ -483,7 +483,7 @@ BOOL RestoreDC( HDC hdc, short level )
while ((short)dc->saveLevel >= level) while ((short)dc->saveLevel >= level)
{ {
HDC hdcs = dc->header.hNext; HDC16 hdcs = dc->header.hNext;
if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) return FALSE; if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) return FALSE;
dc->header.hNext = dcs->header.hNext; dc->header.hNext = dcs->header.hNext;
if ((short)--dc->saveLevel < level) SetDCState( hdc, hdcs ); if ((short)--dc->saveLevel < level) SetDCState( hdc, hdcs );
@ -496,7 +496,7 @@ BOOL RestoreDC( HDC hdc, short level )
/*********************************************************************** /***********************************************************************
* CreateDC (GDI.53) * CreateDC (GDI.53)
*/ */
HDC CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData ) HDC16 CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
{ {
DC * dc; DC * dc;
const DC_FUNCTIONS *funcs; const DC_FUNCTIONS *funcs;
@ -524,7 +524,7 @@ HDC CreateDC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initDa
/*********************************************************************** /***********************************************************************
* CreateIC (GDI.153) * CreateIC (GDI.153)
*/ */
HDC CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData ) HDC16 CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initData )
{ {
/* Nothing special yet for ICs */ /* Nothing special yet for ICs */
return CreateDC( driver, device, output, initData ); return CreateDC( driver, device, output, initData );
@ -534,7 +534,7 @@ HDC CreateIC( LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE* initDa
/*********************************************************************** /***********************************************************************
* CreateCompatibleDC (GDI.52) * CreateCompatibleDC (GDI.52)
*/ */
HDC CreateCompatibleDC( HDC hdc ) HDC16 CreateCompatibleDC( HDC16 hdc )
{ {
DC *dc, *origDC; DC *dc, *origDC;
HBITMAP16 hbitmap; HBITMAP16 hbitmap;
@ -577,7 +577,7 @@ HDC CreateCompatibleDC( HDC hdc )
/*********************************************************************** /***********************************************************************
* DeleteDC (GDI.68) * DeleteDC (GDI.68)
*/ */
BOOL DeleteDC( HDC hdc ) BOOL DeleteDC( HDC16 hdc )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return FALSE; if (!dc) return FALSE;
@ -587,7 +587,7 @@ BOOL DeleteDC( HDC hdc )
while (dc->saveLevel) while (dc->saveLevel)
{ {
DC * dcs; DC * dcs;
HDC hdcs = dc->header.hNext; HDC16 hdcs = dc->header.hNext;
if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) break; if (!(dcs = (DC *) GDI_GetObjPtr( hdcs, DC_MAGIC ))) break;
dc->header.hNext = dcs->header.hNext; dc->header.hNext = dcs->header.hNext;
dc->saveLevel--; dc->saveLevel--;
@ -614,7 +614,7 @@ BOOL DeleteDC( HDC hdc )
/*********************************************************************** /***********************************************************************
* ResetDC (GDI.376) * ResetDC (GDI.376)
*/ */
HDC ResetDC( HDC hdc, /* DEVMODE */ void *devmode ) HDC16 ResetDC( HDC16 hdc, /* DEVMODE */ void *devmode )
{ {
fprintf( stderr, "ResetDC: empty stub!\n" ); fprintf( stderr, "ResetDC: empty stub!\n" );
return hdc; return hdc;
@ -624,7 +624,7 @@ HDC ResetDC( HDC hdc, /* DEVMODE */ void *devmode )
/*********************************************************************** /***********************************************************************
* GetDeviceCaps (GDI.80) * GetDeviceCaps (GDI.80)
*/ */
int GetDeviceCaps( HDC hdc, WORD cap ) int GetDeviceCaps( HDC16 hdc, WORD cap )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0; if (!dc) return 0;
@ -684,7 +684,7 @@ COLORREF SetTextColor( HDC32 hdc, COLORREF color )
/*********************************************************************** /***********************************************************************
* SetTextAlign (GDI.346) * SetTextAlign (GDI.346)
*/ */
WORD SetTextAlign( HDC hdc, WORD textAlign ) WORD SetTextAlign( HDC16 hdc, WORD textAlign )
{ {
WORD prevAlign; WORD prevAlign;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -703,7 +703,7 @@ WORD SetTextAlign( HDC hdc, WORD textAlign )
/*********************************************************************** /***********************************************************************
* GetDCOrg (GDI.79) * GetDCOrg (GDI.79)
*/ */
DWORD GetDCOrg( HDC hdc ) DWORD GetDCOrg( HDC16 hdc )
{ {
Window root; Window root;
int x, y, w, h, border, depth; int x, y, w, h, border, depth;
@ -720,7 +720,7 @@ DWORD GetDCOrg( HDC hdc )
/*********************************************************************** /***********************************************************************
* SetDCOrg (GDI.117) * SetDCOrg (GDI.117)
*/ */
DWORD SetDCOrg( HDC hdc, short x, short y ) DWORD SetDCOrg( HDC16 hdc, short x, short y )
{ {
DWORD prevOrg; DWORD prevOrg;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -764,7 +764,7 @@ DWORD GetDCHook( HDC16 hdc, FARPROC16 *phookProc )
/*********************************************************************** /***********************************************************************
* SetHookFlags (GDI.192) * SetHookFlags (GDI.192)
*/ */
WORD SetHookFlags(HDC hDC, WORD flags) WORD SetHookFlags(HDC16 hDC, WORD flags)
{ {
DC* dc = (DC*)GDI_GetObjPtr( hDC, DC_MAGIC ); DC* dc = (DC*)GDI_GetObjPtr( hDC, DC_MAGIC );

View File

@ -10,7 +10,7 @@
#define DC_GET_VAL( func_type, func_name, dc_field ) \ #define DC_GET_VAL( func_type, func_name, dc_field ) \
func_type func_name( HDC hdc ) \ func_type func_name( HDC16 hdc ) \
{ \ { \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \ DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
if (!dc) return 0; \ if (!dc) return 0; \
@ -18,7 +18,7 @@ func_type func_name( HDC hdc ) \
} }
#define DC_GET_X_Y( func_type, func_name, ret_x, ret_y ) \ #define DC_GET_X_Y( func_type, func_name, ret_x, ret_y ) \
func_type func_name( HDC hdc ) \ func_type func_name( HDC16 hdc ) \
{ \ { \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \ DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \
if (!dc) return 0; \ if (!dc) return 0; \
@ -45,7 +45,7 @@ BOOL32 func_name##32( HDC32 hdc, LPPOINT32 pt ) \
} }
#define DC_SET_MODE( func_name, dc_field, min_val, max_val, meta_func ) \ #define DC_SET_MODE( func_name, dc_field, min_val, max_val, meta_func ) \
WORD func_name( HDC hdc, WORD mode ) \ WORD func_name( HDC16 hdc, WORD mode ) \
{ \ { \
WORD prevMode; \ WORD prevMode; \
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \ DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); \

View File

@ -621,13 +621,13 @@ static int DIB_SetImageBits( DC *dc, WORD lines, WORD depth, LPSTR bits,
/*********************************************************************** /***********************************************************************
* StretchDIBits (GDI.439) * StretchDIBits (GDI.439)
*/ */
int StretchDIBits( HDC hdc, int StretchDIBits( HDC16 hdc,
WORD xDest, WORD yDest, WORD wDestWidth, WORD wDestHeight, WORD xDest, WORD yDest, WORD wDestWidth, WORD wDestHeight,
WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight, WORD xSrc, WORD ySrc, WORD wSrcWidth, WORD wSrcHeight,
LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop ) LPSTR bits, LPBITMAPINFO info, WORD wUsage, DWORD dwRop )
{ {
HBITMAP16 hBitmap, hOldBitmap; HBITMAP16 hBitmap, hOldBitmap;
HDC hdcMem; HDC16 hdcMem;
hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT, hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
bits, info, wUsage ); bits, info, wUsage );
@ -724,7 +724,7 @@ INT16 SetDIBitsToDevice( HDC32 hdc, INT32 xDest, INT32 yDest, DWORD cx,
/*********************************************************************** /***********************************************************************
* GetDIBits (GDI.441) * GetDIBits (GDI.441)
*/ */
int GetDIBits( HDC hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines, int GetDIBits( HDC16 hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
LPSTR bits, BITMAPINFO * info, WORD coloruse ) LPSTR bits, BITMAPINFO * info, WORD coloruse )
{ {
DC * dc; DC * dc;
@ -792,7 +792,7 @@ int GetDIBits( HDC hdc, HBITMAP16 hbitmap, WORD startscan, WORD lines,
/*********************************************************************** /***********************************************************************
* CreateDIBitmap (GDI.442) * CreateDIBitmap (GDI.442)
*/ */
HBITMAP16 CreateDIBitmap( HDC hdc, BITMAPINFOHEADER * header, DWORD init, HBITMAP16 CreateDIBitmap( HDC16 hdc, BITMAPINFOHEADER * header, DWORD init,
LPVOID bits, BITMAPINFO * data, UINT coloruse ) LPVOID bits, BITMAPINFO * data, UINT coloruse )
{ {
HBITMAP16 handle; HBITMAP16 handle;

View File

@ -330,8 +330,9 @@ void FONT_GetMetrics( LOGFONT16 * logfont, XFontStruct * xfont,
/*********************************************************************** /***********************************************************************
* GetGlyphOutLine (GDI.309) * GetGlyphOutLine (GDI.309)
*/ */
DWORD GetGlyphOutLine(HDC hdc, UINT uChar, UINT fuFormat, LPGLYPHMETRICS lpgm, DWORD GetGlyphOutLine( HDC16 hdc, UINT uChar, UINT fuFormat,
DWORD cbBuffer, LPSTR lpBuffer, LPMAT2 lpmat2) LPGLYPHMETRICS lpgm, DWORD cbBuffer, LPSTR lpBuffer,
LPMAT2 lpmat2)
{ {
fprintf( stdnimp,"GetGlyphOutLine(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n", fprintf( stdnimp,"GetGlyphOutLine(%04x, '%c', %04x, %p, %ld, %p, %p) // - empty stub!\n",
hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 ); hdc, uChar, fuFormat, lpgm, cbBuffer, lpBuffer, lpmat2 );
@ -685,7 +686,7 @@ HFONT16 FONT_SelectObject( DC * dc, HFONT16 hfont, FONTOBJ * font )
/*********************************************************************** /***********************************************************************
* GetTextCharacterExtra (GDI.89) * GetTextCharacterExtra (GDI.89)
*/ */
short GetTextCharacterExtra( HDC hdc ) short GetTextCharacterExtra( HDC16 hdc )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0; if (!dc) return 0;
@ -697,7 +698,7 @@ short GetTextCharacterExtra( HDC hdc )
/*********************************************************************** /***********************************************************************
* SetTextCharacterExtra (GDI.8) * SetTextCharacterExtra (GDI.8)
*/ */
short SetTextCharacterExtra( HDC hdc, short extra ) short SetTextCharacterExtra( HDC16 hdc, short extra )
{ {
short prev; short prev;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -712,7 +713,7 @@ short SetTextCharacterExtra( HDC hdc, short extra )
/*********************************************************************** /***********************************************************************
* SetTextJustification (GDI.10) * SetTextJustification (GDI.10)
*/ */
short SetTextJustification( HDC hdc, short extra, short breaks ) short SetTextJustification( HDC16 hdc, short extra, short breaks )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) return 0; if (!dc) return 0;
@ -738,7 +739,7 @@ short SetTextJustification( HDC hdc, short extra, short breaks )
/*********************************************************************** /***********************************************************************
* GetTextFace (GDI.92) * GetTextFace (GDI.92)
*/ */
INT GetTextFace( HDC hdc, INT count, LPSTR name ) INT GetTextFace( HDC16 hdc, INT count, LPSTR name )
{ {
FONTOBJ *font; FONTOBJ *font;
@ -754,7 +755,7 @@ INT GetTextFace( HDC hdc, INT count, LPSTR name )
/*********************************************************************** /***********************************************************************
* GetTextExtent (GDI.91) * GetTextExtent (GDI.91)
*/ */
DWORD GetTextExtent( HDC hdc, LPCSTR str, short count ) DWORD GetTextExtent( HDC16 hdc, LPCSTR str, short count )
{ {
SIZE16 size; SIZE16 size;
if (!GetTextExtentPoint16( hdc, str, count, &size )) return 0; if (!GetTextExtentPoint16( hdc, str, count, &size )) return 0;
@ -944,7 +945,7 @@ BOOL32 GetTextMetrics32W( HDC32 hdc, TEXTMETRIC32W *metrics )
/*********************************************************************** /***********************************************************************
* SetMapperFlags (GDI.349) * SetMapperFlags (GDI.349)
*/ */
DWORD SetMapperFlags(HDC hDC, DWORD dwFlag) DWORD SetMapperFlags(HDC16 hDC, DWORD dwFlag)
{ {
dprintf_font(stdnimp,"SetmapperFlags(%04x, %08lX) // Empty Stub !\n", dprintf_font(stdnimp,"SetmapperFlags(%04x, %08lX) // Empty Stub !\n",
hDC, dwFlag); hDC, dwFlag);
@ -955,7 +956,7 @@ DWORD SetMapperFlags(HDC hDC, DWORD dwFlag)
/*********************************************************************** /***********************************************************************
* GetCharABCWidths (GDI.307) * GetCharABCWidths (GDI.307)
*/ */
BOOL GetCharABCWidths(HDC hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC) BOOL GetCharABCWidths(HDC16 hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC)
{ {
/* No TrueType fonts in Wine so far */ /* No TrueType fonts in Wine so far */
@ -970,7 +971,7 @@ BOOL GetCharABCWidths(HDC hdc, UINT wFirstChar, UINT wLastChar, LPABC16 lpABC)
/*********************************************************************** /***********************************************************************
* GetCharWidth (GDI.350) * GetCharWidth (GDI.350)
*/ */
BOOL GetCharWidth(HDC hdc, WORD wFirstChar, WORD wLastChar, LPINT16 lpBuffer) BOOL GetCharWidth(HDC16 hdc, WORD wFirstChar, WORD wLastChar, LPINT16 lpBuffer)
{ {
int i, j; int i, j;
XFontStruct *xfont; XFontStruct *xfont;
@ -1153,7 +1154,7 @@ void InitFontsList(void)
/************************************************************************* /*************************************************************************
* EnumFonts [GDI.70] * EnumFonts [GDI.70]
*/ */
INT EnumFonts(HDC hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpData) INT EnumFonts(HDC16 hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
{ {
HLOCAL16 hLog; HLOCAL16 hLog;
HLOCAL16 hMet; HLOCAL16 hMet;
@ -1223,7 +1224,7 @@ INT EnumFonts(HDC hDC, LPCSTR lpFaceName, FONTENUMPROC16 lpEnumFunc, LPARAM lpDa
/************************************************************************* /*************************************************************************
* EnumFontFamilies [GDI.330] * EnumFontFamilies [GDI.330]
*/ */
INT EnumFontFamilies(HDC hDC, LPCSTR lpszFamily, FONTENUMPROC16 lpEnumFunc, LPARAM lpData) INT EnumFontFamilies(HDC16 hDC, LPCSTR lpszFamily, FONTENUMPROC16 lpEnumFunc, LPARAM lpData)
{ {
HLOCAL16 hLog; HLOCAL16 hLog;
HLOCAL16 hMet; HLOCAL16 hMet;
@ -1307,7 +1308,7 @@ BOOL GetRasterizerCaps(LPRASTERIZER_STATUS lprs, UINT cbNumBytes)
/************************************************************************* /*************************************************************************
* GetKerningPairs [GDI.332] * GetKerningPairs [GDI.332]
*/ */
int GetKerningPairs(HDC hDC,int cPairs,LPKERNINGPAIR16 lpKerningPairs) int GetKerningPairs(HDC16 hDC,int cPairs,LPKERNINGPAIR16 lpKerningPairs)
{ {
/* This has to be dealt with when proper font handling is in place /* This has to be dealt with when proper font handling is in place
* *

View File

@ -357,7 +357,7 @@ INT32 GetObject32W( HANDLE32 handle, INT32 count, LPVOID buffer )
/*********************************************************************** /***********************************************************************
* SelectObject (GDI.45) * SelectObject (GDI.45)
*/ */
HGDIOBJ16 SelectObject( HDC hdc, HGDIOBJ16 handle ) HGDIOBJ16 SelectObject( HDC16 hdc, HGDIOBJ16 handle )
{ {
GDIOBJHDR * ptr = NULL; GDIOBJHDR * ptr = NULL;
DC * dc; DC * dc;
@ -423,7 +423,7 @@ BOOL UnrealizeObject( HGDIOBJ16 obj )
/*********************************************************************** /***********************************************************************
* EnumObjects (GDI.71) * EnumObjects (GDI.71)
*/ */
INT EnumObjects( HDC hdc, INT nObjType, GOBJENUMPROC16 lpEnumFunc, INT EnumObjects( HDC16 hdc, INT nObjType, GOBJENUMPROC16 lpEnumFunc,
LPARAM lParam ) LPARAM lParam )
{ {
/* Solid colors to enumerate */ /* Solid colors to enumerate */

View File

@ -184,7 +184,7 @@ BOOL IsValidMetaFile(HMETAFILE16 hmf)
* CloseMetafile GDI.126 * CloseMetafile GDI.126
*/ */
HMETAFILE16 CloseMetaFile(HDC hdc) HMETAFILE16 CloseMetaFile(HDC16 hdc)
{ {
DC *dc; DC *dc;
METAHEADER *mh; METAHEADER *mh;
@ -254,7 +254,7 @@ BOOL DeleteMetaFile(HMETAFILE16 hmf)
* PlayMetafile GDI.123 * PlayMetafile GDI.123
*/ */
BOOL PlayMetaFile(HDC hdc, HMETAFILE16 hmf) BOOL PlayMetaFile(HDC16 hdc, HMETAFILE16 hmf)
{ {
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf); METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
METARECORD *mr; METARECORD *mr;
@ -298,7 +298,7 @@ BOOL PlayMetaFile(HDC hdc, HMETAFILE16 hmf)
* Niels de carpentier, april 1996 * Niels de carpentier, april 1996
*/ */
BOOL EnumMetaFile(HDC hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,LPARAM lpData) BOOL EnumMetaFile(HDC16 hdc, HMETAFILE16 hmf, MFENUMPROC16 lpEnumFunc,LPARAM lpData)
{ {
METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf); METAHEADER *mh = (METAHEADER *)GlobalLock16(hmf);
METARECORD *mr; METARECORD *mr;
@ -383,8 +383,8 @@ static LPSTR MF_GetDIBitsPointer(LPBITMAPINFO info)
* PlayMetaFileRecord GDI.176 * PlayMetaFileRecord GDI.176
*/ */
void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr, void PlayMetaFileRecord(HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
WORD nHandles) WORD nHandles)
{ {
short s1; short s1;
HANDLE16 hndl; HANDLE16 hndl;
@ -698,7 +698,7 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr,
case META_STRETCHBLT: case META_STRETCHBLT:
{ {
HDC hdcSrc=CreateCompatibleDC(hdc); HDC16 hdcSrc=CreateCompatibleDC(hdc);
HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[10], /*Width */ HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[10], /*Width */
mr->rdParam[11], /*Height*/ mr->rdParam[11], /*Height*/
mr->rdParam[13], /*Planes*/ mr->rdParam[13], /*Planes*/
@ -716,7 +716,7 @@ void PlayMetaFileRecord(HDC hdc, HANDLETABLE16 *ht, METARECORD *mr,
case META_BITBLT: /* <-- not yet debugged */ case META_BITBLT: /* <-- not yet debugged */
{ {
HDC hdcSrc=CreateCompatibleDC(hdc); HDC16 hdcSrc=CreateCompatibleDC(hdc);
HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[7]/*Width */,mr->rdParam[8]/*Height*/, HBITMAP16 hbitmap=CreateBitmap(mr->rdParam[7]/*Width */,mr->rdParam[8]/*Height*/,
mr->rdParam[10]/*Planes*/,mr->rdParam[11]/*BitsPixel*/, mr->rdParam[10]/*Planes*/,mr->rdParam[11]/*BitsPixel*/,
(LPSTR)&mr->rdParam[12]/*bits*/); (LPSTR)&mr->rdParam[12]/*bits*/);

View File

@ -176,10 +176,8 @@ static char ** const OBM_Icons_Data[OIC_LAST-OIC_FIRST+1] =
#include "bitmaps/ocr_sizens" #include "bitmaps/ocr_sizens"
#include "bitmaps/ocr_bummer" #include "bitmaps/ocr_bummer"
#include "bitmaps/ocr_dragobject" #include "bitmaps/ocr_dragobject"
#if 0 /*#include "bitmaps/ocr_sizeall"*/
#include "bitmaps/ocr_sizeall" /*#include "bitmaps/ocr_icocur"*/
#include "bitmaps/ocr_icocur"
#endif
/* Cursor are not all contiguous (go figure...) */ /* Cursor are not all contiguous (go figure...) */
#define OCR_FIRST0 OCR_BUMMER #define OCR_FIRST0 OCR_BUMMER

View File

@ -141,7 +141,7 @@ BOOL AnimatePalette(HPALETTE16 hPal, UINT StartIndex, UINT NumEntries,
/*********************************************************************** /***********************************************************************
* SetSystemPaletteUse (GDI.373) * SetSystemPaletteUse (GDI.373)
*/ */
WORD SetSystemPaletteUse( HDC hdc, WORD use) WORD SetSystemPaletteUse( HDC16 hdc, WORD use)
{ {
WORD old=SystemPaletteUse; WORD old=SystemPaletteUse;
fprintf(stdnimp,"SetSystemPaletteUse(%04x,%04x) // empty stub !!!\n", hdc, use); fprintf(stdnimp,"SetSystemPaletteUse(%04x,%04x) // empty stub !!!\n", hdc, use);
@ -152,7 +152,7 @@ WORD SetSystemPaletteUse( HDC hdc, WORD use)
/*********************************************************************** /***********************************************************************
* GetSystemPaletteUse (GDI.374) * GetSystemPaletteUse (GDI.374)
*/ */
WORD GetSystemPaletteUse( HDC hdc ) WORD GetSystemPaletteUse( HDC16 hdc )
{ {
fprintf(stdnimp,"GetSystemPaletteUse(%04x) // empty stub !!!\n", hdc); fprintf(stdnimp,"GetSystemPaletteUse(%04x) // empty stub !!!\n", hdc);
return SystemPaletteUse; return SystemPaletteUse;
@ -162,7 +162,7 @@ WORD GetSystemPaletteUse( HDC hdc )
/*********************************************************************** /***********************************************************************
* GetSystemPaletteEntries (GDI.375) * GetSystemPaletteEntries (GDI.375)
*/ */
WORD GetSystemPaletteEntries( HDC hdc, WORD start, WORD count, WORD GetSystemPaletteEntries( HDC16 hdc, WORD start, WORD count,
LPPALETTEENTRY entries ) LPPALETTEENTRY entries )
{ {
WORD i; WORD i;
@ -207,7 +207,7 @@ WORD GetNearestPaletteIndex( HPALETTE16 hpalette, COLORREF color )
/*********************************************************************** /***********************************************************************
* GetNearestColor (GDI.154) * GetNearestColor (GDI.154)
*/ */
COLORREF GetNearestColor( HDC hdc, COLORREF color ) COLORREF GetNearestColor( HDC16 hdc, COLORREF color )
{ {
COLORREF nearest = 0xFADECAFE; COLORREF nearest = 0xFADECAFE;
DC *dc; DC *dc;
@ -268,7 +268,7 @@ BOOL32 PALETTE_DeleteObject( HPALETTE16 hpalette, PALETTEOBJ *palette )
/*********************************************************************** /***********************************************************************
* GDISelectPalette (GDI.361) * GDISelectPalette (GDI.361)
*/ */
HPALETTE16 GDISelectPalette( HDC hdc, HPALETTE16 hpal, WORD wBkg) HPALETTE16 GDISelectPalette( HDC16 hdc, HPALETTE16 hpal, WORD wBkg)
{ {
HPALETTE16 prev; HPALETTE16 prev;
DC *dc; DC *dc;
@ -292,7 +292,7 @@ HPALETTE16 GDISelectPalette( HDC hdc, HPALETTE16 hpal, WORD wBkg)
* GDIRealizePalette (GDI.362) * GDIRealizePalette (GDI.362)
* *
*/ */
UINT GDIRealizePalette( HDC hdc ) UINT GDIRealizePalette( HDC16 hdc )
{ {
PALETTEOBJ* palPtr; PALETTEOBJ* palPtr;
int realized = 0; int realized = 0;
@ -326,7 +326,7 @@ UINT GDIRealizePalette( HDC hdc )
/*********************************************************************** /***********************************************************************
* RealizeDefaultPalette (GDI.365) * RealizeDefaultPalette (GDI.365)
*/ */
WORD RealizeDefaultPalette( HDC hdc ) WORD RealizeDefaultPalette( HDC16 hdc )
{ {
DC *dc; DC *dc;
PALETTEOBJ* palPtr; PALETTEOBJ* palPtr;
@ -364,7 +364,7 @@ WORD RealizeDefaultPalette( HDC hdc )
/*********************************************************************** /***********************************************************************
* IsDCCurrentPalette (GDI.412) * IsDCCurrentPalette (GDI.412)
*/ */
BOOL IsDCCurrentPalette(HDC hDC) BOOL IsDCCurrentPalette(HDC16 hDC)
{ {
DC* dc = (DC *)GDI_GetObjPtr( hDC, DC_MAGIC ); DC* dc = (DC *)GDI_GetObjPtr( hDC, DC_MAGIC );
return (dc)?(dc->w.hPalette == hPrimaryPalette):FALSE; return (dc)?(dc->w.hPalette == hPrimaryPalette):FALSE;
@ -373,7 +373,7 @@ BOOL IsDCCurrentPalette(HDC hDC)
/*********************************************************************** /***********************************************************************
* SelectPalette (USER.282) * SelectPalette (USER.282)
*/ */
HPALETTE16 SelectPalette( HDC hDC, HPALETTE16 hPal, BOOL bForceBackground ) HPALETTE16 SelectPalette( HDC16 hDC, HPALETTE16 hPal, BOOL bForceBackground )
{ {
WORD wBkgPalette = 1; WORD wBkgPalette = 1;
PALETTEOBJ* lpt = (PALETTEOBJ*) GDI_GetObjPtr( hPal, PALETTE_MAGIC ); PALETTEOBJ* lpt = (PALETTEOBJ*) GDI_GetObjPtr( hPal, PALETTE_MAGIC );
@ -426,7 +426,7 @@ UINT16 RealizePalette( HDC32 hDC )
* UpdateColors (GDI.366) * UpdateColors (GDI.366)
* *
*/ */
int UpdateColors( HDC hDC ) int UpdateColors( HDC16 hDC )
{ {
HWND32 hWnd = WindowFromDC32( hDC ); HWND32 hWnd = WindowFromDC32( hDC );

View File

@ -34,7 +34,7 @@ static int prefix_offset;
extern int CLIPPING_IntersectClipRect( DC * dc, short left, short top, extern int CLIPPING_IntersectClipRect( DC * dc, short left, short top,
short right, short bottom, UINT16 flags); short right, short bottom, UINT16 flags);
static const char *TEXT_NextLine( HDC hdc, const char *str, int *count, static const char *TEXT_NextLine( HDC16 hdc, const char *str, int *count,
char *dest, int *len, int width, WORD format) char *dest, int *len, int width, WORD format)
{ {
/* Return next line of text from a string. /* Return next line of text from a string.
@ -638,7 +638,7 @@ BOOL32 TextOut32W( HDC32 hdc, INT32 x, INT32 y, LPCWSTR str, INT32 count )
/*********************************************************************** /***********************************************************************
* GrayString (USER.185) * GrayString (USER.185)
*/ */
BOOL GrayString(HDC hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam, BOOL GrayString(HDC16 hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam,
INT cch, INT x, INT y, INT cx, INT cy) INT cch, INT x, INT y, INT cx, INT cy)
{ {
BOOL ret; BOOL ret;
@ -661,7 +661,7 @@ BOOL GrayString(HDC hdc, HBRUSH16 hbr, GRAYSTRINGPROC16 gsprc, LPARAM lParam,
* Note: this doesn't work too well for text-alignment modes other * Note: this doesn't work too well for text-alignment modes other
* than TA_LEFT|TA_TOP. But we want bug-for-bug compatibility :-) * than TA_LEFT|TA_TOP. But we want bug-for-bug compatibility :-)
*/ */
LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count, LONG TEXT_TabbedTextOut( HDC16 hdc, int x, int y, LPSTR lpstr, int count,
int cTabStops, LPINT16 lpTabPos, int nTabOrg, int cTabStops, LPINT16 lpTabPos, int nTabOrg,
BOOL fDisplayText) BOOL fDisplayText)
{ {
@ -717,7 +717,7 @@ LONG TEXT_TabbedTextOut( HDC hdc, int x, int y, LPSTR lpstr, int count,
/*********************************************************************** /***********************************************************************
* TabbedTextOut (USER.196) * TabbedTextOut (USER.196)
*/ */
LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count, LONG TabbedTextOut( HDC16 hdc, short x, short y, LPSTR lpstr, short count,
short cTabStops, LPINT16 lpTabPos, short nTabOrg ) short cTabStops, LPINT16 lpTabPos, short nTabOrg )
{ {
dprintf_text( stddeb, "TabbedTextOut: %04x %d,%d '%*.*s' %d\n", dprintf_text( stddeb, "TabbedTextOut: %04x %d,%d '%*.*s' %d\n",
@ -730,7 +730,7 @@ LONG TabbedTextOut( HDC hdc, short x, short y, LPSTR lpstr, short count,
/*********************************************************************** /***********************************************************************
* GetTabbedTextExtent (USER.197) * GetTabbedTextExtent (USER.197)
*/ */
DWORD GetTabbedTextExtent( HDC hdc, LPSTR lpstr, int count, DWORD GetTabbedTextExtent( HDC16 hdc, LPSTR lpstr, int count,
int cTabStops, LPINT16 lpTabPos ) int cTabStops, LPINT16 lpTabPos )
{ {
dprintf_text( stddeb, "GetTabbedTextExtent: %04x '%*.*s' %d\n", dprintf_text( stddeb, "GetTabbedTextExtent: %04x '%*.*s' %d\n",

View File

@ -6,12 +6,12 @@ $(SUBDIRS): dummy
@cd $@; $(MAKE) @cd $@; $(MAKE)
depend: depend:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend); done for i in $(SUBDIRS); do (cd $$i; $(MAKE) depend) || exit 1; done
install: install:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) install); done for i in $(SUBDIRS); do (cd $$i; $(MAKE) install) || exit 1; done
clean: clean:
for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean); done for i in $(SUBDIRS); do (cd $$i; $(MAKE) clean) || exit 1; done
dummy: dummy:

View File

@ -55,9 +55,6 @@ progman: $(MOSTOBJS) $(STRINGOBJS)
install: dummy install: dummy
$(INSTALL_PROGRAM) progman $(bindir)/progman $(INSTALL_PROGRAM) progman $(bindir)/progman
clean::
$(RM) accel.c accel.h $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h) progman
accel.c accel.h: $(WINERC) Xx.rc accel.c accel.h: $(WINERC) Xx.rc
$(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h): $(WINERC) Xx.rc $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h): $(WINERC) Xx.rc

View File

@ -55,10 +55,6 @@ install: dummy
$(INSTALL_PROGRAM) winhelp $(bindir)/winhelp $(INSTALL_PROGRAM) winhelp $(bindir)/winhelp
$(INSTALL_PROGRAM) hlp2sgml $(bindir)/hlp2sgml $(INSTALL_PROGRAM) hlp2sgml $(bindir)/hlp2sgml
clean::
$(RM) $(PROGRAMS) lex.yy.c y.tab.c y.tab.h
$(RM) $(LANGUAGES:%=%.c) $(LANGUAGES:%=%.h)
y.tab.c y.tab.h: macro.yacc.y y.tab.c y.tab.h: macro.yacc.y
$(YACC) -d -t $(SRCDIR)/macro.yacc.y $(YACC) -d -t $(SRCDIR)/macro.yacc.y

View File

@ -3,17 +3,17 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .. TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
PROGRAM = winerc PROGRAMS = winerc
MODULE = none MODULE = none
C_SRCS = winerc.c C_SRCS = winerc.c
GEN_C_SRCS = y.tab.c lex.yy.c GEN_C_SRCS = y.tab.c lex.yy.c
all: $(PROGRAM) all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
$(PROGRAM): $(OBJS) $(PROGRAMS): $(OBJS)
$(CC) $(CFLAGS) -o winerc $(OBJS) $(LEXLIB) $(CC) $(CFLAGS) -o winerc $(OBJS) $(LEXLIB)
y.tab.c y.tab.h: parser.y y.tab.c y.tab.h: parser.y
@ -22,7 +22,4 @@ y.tab.c y.tab.h: parser.y
lex.yy.c: parser.l lex.yy.c: parser.l
$(LEX) -8 -I $(SRCDIR)/parser.l $(LEX) -8 -I $(SRCDIR)/parser.l
clean::
$(RM) y.tab.h $(PROGRAM)
### Dependencies: ### Dependencies:

View File

@ -12,8 +12,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <windows.h> #include "windows.h"
/* #include <neexe.h> */
#include "parser.h" #include "parser.h"
#include "y.tab.h" #include "y.tab.h"

View File

@ -5,9 +5,18 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = resources MODULE = resources
LANGUAGES = En Es De No Fr Fi Da Cz Eo It Ko SYSRES_SRCS = \
sysres_Cz.c \
SYSRES_SRCS = $(LANGUAGES:%=sysres_%.c) sysres_Da.c \
sysres_De.c \
sysres_En.c \
sysres_Eo.c \
sysres_Es.c \
sysres_Fi.c \
sysres_Fr.c \
sysres_It.c \
sysres_Ko.c \
sysres_No.c
C_SRCS = sysres.c C_SRCS = sysres.c
GEN_C_SRCS = $(SYSRES_SRCS) GEN_C_SRCS = $(SYSRES_SRCS)
@ -18,7 +27,4 @@ all: check_winerc $(MODULE).o
$(SYSRES_SRCS): $(WINERC) $(SYSRES_SRCS): $(WINERC)
clean::
$(RM) $(SYSRES_SRCS:.c=.h)
### Dependencies: ### Dependencies:

View File

@ -4,19 +4,19 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
PROGRAM = build PROGRAMS = build makedep
MODULE = none MODULE = none
C_SRCS = build.c C_SRCS = build.c makedep.c
all: $(PROGRAM) all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
$(PROGRAM): $(OBJS) build: build.o
$(CC) $(CFLAGS) -o build $(OBJS) $(CC) $(CFLAGS) -o build build.o
clean:: makedep: makedep.o
$(RM) $(PROGRAM) $(CC) $(CFLAGS) -o makedep makedep.o
### Dependencies: ### Dependencies:

View File

@ -14,8 +14,8 @@ mv $DEBUG_H $DEBUG_H.old
mv $STDDEBUG_H $STDDEBUG_H.old mv $STDDEBUG_H $STDDEBUG_H.old
# Build the list of debug identifiers # Build the list of debug identifiers
grep -h dprintf_ */*.c | sed 's/.*dprintf_\([A-Za-z0-9_]*\).*/\1/g' | \ grep -h dprintf_ `find . -name '*.c' -print` | \
sort | uniq > temp.$$ sed 's/.*dprintf_\([A-Za-z0-9_]*\).*/\1/g' | sort | uniq > temp.$$
# Build debug.h # Build debug.h

351
tools/makedep.c Normal file
View File

@ -0,0 +1,351 @@
/*
* Generate include file dependencies
*
* Copyright 1996 Alexandre Julliard
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* Max first-level includes per file */
#define MAX_INCLUDES 124
typedef struct _INCL_FILE
{
struct _INCL_FILE *next;
char *name;
char *filename;
struct _INCL_FILE *owner;
struct _INCL_FILE *files[MAX_INCLUDES];
} INCL_FILE;
static INCL_FILE *firstSrc;
static INCL_FILE *firstInclude;
typedef struct _INCL_PATH
{
struct _INCL_PATH *next;
const char *name;
} INCL_PATH;
static INCL_PATH *firstPath;
static const char *SrcDir = NULL;
static const char *OutputFileName = "Makefile";
static const char *Separator = "### Dependencies";
static const char *ProgramName;
static const char Usage[] =
"Usage: %s [options] [files]\n"
"Options:\n"
" -Idir Search for include files in directory 'dir'\n"
" -Cdir Search for source files in directory 'dir'\n"
" -fxxx Store output in file 'xxx' (default: Makefile)\n"
" -sxxx Use 'xxx' as separator (default: \"### Dependencies\")\n";
/*******************************************************************
* xmalloc
*/
static void *xmalloc( int size )
{
void *res;
if (!(res = malloc (size ? size : 1)))
{
fprintf( stderr, "%s: Virtual memory exhausted.\n", ProgramName );
exit(1);
}
return res;
}
/*******************************************************************
* xstrdup
*/
static char *xstrdup( const char *str )
{
char *res = strdup( str );
if (!res)
{
fprintf( stderr, "%s: Virtual memory exhausted.\n", ProgramName );
exit(1);
}
return res;
}
/*******************************************************************
* add_include_path
*
* Add a directory to the include path.
*/
static void add_include_path( const char *name )
{
INCL_PATH *path = xmalloc( sizeof(*path) );
INCL_PATH **p = &firstPath;
while (*p) p = &(*p)->next;
*p = path;
path->next = NULL;
path->name = name;
}
/*******************************************************************
* add_src_file
*
* Add a source file to the list.
*/
static INCL_FILE *add_src_file( const char *name )
{
INCL_FILE **p = &firstSrc;
INCL_FILE *file = xmalloc( sizeof(*file) );
memset( file, 0, sizeof(*file) );
file->name = xstrdup(name);
while (*p) p = &(*p)->next;
*p = file;
return file;
}
/*******************************************************************
* add_include
*
* Add an include file if it doesn't already exists.
*/
static INCL_FILE *add_include( INCL_FILE *pFile, const char *name )
{
INCL_FILE **p = &firstInclude;
int pos;
for (pos = 0; pos < MAX_INCLUDES; pos++) if (!pFile->files[pos]) break;
if (pos >= MAX_INCLUDES)
{
fprintf( stderr, "%s: %s: too many included files, please fix MAX_INCLUDES\n",
ProgramName, pFile->name );
exit(1);
}
while (*p && strcmp( name, (*p)->name )) p = &(*p)->next;
if (!*p)
{
*p = xmalloc( sizeof(INCL_FILE) );
memset( *p, 0, sizeof(INCL_FILE) );
(*p)->name = xstrdup(name);
}
pFile->files[pos] = *p;
return *p;
}
/*******************************************************************
* open_src_file
*/
static FILE *open_src_file( INCL_FILE *pFile )
{
FILE *file;
if (SrcDir)
{
pFile->filename = xmalloc( strlen(SrcDir) + strlen(pFile->name) + 2 );
strcpy( pFile->filename, SrcDir );
strcat( pFile->filename, "/" );
strcat( pFile->filename, pFile->name );
}
else pFile->filename = xstrdup( pFile->name );
if (!(file = fopen( pFile->filename, "r" )))
{
perror( pFile->filename );
exit(1);
}
return file;
}
/*******************************************************************
* open_include_file
*/
static FILE *open_include_file( INCL_FILE *pFile )
{
FILE *file = NULL;
INCL_PATH *path;
for (path = firstPath; path; path = path->next)
{
char *filename = xmalloc(strlen(path->name) + strlen(pFile->name) + 2);
strcpy( filename, path->name );
strcat( filename, "/" );
strcat( filename, pFile->name );
if ((file = fopen( filename, "r" )))
{
pFile->filename = filename;
break;
}
free( filename );
}
if (!file)
{
if (firstPath) perror( pFile->name );
else fprintf( stderr, "%s: %s: File not found\n",
ProgramName, pFile->name );
exit(1);
}
return file;
}
/*******************************************************************
* parse_file
*/
static void parse_file( INCL_FILE *pFile, int src )
{
char buffer[1024];
char *include;
int line = 0;
FILE *file = src ? open_src_file( pFile ) : open_include_file( pFile );
while (fgets( buffer, sizeof(buffer)-1, file ))
{
char *p = buffer;
line++;
while (*p && isspace(*p)) p++;
if (*p++ != '#') continue;
while (*p && isspace(*p)) p++;
if (strncmp( p, "include", 7 )) continue;
p += 7;
while (*p && isspace(*p)) p++;
if (*p++ != '\"') continue;
include = p;
while (*p && (*p != '\"')) p++;
if (!*p)
{
fprintf( stderr, "%s:%d: Malformed #include directive\n",
pFile->filename, line );
exit(1);
}
*p = 0;
add_include( pFile, include );
}
}
/*******************************************************************
* output_include
*/
static void output_include( FILE *file, INCL_FILE *pFile,
INCL_FILE *owner, int *column )
{
int i;
if (pFile->owner == owner) return;
pFile->owner = owner;
if (*column + strlen(pFile->filename) + 1 > 70)
{
fprintf( file, " \\\n" );
*column = 0;
}
fprintf( file, " %s", pFile->filename );
*column += strlen(pFile->filename) + 1;
for (i = 0; i < MAX_INCLUDES; i++)
if (pFile->files[i]) output_include( file, pFile->files[i],
owner, column );
}
/*******************************************************************
* output_dependencies
*/
static void output_dependencies(void)
{
INCL_FILE *pFile;
int i, column;
FILE *file = NULL;
char buffer[1024];
if (Separator && ((file = fopen( OutputFileName, "r+" ))))
{
while (fgets( buffer, sizeof(buffer), file ))
if (!strncmp( buffer, Separator, strlen(Separator) )) break;
ftruncate( fileno(file), ftell(file) );
}
if (!file)
{
if (!(file = fopen( OutputFileName, "a" )))
{
perror( OutputFileName );
exit(1);
}
}
for( pFile = firstSrc; pFile; pFile = pFile->next)
{
char *name = strrchr( pFile->name, '/' );
char *obj = xstrdup( name ? name + 1 : pFile->name );
char *ext = strrchr( obj, '.' );
if (ext) strcpy( ext, ".o" );
fprintf( file, "%s: %s", obj, pFile->filename );
column = strlen(obj) + strlen(pFile->filename) + 2;
free( obj );
for (i = 0; i < MAX_INCLUDES; i++)
if (pFile->files[i]) output_include( file, pFile->files[i],
pFile, &column );
fprintf( file, "\n" );
}
}
/*******************************************************************
* parse_option
*/
static void parse_option( const char *opt )
{
switch(opt[1])
{
case 'I':
if (opt[2]) add_include_path( opt + 2 );
break;
case 'C':
if (opt[2]) SrcDir = opt + 2;
else SrcDir = NULL;
break;
case 'f':
if (opt[2]) OutputFileName = opt + 2;
break;
case 's':
if (opt[2]) Separator = opt + 2;
else Separator = NULL;
break;
default:
fprintf( stderr, "Unknown option '%s'\n", opt );
fprintf( stderr, Usage, ProgramName );
exit(1);
}
}
/*******************************************************************
* main
*/
int main( int argc, char *argv[] )
{
INCL_FILE *pFile;
ProgramName = argv[0];
while (argc > 1)
{
if (*argv[1] == '-') parse_option( argv[1] );
else
{
pFile = add_src_file( argv[1] );
parse_file( pFile, 1 );
}
argc--;
argv++;
}
for (pFile = firstInclude; pFile; pFile = pFile->next)
parse_file( pFile, 0 );
output_dependencies();
return 0;
}

View File

@ -28,7 +28,7 @@
#define NB_DCE 5 /* Number of DCEs created at startup */ #define NB_DCE 5 /* Number of DCEs created at startup */
static DCE *firstDCE = 0; static DCE *firstDCE = 0;
static HDC defaultDCstate = 0; static HDC32 defaultDCstate = 0;
/*********************************************************************** /***********************************************************************
* DCE_AllocDCE * DCE_AllocDCE
@ -396,7 +396,7 @@ HDC16 GetDCEx16( HWND16 hwnd, HRGN16 hrgnClip, DWORD flags )
HDC32 GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags ) HDC32 GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags )
{ {
HRGN32 hrgnVisible; HRGN32 hrgnVisible;
HDC hdc = 0; HDC32 hdc = 0;
DCE * dce; DCE * dce;
DC * dc; DC * dc;
WND * wndPtr; WND * wndPtr;

View File

@ -122,7 +122,7 @@ static LRESULT DEFDLG_Proc( HWND32 hwnd, UINT32 msg, WPARAM32 wParam,
return 0; return 0;
case WM_ERASEBKGND: case WM_ERASEBKGND:
FillWindow( hwnd, hwnd, (HDC)wParam, (HBRUSH16)CTLCOLOR_DLG ); FillWindow( hwnd, hwnd, (HDC16)wParam, (HBRUSH16)CTLCOLOR_DLG );
return 1; return 1;
case WM_NCDESTROY: case WM_NCDESTROY:

View File

@ -105,7 +105,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
case WM_PAINT: case WM_PAINT:
{ {
PAINTSTRUCT16 ps; PAINTSTRUCT16 ps;
HDC hdc = BeginPaint16( wndPtr->hwndSelf, &ps ); HDC16 hdc = BeginPaint16( wndPtr->hwndSelf, &ps );
if( hdc ) if( hdc )
{ {
if( (wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon ) if( (wndPtr->dwStyle & WS_MINIMIZE) && wndPtr->class->hIcon )
@ -162,7 +162,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
if( wndPtr->flags & WIN_NCACTIVATED ) if( wndPtr->flags & WIN_NCACTIVATED )
{ {
FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, sysColorObjects.hbrushActiveCaption ); (HDC16)wParam, sysColorObjects.hbrushActiveCaption );
return 1; return 1;
} }
@ -175,11 +175,11 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
HBRUSH16 hbrush = CreateSolidBrush( HBRUSH16 hbrush = CreateSolidBrush(
GetSysColor(((DWORD)wndPtr->class->hbrBackground)-1)); GetSysColor(((DWORD)wndPtr->class->hbrBackground)-1));
FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, hbrush); (HDC16)wParam, hbrush);
DeleteObject (hbrush); DeleteObject (hbrush);
} }
else FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf, else FillWindow( GetParent16(wndPtr->hwndSelf), wndPtr->hwndSelf,
(HDC)wParam, wndPtr->class->hbrBackground ); (HDC16)wParam, wndPtr->class->hbrBackground );
return 1; return 1;
} }
@ -192,13 +192,13 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
case WM_CTLCOLORBTN: case WM_CTLCOLORBTN:
case WM_CTLCOLORDLG: case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC: case WM_CTLCOLORSTATIC:
SetBkColor( (HDC)wParam, GetSysColor(COLOR_WINDOW) ); SetBkColor( (HDC32)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC)wParam, GetSysColor(COLOR_WINDOWTEXT) ); SetTextColor( (HDC32)wParam, GetSysColor(COLOR_WINDOWTEXT) );
return (LRESULT)sysColorObjects.hbrushWindow; return (LRESULT)sysColorObjects.hbrushWindow;
case WM_CTLCOLORSCROLLBAR: case WM_CTLCOLORSCROLLBAR:
SetBkColor( (HDC)wParam, RGB(255, 255, 255) ); SetBkColor( (HDC32)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC)wParam, RGB(0, 0, 0) ); SetTextColor( (HDC32)wParam, RGB(0, 0, 0) );
UnrealizeObject( sysColorObjects.hbrushScrollbar ); UnrealizeObject( sysColorObjects.hbrushScrollbar );
return (LRESULT)sysColorObjects.hbrushScrollbar; return (LRESULT)sysColorObjects.hbrushScrollbar;
@ -206,15 +206,15 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
{ {
if (HIWORD(lParam) == CTLCOLOR_SCROLLBAR) if (HIWORD(lParam) == CTLCOLOR_SCROLLBAR)
{ {
SetBkColor( (HDC)wParam, RGB(255, 255, 255) ); SetBkColor( (HDC32)wParam, RGB(255, 255, 255) );
SetTextColor( (HDC)wParam, RGB(0, 0, 0) ); SetTextColor( (HDC32)wParam, RGB(0, 0, 0) );
UnrealizeObject( sysColorObjects.hbrushScrollbar ); UnrealizeObject( sysColorObjects.hbrushScrollbar );
return (LRESULT)sysColorObjects.hbrushScrollbar; return (LRESULT)sysColorObjects.hbrushScrollbar;
} }
else else
{ {
SetBkColor( (HDC)wParam, GetSysColor(COLOR_WINDOW) ); SetBkColor( (HDC32)wParam, GetSysColor(COLOR_WINDOW) );
SetTextColor( (HDC)wParam, GetSysColor(COLOR_WINDOWTEXT) ); SetTextColor( (HDC32)wParam, GetSysColor(COLOR_WINDOWTEXT) );
return (LRESULT)sysColorObjects.hbrushWindow; return (LRESULT)sysColorObjects.hbrushWindow;
} }
} }
@ -255,7 +255,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
else else
if( wParam == VK_ESCAPE && GetKeyState(VK_SHIFT) < 0 ) if( wParam == VK_ESCAPE && GetKeyState(VK_SHIFT) < 0 )
SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND, SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)VK_SPACE); (WPARAM16)SC_KEYMENU, (LPARAM)VK_SPACE);
break; break;
case WM_KEYUP: case WM_KEYUP:
@ -273,7 +273,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
if (wParam == VK_RETURN && (wndPtr->dwStyle & WS_MINIMIZE)) if (wParam == VK_RETURN && (wndPtr->dwStyle & WS_MINIMIZE))
{ {
PostMessage( wndPtr->hwndSelf, WM_SYSCOMMAND, PostMessage( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_RESTORE, 0L ); (WPARAM16)SC_RESTORE, 0L );
break; break;
} }
if ((HIWORD(lParam) & KEYDATA_ALT) && wParam) if ((HIWORD(lParam) & KEYDATA_ALT) && wParam)
@ -283,7 +283,7 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT32 msg, WPARAM32 wParam,
SendMessage16( wndPtr->parent->hwndSelf, msg, wParam, lParam ); SendMessage16( wndPtr->parent->hwndSelf, msg, wParam, lParam );
else else
SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND, SendMessage16( wndPtr->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)(DWORD)wParam ); (WPARAM16)SC_KEYMENU, (LPARAM)(DWORD)wParam );
} }
else /* check for Ctrl-Esc */ else /* check for Ctrl-Esc */
if (wParam != VK_ESCAPE) MessageBeep(0); if (wParam != VK_ESCAPE) MessageBeep(0);

View File

@ -64,7 +64,7 @@ static WORD xBaseUnit = 0, yBaseUnit = 0;
BOOL32 DIALOG_Init() BOOL32 DIALOG_Init()
{ {
TEXTMETRIC16 tm; TEXTMETRIC16 tm;
HDC hdc; HDC16 hdc;
/* Calculate the dialog base units */ /* Calculate the dialog base units */
@ -281,7 +281,7 @@ static BOOL32 DIALOG_CreateControls( WND *pWnd, LPCSTR template, INT32 items,
/* Send initialisation messages to the control */ /* Send initialisation messages to the control */
if (dlgInfo->hUserFont) SendMessage32A( hwndCtrl, WM_SETFONT, if (dlgInfo->hUserFont) SendMessage32A( hwndCtrl, WM_SETFONT,
(WPARAM)dlgInfo->hUserFont, 0 ); (WPARAM32)dlgInfo->hUserFont, 0 );
if (SendMessage32A(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON) if (SendMessage32A(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON)
{ {
/* If there's already a default push-button, set it back */ /* If there's already a default push-button, set it back */
@ -582,8 +582,9 @@ static HWND DIALOG_CreateIndirect( HINSTANCE32 hInst, LPCSTR dlgTemplate,
dlgInfo->hwndFocus = GetNextDlgTabItem32( hwnd, 0, FALSE ); dlgInfo->hwndFocus = GetNextDlgTabItem32( hwnd, 0, FALSE );
if (dlgInfo->hUserFont) if (dlgInfo->hUserFont)
SendMessage32A( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 ); SendMessage32A( hwnd, WM_SETFONT, (WPARAM32)dlgInfo->hUserFont, 0 );
if (SendMessage32A(hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param)) if (SendMessage32A( hwnd, WM_INITDIALOG,
(WPARAM32)dlgInfo->hwndFocus, param ))
SetFocus32( dlgInfo->hwndFocus ); SetFocus32( dlgInfo->hwndFocus );
if (template.style & WS_VISIBLE) ShowWindow( hwnd, SW_SHOW ); if (template.style & WS_VISIBLE) ShowWindow( hwnd, SW_SHOW );
return hwnd; return hwnd;

View File

@ -50,8 +50,8 @@ BYTE KeyStateTable[256];
BYTE AsyncKeyStateTable[256]; BYTE AsyncKeyStateTable[256];
WPARAM lastEventChar = 0; /* this will have to be changed once WPARAM16 lastEventChar = 0; /* this will have to be changed once
* ToAscii starts working */ * ToAscii starts working */
static HWND32 captureWnd = 0; static HWND32 captureWnd = 0;
static BOOL32 InputEnabled = TRUE; static BOOL32 InputEnabled = TRUE;

View File

@ -28,7 +28,7 @@
/*********************************************************************** /***********************************************************************
* LineTo (GDI.19) * LineTo (GDI.19)
*/ */
BOOL LineTo( HDC hdc, short x, short y ) BOOL LineTo( HDC16 hdc, short x, short y )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) if (!dc)
@ -54,7 +54,7 @@ BOOL LineTo( HDC hdc, short x, short y )
/*********************************************************************** /***********************************************************************
* MoveTo (GDI.20) * MoveTo (GDI.20)
*/ */
DWORD MoveTo( HDC hdc, short x, short y ) DWORD MoveTo( HDC16 hdc, short x, short y )
{ {
short oldx, oldy; short oldx, oldy;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -110,7 +110,7 @@ BOOL32 MoveToEx32( HDC32 hdc, INT32 x, INT32 y, LPPOINT32 pt )
* Helper functions for Arc(), Chord() and Pie(). * Helper functions for Arc(), Chord() and Pie().
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie. * 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
*/ */
static BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom, static BOOL GRAPH_DrawArc( HDC16 hdc, int left, int top, int right, int bottom,
int xstart, int ystart, int xend, int yend, int lines ) int xstart, int ystart, int xend, int yend, int lines )
{ {
int xcenter, ycenter, istart_angle, idiff_angle, tmp; int xcenter, ycenter, istart_angle, idiff_angle, tmp;
@ -200,7 +200,7 @@ static BOOL GRAPH_DrawArc( HDC hdc, int left, int top, int right, int bottom,
/*********************************************************************** /***********************************************************************
* Arc (GDI.23) * Arc (GDI.23)
*/ */
BOOL Arc( HDC hdc, INT left, INT top, INT right, INT bottom, BOOL Arc( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) INT xstart, INT ystart, INT xend, INT yend )
{ {
return GRAPH_DrawArc( hdc, left, top, right, bottom, return GRAPH_DrawArc( hdc, left, top, right, bottom,
@ -211,7 +211,7 @@ BOOL Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
/*********************************************************************** /***********************************************************************
* Pie (GDI.26) * Pie (GDI.26)
*/ */
BOOL Pie( HDC hdc, INT left, INT top, INT right, INT bottom, BOOL Pie( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) INT xstart, INT ystart, INT xend, INT yend )
{ {
return GRAPH_DrawArc( hdc, left, top, right, bottom, return GRAPH_DrawArc( hdc, left, top, right, bottom,
@ -222,7 +222,7 @@ BOOL Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
/*********************************************************************** /***********************************************************************
* Chord (GDI.348) * Chord (GDI.348)
*/ */
BOOL Chord( HDC hdc, INT left, INT top, INT right, INT bottom, BOOL Chord( HDC16 hdc, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) INT xstart, INT ystart, INT xend, INT yend )
{ {
return GRAPH_DrawArc( hdc, left, top, right, bottom, return GRAPH_DrawArc( hdc, left, top, right, bottom,
@ -233,7 +233,7 @@ BOOL Chord( HDC hdc, INT left, INT top, INT right, INT bottom,
/*********************************************************************** /***********************************************************************
* Ellipse (GDI.24) * Ellipse (GDI.24)
*/ */
BOOL Ellipse( HDC hdc, INT left, INT top, INT right, INT bottom ) BOOL Ellipse( HDC16 hdc, INT left, INT top, INT right, INT bottom )
{ {
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
if (!dc) if (!dc)
@ -278,7 +278,7 @@ BOOL Ellipse( HDC hdc, INT left, INT top, INT right, INT bottom )
/*********************************************************************** /***********************************************************************
* Rectangle (GDI.27) * Rectangle (GDI.27)
*/ */
BOOL Rectangle( HDC hdc, INT left, INT top, INT right, INT bottom ) BOOL Rectangle( HDC16 hdc, INT left, INT top, INT right, INT bottom )
{ {
INT32 width; INT32 width;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );
@ -336,7 +336,7 @@ BOOL Rectangle( HDC hdc, INT left, INT top, INT right, INT bottom )
/*********************************************************************** /***********************************************************************
* RoundRect (GDI.28) * RoundRect (GDI.28)
*/ */
BOOL RoundRect( HDC hDC, INT left, INT top, INT right, INT bottom, BOOL RoundRect( HDC16 hDC, INT left, INT top, INT right, INT bottom,
INT ell_width, INT ell_height ) INT ell_width, INT ell_height )
{ {
DC * dc = (DC *) GDI_GetObjPtr(hDC, DC_MAGIC); DC * dc = (DC *) GDI_GetObjPtr(hDC, DC_MAGIC);
@ -554,7 +554,7 @@ INT32 FrameRect32( HDC32 hdc, const RECT32 *rect, HBRUSH32 hbrush )
/*********************************************************************** /***********************************************************************
* SetPixel (GDI.31) * SetPixel (GDI.31)
*/ */
COLORREF SetPixel( HDC hdc, short x, short y, COLORREF color ) COLORREF SetPixel( HDC16 hdc, short x, short y, COLORREF color )
{ {
Pixel pixel; Pixel pixel;
@ -584,7 +584,7 @@ COLORREF SetPixel( HDC hdc, short x, short y, COLORREF color )
/*********************************************************************** /***********************************************************************
* GetPixel (GDI.83) * GetPixel (GDI.83)
*/ */
COLORREF GetPixel( HDC hdc, short x, short y ) COLORREF GetPixel( HDC16 hdc, short x, short y )
{ {
static Pixmap pixmap = 0; static Pixmap pixmap = 0;
XImage * image; XImage * image;
@ -626,7 +626,7 @@ COLORREF GetPixel( HDC hdc, short x, short y )
/*********************************************************************** /***********************************************************************
* PaintRgn (GDI.43) * PaintRgn (GDI.43)
*/ */
BOOL PaintRgn( HDC hdc, HRGN32 hrgn ) BOOL PaintRgn( HDC16 hdc, HRGN32 hrgn )
{ {
RECT16 box; RECT16 box;
HRGN32 tmpVisRgn, prevVisRgn; HRGN32 tmpVisRgn, prevVisRgn;
@ -663,7 +663,7 @@ BOOL PaintRgn( HDC hdc, HRGN32 hrgn )
/*********************************************************************** /***********************************************************************
* FillRgn (GDI.40) * FillRgn (GDI.40)
*/ */
BOOL FillRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush ) BOOL FillRgn( HDC16 hdc, HRGN32 hrgn, HBRUSH16 hbrush )
{ {
BOOL retval; BOOL retval;
HBRUSH16 prevBrush = SelectObject( hdc, hbrush ); HBRUSH16 prevBrush = SelectObject( hdc, hbrush );
@ -676,7 +676,7 @@ BOOL FillRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush )
/*********************************************************************** /***********************************************************************
* FrameRgn (GDI.41) * FrameRgn (GDI.41)
*/ */
BOOL FrameRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight ) BOOL FrameRgn( HDC16 hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight )
{ {
HRGN32 tmp = CreateRectRgn( 0, 0, 0, 0 ); HRGN32 tmp = CreateRectRgn( 0, 0, 0, 0 );
if(!REGION_FrameRgn( tmp, hrgn, nWidth, nHeight )) return 0; if(!REGION_FrameRgn( tmp, hrgn, nWidth, nHeight )) return 0;
@ -688,7 +688,7 @@ BOOL FrameRgn( HDC hdc, HRGN32 hrgn, HBRUSH16 hbrush, int nWidth, int nHeight )
/*********************************************************************** /***********************************************************************
* InvertRgn (GDI.42) * InvertRgn (GDI.42)
*/ */
BOOL InvertRgn( HDC hdc, HRGN32 hrgn ) BOOL InvertRgn( HDC16 hdc, HRGN32 hrgn )
{ {
HBRUSH16 prevBrush = SelectObject( hdc, GetStockObject(BLACK_BRUSH) ); HBRUSH16 prevBrush = SelectObject( hdc, GetStockObject(BLACK_BRUSH) );
WORD prevROP = SetROP2( hdc, R2_NOT ); WORD prevROP = SetROP2( hdc, R2_NOT );

View File

@ -79,8 +79,10 @@ HANDLE16 HOOK_GetHook( INT16 id , HQUEUE16 hQueue )
*/ */
HOOKPROC16 HOOK_GetProc16( HHOOK hhook ) HOOKPROC16 HOOK_GetProc16( HHOOK hhook )
{ {
HOOKDATA *data = (HOOKDATA *)USER_HEAP_LIN_ADDR( hhook ); HOOKDATA *data;
return data ? data->proc : NULL; if (HIWORD(hhook) != HOOK_MAGIC) return NULL;
if (!(data = (HOOKDATA *)USER_HEAP_LIN_ADDR( LOWORD(hhook) ))) return NULL;
return data->proc;
} }

View File

@ -111,7 +111,7 @@ BOOL32 LPtoDP32( HDC32 hdc, LPPOINT32 points, INT32 count )
/*********************************************************************** /***********************************************************************
* SetMapMode (GDI.3) * SetMapMode (GDI.3)
*/ */
WORD SetMapMode( HDC hdc, WORD mode ) WORD SetMapMode( HDC16 hdc, WORD mode )
{ {
WORD prevMode; WORD prevMode;
DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC ); DC * dc = (DC *) GDI_GetObjPtr( hdc, DC_MAGIC );

View File

@ -41,9 +41,6 @@ void MDI_UpdateFrameText(WND *, HWND, BOOL, LPCSTR);
BOOL MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND); BOOL MDI_AugmentFrameMenu(MDICLIENTINFO*, WND *, HWND);
BOOL MDI_RestoreFrameMenu(WND *, HWND); BOOL MDI_RestoreFrameMenu(WND *, HWND);
void ScrollChildren(HWND , UINT , WPARAM , LPARAM );
void CalcChildScroll(HWND, WORD);
static LONG MDI_ChildActivate(WND* ,HWND ); static LONG MDI_ChildActivate(WND* ,HWND );
/* -------- Miscellaneous service functions ---------- /* -------- Miscellaneous service functions ----------
@ -544,7 +541,7 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
SendMessage16( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L ); SendMessage16( prevActiveWnd, WM_NCACTIVATE, FALSE, 0L );
#ifdef WINELIB32 #ifdef WINELIB32
SendMessage32A( prevActiveWnd, WM_MDIACTIVATE, (WPARAM)prevActiveWnd, SendMessage32A( prevActiveWnd, WM_MDIACTIVATE, (WPARAM32)prevActiveWnd,
(LPARAM)hWndChild); (LPARAM)hWndChild);
#else #else
@ -592,13 +589,13 @@ LONG MDI_ChildActivate(WND *clientPtr, HWND hWndChild)
SendMessage16( hWndChild, WM_NCACTIVATE, TRUE, 0L); SendMessage16( hWndChild, WM_NCACTIVATE, TRUE, 0L);
if( GetFocus32() == clientInfo->self ) if( GetFocus32() == clientInfo->self )
SendMessage16( clientInfo->self, WM_SETFOCUS, SendMessage16( clientInfo->self, WM_SETFOCUS,
(WPARAM)clientInfo->self, 0L ); (WPARAM16)clientInfo->self, 0L );
else else
SetFocus32( clientInfo->self ); SetFocus32( clientInfo->self );
} }
#ifdef WINELIB32 #ifdef WINELIB32
SendMessage32A( hWndChild, WM_MDIACTIVATE, (WPARAM)hWndChild, SendMessage32A( hWndChild, WM_MDIACTIVATE, (WPARAM32)hWndChild,
(LPARAM)prevActiveWnd ); (LPARAM)prevActiveWnd );
#else #else
SendMessage16( hWndChild, WM_MDIACTIVATE, TRUE, SendMessage16( hWndChild, WM_MDIACTIVATE, TRUE,
@ -666,8 +663,8 @@ MDIWCL* MDI_BuildWCL(WND* clientWnd, INT16* iTotal)
*/ */
HBITMAP16 CreateMDIMenuBitmap(void) HBITMAP16 CreateMDIMenuBitmap(void)
{ {
HDC hDCSrc = CreateCompatibleDC(0); HDC16 hDCSrc = CreateCompatibleDC(0);
HDC hDCDest = CreateCompatibleDC(hDCSrc); HDC16 hDCDest = CreateCompatibleDC(hDCSrc);
HBITMAP16 hbClose = LoadBitmap16(0, MAKEINTRESOURCE(OBM_CLOSE) ); HBITMAP16 hbClose = LoadBitmap16(0, MAKEINTRESOURCE(OBM_CLOSE) );
HBITMAP16 hbCopy,hb_src,hb_dest; HBITMAP16 hbCopy,hb_src,hb_dest;
@ -977,7 +974,7 @@ void MDI_UpdateFrameText(WND *frameWnd, HWND hClient, BOOL repaint, LPCSTR lpTit
* *
* This function is the handler for all MDI requests. * This function is the handler for all MDI requests.
*/ */
LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) LRESULT MDIClientWndProc(HWND hwnd, UINT message, WPARAM16 wParam, LPARAM lParam)
{ {
LPCREATESTRUCT16 cs; LPCREATESTRUCT16 cs;
LPCLIENTCREATESTRUCT16 ccs; LPCLIENTCREATESTRUCT16 ccs;
@ -1197,7 +1194,8 @@ LRESULT DefFrameProc16( HWND16 hwnd, HWND16 hwndMDIClient, UINT16 message,
childHwnd = MDI_GetChildByID( WIN_FindWndPtr(hwndMDIClient), childHwnd = MDI_GetChildByID( WIN_FindWndPtr(hwndMDIClient),
wParam ); wParam );
if( childHwnd ) if( childHwnd )
SendMessage16(hwndMDIClient, WM_MDIACTIVATE, (WPARAM)childHwnd , 0L); SendMessage16(hwndMDIClient, WM_MDIACTIVATE,
(WPARAM16)childHwnd , 0L);
} }
break; break;
@ -1341,7 +1339,7 @@ LRESULT DefMDIChildProc16( HWND16 hwnd, UINT16 message,
return 0; return 0;
case WM_CLOSE: case WM_CLOSE:
SendMessage16(ci->self,WM_MDIDESTROY,(WPARAM)hwnd,0L); SendMessage16(ci->self,WM_MDIDESTROY,(WPARAM16)hwnd,0L);
return 0; return 0;
case WM_SETFOCUS: case WM_SETFOCUS:
@ -1446,7 +1444,7 @@ LRESULT DefMDIChildProc16( HWND16 hwnd, UINT16 message,
/* MDI children don't have menu bars */ /* MDI children don't have menu bars */
PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND, PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)wParam); (WPARAM16)SC_KEYMENU, (LPARAM)wParam);
return 0x00010000L; return 0x00010000L;
case WM_NEXTMENU: case WM_NEXTMENU:
@ -1500,7 +1498,7 @@ LRESULT DefMDIChildProc32A( HWND32 hwnd, UINT32 message,
/* MDI children don't have menu bars */ /* MDI children don't have menu bars */
PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND, PostMessage( clientWnd->parent->hwndSelf, WM_SYSCOMMAND,
(WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) ); (WPARAM16)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
return 0x00010000L; return 0x00010000L;
case WM_CLOSE: case WM_CLOSE:
@ -1564,7 +1562,7 @@ BOOL TranslateMDISysAccel(HWND hwndClient, LPMSG16 msg)
WND* clientWnd = WIN_FindWndPtr( hwndClient); WND* clientWnd = WIN_FindWndPtr( hwndClient);
WND* wnd; WND* wnd;
MDICLIENTINFO *ci = NULL; MDICLIENTINFO *ci = NULL;
WPARAM wParam = 0; WPARAM16 wParam = 0;
if( (msg->message != WM_KEYDOWN && msg->message != WM_SYSKEYDOWN) || !clientWnd ) if( (msg->message != WM_KEYDOWN && msg->message != WM_SYSKEYDOWN) || !clientWnd )
return 0; return 0;
@ -1651,7 +1649,7 @@ void CalcChildScroll( HWND hwnd, WORD scroll )
/*********************************************************************** /***********************************************************************
* ScrollChildren (USER.463) * ScrollChildren (USER.463)
*/ */
void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) void ScrollChildren(HWND hWnd, UINT uMsg, WPARAM16 wParam, LPARAM lParam)
{ {
WND *wndPtr = WIN_FindWndPtr(hWnd); WND *wndPtr = WIN_FindWndPtr(hWnd);
short newPos=-1; short newPos=-1;

View File

@ -36,7 +36,7 @@
typedef enum { SYSQ_MSG_ABANDON, SYSQ_MSG_SKIP, SYSQ_MSG_ACCEPT } SYSQ_STATUS; typedef enum { SYSQ_MSG_ABANDON, SYSQ_MSG_SKIP, SYSQ_MSG_ACCEPT } SYSQ_STATUS;
extern WPARAM lastEventChar; /* event.c */ extern WPARAM16 lastEventChar; /* event.c */
extern BOOL MouseButtonsStates[3]; extern BOOL MouseButtonsStates[3];
extern BOOL AsyncMouseButtonsStates[3]; extern BOOL AsyncMouseButtonsStates[3];
extern BYTE KeyStateTable[256]; extern BYTE KeyStateTable[256];
@ -146,7 +146,7 @@ static SYSQ_STATUS MSG_TranslateMouseMsg( MSG16 *msg, BOOL remove )
/* Send the WM_SETCURSOR message */ /* Send the WM_SETCURSOR message */
SendMessage16( msg->hwnd, WM_SETCURSOR, (WPARAM)msg->hwnd, SendMessage16( msg->hwnd, WM_SETCURSOR, (WPARAM16)msg->hwnd,
MAKELONG( hittest, msg->message )); MAKELONG( hittest, msg->message ));
if (eatMsg) return SYSQ_MSG_SKIP; if (eatMsg) return SYSQ_MSG_SKIP;
@ -295,7 +295,7 @@ static void MSG_JournalRecordMsg( MSG16 *msg )
/***************************************************************** /*****************************************************************
* MSG_JournalPlayBackIsAscii * MSG_JournalPlayBackIsAscii
*/ */
static BOOL MSG_JournalPlayBackIsAscii(WPARAM wParam) static BOOL MSG_JournalPlayBackIsAscii(WPARAM16 wParam)
{ {
return ((wParam>VK_HELP && wParam<VK_F1) || return ((wParam>VK_HELP && wParam<VK_F1) ||
wParam == VK_SPACE || wParam == VK_SPACE ||
@ -494,7 +494,7 @@ WORD GetDoubleClickTime()
* Implementation of an inter-task SendMessage. * Implementation of an inter-task SendMessage.
*/ */
static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND hwnd, UINT msg, static LRESULT MSG_SendMessage( HQUEUE16 hDestQueue, HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam ) WPARAM16 wParam, LPARAM lParam )
{ {
INT32 prevSMRL = debugSMRL; INT32 prevSMRL = debugSMRL;
QSMCTRL qCtrl = { 0, 1}; QSMCTRL qCtrl = { 0, 1};
@ -956,6 +956,7 @@ LRESULT SendMessage16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam)
msg = pmsg->wMsg; msg = pmsg->wMsg;
wParam = pmsg->wParam; wParam = pmsg->wParam;
lParam = pmsg->lParam; lParam = pmsg->lParam;
SEGPTR_FREE( pmsg );
} }
} }

View File

@ -18,7 +18,7 @@ typedef struct {
WORD type; WORD type;
} MSGBOX, *LPMSGBOX; } MSGBOX, *LPMSGBOX;
LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam) LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM16 wParam,LPARAM lParam)
{ {
LPMSGBOX lpmb; LPMSGBOX lpmb;
RECT16 rect, textrect; RECT16 rect, textrect;
@ -65,20 +65,20 @@ LRESULT SystemMessageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
switch(lpmb->type & MB_ICONMASK) { switch(lpmb->type & MB_ICONMASK) {
case MB_ICONEXCLAMATION: case MB_ICONEXCLAMATION:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON, SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_EXCLAMATION), 0); (WPARAM16)LoadIcon16(0, IDI_EXCLAMATION), 0);
break; break;
case MB_ICONQUESTION: case MB_ICONQUESTION:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON, SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_QUESTION), 0); (WPARAM16)LoadIcon16(0, IDI_QUESTION), 0);
break; break;
case MB_ICONASTERISK: case MB_ICONASTERISK:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON, SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_ASTERISK), 0); (WPARAM16)LoadIcon16(0, IDI_ASTERISK), 0);
break; break;
case MB_ICONHAND: case MB_ICONHAND:
default: default:
SendDlgItemMessage16(hwnd, stc1, STM_SETICON, SendDlgItemMessage16(hwnd, stc1, STM_SETICON,
(WPARAM)LoadIcon16(0, IDI_HAND), 0); (WPARAM16)LoadIcon16(0, IDI_HAND), 0);
break; break;
} }

View File

@ -431,10 +431,10 @@ LONG NC_HandleNCHitTest( HWND hwnd, POINT16 pt )
/*********************************************************************** /***********************************************************************
* NC_DrawSysButton * NC_DrawSysButton
*/ */
void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down ) void NC_DrawSysButton( HWND hwnd, HDC16 hdc, BOOL down )
{ {
RECT16 rect; RECT16 rect;
HDC hdcMem; HDC16 hdcMem;
HBITMAP16 hbitmap; HBITMAP16 hbitmap;
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
@ -455,7 +455,7 @@ void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down )
/*********************************************************************** /***********************************************************************
* NC_DrawMaxButton * NC_DrawMaxButton
*/ */
static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down ) static void NC_DrawMaxButton( HWND hwnd, HDC16 hdc, BOOL down )
{ {
RECT16 rect; RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
@ -475,7 +475,7 @@ static void NC_DrawMaxButton( HWND hwnd, HDC hdc, BOOL down )
/*********************************************************************** /***********************************************************************
* NC_DrawMinButton * NC_DrawMinButton
*/ */
static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down ) static void NC_DrawMinButton( HWND hwnd, HDC16 hdc, BOOL down )
{ {
RECT16 rect; RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
@ -497,7 +497,7 @@ static void NC_DrawMinButton( HWND hwnd, HDC hdc, BOOL down )
* Draw a window frame inside the given rectangle, and update the rectangle. * Draw a window frame inside the given rectangle, and update the rectangle.
* The correct pen for the frame must be selected in the DC. * The correct pen for the frame must be selected in the DC.
*/ */
static void NC_DrawFrame( HDC hdc, RECT16 *rect, BOOL dlgFrame, BOOL active ) static void NC_DrawFrame( HDC16 hdc, RECT16 *rect, BOOL dlgFrame, BOOL active )
{ {
short width, height, tmp; short width, height, tmp;
@ -573,7 +573,7 @@ static void NC_DrawFrame( HDC hdc, RECT16 *rect, BOOL dlgFrame, BOOL active )
* *
* Draw the frame used when moving or resizing window. * Draw the frame used when moving or resizing window.
*/ */
static void NC_DrawMovingFrame( HDC hdc, RECT16 *rect, BOOL thickframe ) static void NC_DrawMovingFrame( HDC16 hdc, RECT16 *rect, BOOL thickframe )
{ {
if (thickframe) if (thickframe)
{ {
@ -600,7 +600,7 @@ static void NC_DrawMovingFrame( HDC hdc, RECT16 *rect, BOOL thickframe )
* Draw the window caption. * Draw the window caption.
* The correct pen for the window frame must be selected in the DC. * The correct pen for the window frame must be selected in the DC.
*/ */
static void NC_DrawCaption( HDC hdc, RECT16 *rect, HWND hwnd, static void NC_DrawCaption( HDC16 hdc, RECT16 *rect, HWND hwnd,
DWORD style, BOOL active ) DWORD style, BOOL active )
{ {
RECT16 r = *rect; RECT16 r = *rect;
@ -778,7 +778,7 @@ LONG NC_HandleNCPaint( HWND hwnd , HRGN32 clip)
* *
* Handle a WM_NCACTIVATE message. Called from DefWindowProc(). * Handle a WM_NCACTIVATE message. Called from DefWindowProc().
*/ */
LONG NC_HandleNCActivate( WND *wndPtr, WPARAM wParam ) LONG NC_HandleNCActivate( WND *wndPtr, WPARAM16 wParam )
{ {
WORD wStateChange; WORD wStateChange;
@ -804,7 +804,7 @@ LONG NC_HandleNCActivate( WND *wndPtr, WPARAM wParam )
* *
* Handle a WM_SETCURSOR message. Called from DefWindowProc(). * Handle a WM_SETCURSOR message. Called from DefWindowProc().
*/ */
LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam ) LONG NC_HandleSetCursor( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */ if (hwnd != (HWND)wParam) return 0; /* Don't set the cursor for child windows */
@ -873,7 +873,7 @@ BOOL NC_GetSysPopupPos( WND* wndPtr, RECT16* rect )
* *
* Track a mouse button press on the system menu. * Track a mouse button press on the system menu.
*/ */
static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT16 pt ) static void NC_TrackSysMenu( HWND hwnd, HDC16 hdc, POINT16 pt )
{ {
RECT16 rect; RECT16 rect;
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
@ -906,7 +906,7 @@ static void NC_TrackSysMenu( HWND hwnd, HDC hdc, POINT16 pt )
* Initialisation of a move or resize, when initiatied from a menu choice. * Initialisation of a move or resize, when initiatied from a menu choice.
* Return hit test code for caption or sizing border. * Return hit test code for caption or sizing border.
*/ */
static LONG NC_StartSizeMove( HWND hwnd, WPARAM wParam, POINT16 *capturePoint ) static LONG NC_StartSizeMove( HWND hwnd, WPARAM16 wParam, POINT16 *capturePoint )
{ {
LONG hittest = 0; LONG hittest = 0;
POINT16 pt; POINT16 pt;
@ -979,7 +979,7 @@ static LONG NC_StartSizeMove( HWND hwnd, WPARAM wParam, POINT16 *capturePoint )
} }
*capturePoint = pt; *capturePoint = pt;
SetCursorPos( capturePoint->x, capturePoint->y ); SetCursorPos( capturePoint->x, capturePoint->y );
NC_HandleSetCursor( hwnd, (WPARAM)hwnd, MAKELONG( hittest, WM_MOUSEMOVE )); NC_HandleSetCursor( hwnd, (WPARAM16)hwnd, MAKELONG( hittest, WM_MOUSEMOVE ));
return hittest; return hittest;
} }
@ -1278,7 +1278,7 @@ static void NC_TrackScrollBar( HWND32 hwnd, WPARAM32 wParam, POINT32 pt )
* *
* Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc(). * Handle a WM_NCLBUTTONDOWN message. Called from DefWindowProc().
*/ */
LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM16 wParam, LPARAM lParam )
{ {
HDC32 hdc; HDC32 hdc;
@ -1334,7 +1334,7 @@ LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
* *
* Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc(). * Handle a WM_NCLBUTTONDBLCLK message. Called from DefWindowProc().
*/ */
LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam ) LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM16 wParam, LPARAM lParam )
{ {
/* /*
* if this is an icon, send a restore since we are handling * if this is an icon, send a restore since we are handling
@ -1370,7 +1370,7 @@ LONG NC_HandleNCLButtonDblClk( WND *pWnd, WPARAM wParam, LPARAM lParam )
* *
* Handle a WM_SYSCOMMAND message. Called from DefWindowProc(). * Handle a WM_SYSCOMMAND message. Called from DefWindowProc().
*/ */
LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, POINT16 pt ) LONG NC_HandleSysCommand( HWND hwnd, WPARAM16 wParam, POINT16 pt )
{ {
WND *wndPtr = WIN_FindWndPtr( hwnd ); WND *wndPtr = WIN_FindWndPtr( hwnd );
POINT32 pt32; POINT32 pt32;

View File

@ -133,7 +133,7 @@ HDC16 BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND; wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
lps->fErase = !SendMessage16(hwnd, (bIcon) ? WM_ICONERASEBKGND lps->fErase = !SendMessage16(hwnd, (bIcon) ? WM_ICONERASEBKGND
: WM_ERASEBKGND, : WM_ERASEBKGND,
(WPARAM)lps->hdc, 0 ); (WPARAM16)lps->hdc, 0 );
} }
else lps->fErase = TRUE; else lps->fErase = TRUE;
@ -208,7 +208,7 @@ void PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
if (!hwndParent) return; if (!hwndParent) return;
hbrush = (HBRUSH16)SendMessage32A( hwndParent, hbrush = (HBRUSH16)SendMessage32A( hwndParent,
WM_CTLCOLORMSGBOX + (UINT32)hbrush, WM_CTLCOLORMSGBOX + (UINT32)hbrush,
(WPARAM)hdc, (LPARAM)hwnd ); (WPARAM32)hdc, (LPARAM)hwnd );
} }
if (hbrush) FillRect16( hdc, rect, hbrush ); if (hbrush) FillRect16( hdc, rect, hbrush );
} }
@ -217,10 +217,10 @@ void PaintRect( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc,
/*********************************************************************** /***********************************************************************
* GetControlBrush (USER.326) * GetControlBrush (USER.326)
*/ */
HBRUSH16 GetControlBrush( HWND hwnd, HDC hdc, WORD control ) HBRUSH16 GetControlBrush( HWND hwnd, HDC16 hdc, WORD control )
{ {
return (HBRUSH16)SendMessage32A( GetParent32(hwnd), WM_CTLCOLOR+control, return (HBRUSH16)SendMessage32A( GetParent32(hwnd), WM_CTLCOLOR+control,
(WPARAM)hdc, (LPARAM)hwnd ); (WPARAM32)hdc, (LPARAM)hwnd );
} }
@ -379,7 +379,7 @@ BOOL32 PAINT_RedrawWindow( HWND32 hwnd, const RECT32 *rectUpdate,
{ {
if (SendMessage16( hwnd, (bIcon) ? WM_ICONERASEBKGND if (SendMessage16( hwnd, (bIcon) ? WM_ICONERASEBKGND
: WM_ERASEBKGND, : WM_ERASEBKGND,
(WPARAM)hdc, 0 )) (WPARAM16)hdc, 0 ))
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND; wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
ReleaseDC32( hwnd, hdc ); ReleaseDC32( hwnd, hdc );
} }

View File

@ -101,7 +101,7 @@ void ScrollWindow(HWND hwnd, short dx, short dy, LPRECT16 rect, LPRECT16 clipRec
* ScrollDC (USER.221) * ScrollDC (USER.221)
* *
*/ */
BOOL ScrollDC(HDC hdc, short dx, short dy, LPRECT16 rc, LPRECT16 cliprc, BOOL ScrollDC(HDC16 hdc, short dx, short dy, LPRECT16 rc, LPRECT16 cliprc,
HRGN32 hrgnUpdate, LPRECT16 rcUpdate) HRGN32 hrgnUpdate, LPRECT16 rcUpdate)
{ {
HRGN32 hrgnClip = 0; HRGN32 hrgnClip = 0;

View File

@ -2016,7 +2016,7 @@ BOOL FlashWindow(HWND hWnd, BOOL bInvert)
{ {
HDC32 hDC = GetDC32(hWnd); HDC32 hDC = GetDC32(hWnd);
if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM)hDC, (LPARAM)0 )) if (!SendMessage16( hWnd, WM_ERASEBKGND, (WPARAM16)hDC, 0 ))
wndPtr->flags |= WIN_NEEDS_ERASEBKGND; wndPtr->flags |= WIN_NEEDS_ERASEBKGND;
ReleaseDC32( hWnd, hDC ); ReleaseDC32( hWnd, hDC );
@ -2032,7 +2032,7 @@ BOOL FlashWindow(HWND hWnd, BOOL bInvert)
} }
else else
{ {
WPARAM wparam; WPARAM16 wparam;
if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED); if (bInvert) wparam = !(wndPtr->flags & WIN_NCACTIVATED);
else wparam = (hWnd == GetActiveWindow()); else wparam = (hWnd == GetActiveWindow());
@ -2126,7 +2126,7 @@ BOOL DRAG_QueryUpdate( HWND hQueryWnd, SEGPTR spDragInfo )
ptrDragInfo->hScope = hQueryWnd; ptrDragInfo->hScope = hQueryWnd;
bResult = SendMessage16( hQueryWnd ,WM_QUERYDROPOBJECT , bResult = SendMessage16( hQueryWnd ,WM_QUERYDROPOBJECT ,
(WPARAM)wParam ,(LPARAM) spDragInfo ); (WPARAM16)wParam ,(LPARAM) spDragInfo );
if( !bResult ) if( !bResult )
ptrDragInfo->pt = pt; ptrDragInfo->pt = pt;
@ -2257,7 +2257,7 @@ DWORD DragObject(HWND hwndScope, HWND hWnd, WORD wObj, HANDLE16 hOfStruct,
dprintf_msg(stddeb,"drag: got %04x\n",btemp); dprintf_msg(stddeb,"drag: got %04x\n",btemp);
/* send WM_DRAGLOOP */ /* send WM_DRAGLOOP */
SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM)(hCurrentCursor != hBummer) , SendMessage16( hWnd, WM_DRAGLOOP, (WPARAM16)(hCurrentCursor != hBummer) ,
(LPARAM) spDragInfo ); (LPARAM) spDragInfo );
/* send WM_DRAGSELECT or WM_DRAGMOVE */ /* send WM_DRAGSELECT or WM_DRAGMOVE */
if( hCurrentWnd != lpDragInfo->hScope ) if( hCurrentWnd != lpDragInfo->hScope )
@ -2292,7 +2292,7 @@ DWORD DragObject(HWND hwndScope, HWND hWnd, WORD wObj, HANDLE16 hOfStruct,
if( hCurrentCursor != hBummer ) if( hCurrentCursor != hBummer )
dwRet = SendMessage16( lpDragInfo->hScope, WM_DROPOBJECT, dwRet = SendMessage16( lpDragInfo->hScope, WM_DROPOBJECT,
(WPARAM)hWnd, (LPARAM)spDragInfo ); (WPARAM16)hWnd, (LPARAM)spDragInfo );
GlobalFree16(hDragInfo); GlobalFree16(hDragInfo);
return dwRet; return dwRet;

View File

@ -962,7 +962,7 @@ BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus)
LRESULT wRet; LRESULT wRet;
cbtStruct->fMouse = fMouse; cbtStruct->fMouse = fMouse;
cbtStruct->hWndActive = hwndActive; cbtStruct->hWndActive = hwndActive;
wRet = HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, wRet = HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM16)hWnd,
(LPARAM)SEGPTR_GET(cbtStruct) ); (LPARAM)SEGPTR_GET(cbtStruct) );
SEGPTR_FREE(cbtStruct); SEGPTR_FREE(cbtStruct);
if (wRet) return wRet; if (wRet) return wRet;
@ -990,7 +990,7 @@ BOOL32 WINPOS_SetActiveWindow( HWND32 hWnd, BOOL32 fMouse, BOOL32 fChangeFocus)
/* send palette messages */ /* send palette messages */
if (hWnd && SendMessage16( hWnd, WM_QUERYNEWPALETTE, 0, 0L)) if (hWnd && SendMessage16( hWnd, WM_QUERYNEWPALETTE, 0, 0L))
SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM)hWnd, 0L ); SendMessage16((HWND16)-1, WM_PALETTEISCHANGING, (WPARAM16)hWnd, 0L );
/* if prev wnd is minimized redraw icon title /* if prev wnd is minimized redraw icon title
if( hwndPrevActive ) if( hwndPrevActive )

View File

@ -69,13 +69,14 @@ Enter the debugger before starting application
Turn debugging messages on or off - for instance, Turn debugging messages on or off - for instance,
.I -debugmsg +dll,+heap .I -debugmsg +dll,+heap
will turn on DLL and heap debugging messages. The full list is: will turn on DLL and heap debugging messages. The full list is:
all, accel, bitblt, bitmap, caret, catch, cdaudio, class, clipboard, clipping, all, accel, atom, bitblt, bitmap, caret, cdaudio, class, clipboard, clipping,
combo, comm, cursor, dc, dialog, dll, dosfs, driver, edit, enum, event, exec, combo, comm, commdlg, crtdll, cursor, dc, dde, dialog, dll, dosfs, driver, edit,
file, fixup, font, gdi, global, graphics, icon, int, key, keyboard, ldt, env, event, exec, file, fixup, font, gdi, global, graphics, heap, hook, icon,
listbox, local, malloc, mci, mcianim, mciwave, mdi, menu, menucalc, message, int, key, keyboard, ldt, listbox, local, mci, mcianim, mciwave, mdi, menu,
metafile, midi, mmio, mmsys, mmtime, module, msg, nonclient, ole, palette, message, metafile, midi, mmio, mmsys, mmtime, module, msg, nonclient, ole,
profile, prop, reg, region, relay, resource, scroll, selector, selectors, palette, profile, prop, reg, region, relay, resource, scroll, selector,
stress, syscolor, task, text, timer, toolhelp, utility, win, winsock. sem, sendmsg, shm, stress, syscolor, task, text, timer, toolhelp, ver, vxd, win,
win32, winsock.
.TP .TP
.I -depth n .I -depth n
Change the depth to use for multiple-depth screens Change the depth to use for multiple-depth screens
@ -91,9 +92,11 @@ Enables/disables built-in DLL's - starting wine with
.I -dll -commdlg .I -dll -commdlg
is probably a good idea. is probably a good idea.
The full list of DLLs modifiable by this is: The full list of DLLs modifiable by this is:
KERNEL, USER, GDI, WIN87EM, SHELL, SOUND, KEYBOARD, WINSOCK, STRESS, MMSYSTEM, WIN87EM, SHELL, SOUND, KEYBOARD, WINSOCK, STRESS, MMSYSTEM, SYSTEM, TOOLHELP,
SYSTEM, TOOLHELP, MOUSE, COMMDLG, OLE2, OLE2CONV, OLE2DISP, OLE2NLS, OLE2PROX, MOUSE, COMMDLG, OLE2, OLE2CONV, OLE2DISP, OLE2NLS, OLE2PROX, OLECLI, OLESVR,
OLECLI, OLESVR, COMPOBJ, STORAGE, WINPROCS, DDEML COMPOBJ, STORAGE, WINPROCS, DDEML, ADVAPI32, COMCTL32, COMDLG32, CRTDLL,
GDI32, LZ32, MPR, NTDLL, OLE32, SHELL32, USER32, VER, VERSION, W32SYS, WINMM,
WINSPOOL, WSOCK32
.TP .TP
.I -fixedmap .I -fixedmap
Use a "standard" color map. Use a "standard" color map.
@ -126,6 +129,10 @@ Use a private color map
.TP .TP
.I -synchronous .I -synchronous
Turn on synchronous display mode Turn on synchronous display mode
.TP
.I -winver version
Specify which Windows version WINE should imitate.
Possible arguments are: win31, win95 and nt351.
.PD 1 .PD 1
.SH PROGRAM/ARGUMENTS .SH PROGRAM/ARGUMENTS
The program name may be specified in DOS format (C:\\WINDOWS\\SOL.EXE) or in The program name may be specified in DOS format (C:\\WINDOWS\\SOL.EXE) or in