Commit a8d1a7c5 authored by Alexandre Julliard's avatar Alexandre Julliard

Finished separation of comclt32 and comdlg32.

parent b4bb1f7d
...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = comctl32 MODULE = comctl32
EXTRALIBS = -lwine_unicode EXTRALIBS = -lwine_unicode
IMPORTS = user32 gdi32 advapi32 kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
......
...@@ -3,11 +3,11 @@ type win32 ...@@ -3,11 +3,11 @@ type win32
init COMCTL32_LibMain init COMCTL32_LibMain
rsrc rsrc.res rsrc rsrc.res
#import user32.dll import user32.dll
#import gdi32.dll import gdi32.dll
#import advapi32.dll import advapi32.dll
#import kernel32.dll import kernel32.dll
#import ntdll.dll import ntdll.dll
debug_channels (animate comboex commctrl datetime header hotkey imagelist ipaddress debug_channels (animate comboex commctrl datetime header hotkey imagelist ipaddress
listview message monthcal nativefont pager progress propsheet listview message monthcal nativefont pager progress propsheet
......
...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@ ...@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = comdlg32 MODULE = comdlg32
ALTNAMES = commdlg ALTNAMES = commdlg
IMPORTS = user32 gdi32 kernel32 ntdll
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
......
...@@ -1042,7 +1042,7 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif ...@@ -1042,7 +1042,7 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif
if (lpp->lpcc16) if (lpp->lpcc16)
{ {
if (lpp->lpcc->hwndOwner) if (lpp->lpcc->hwndOwner)
SendMessage16(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc16); SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc16);
if ( CC_HookCallChk(lpp->lpcc)) if ( CC_HookCallChk(lpp->lpcc))
CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook, hDlg, CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook, hDlg,
WM_COMMAND, psh15, (LPARAM)lpp->lpcc16); WM_COMMAND, psh15, (LPARAM)lpp->lpcc16);
...@@ -1062,7 +1062,7 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif ...@@ -1062,7 +1062,7 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif
if (lpp->lpcc16) if (lpp->lpcc16)
{ {
if (lpp->lpcc->hwndOwner) if (lpp->lpcc->hwndOwner)
if (SendMessage16(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc16)) if (SendMessageA(lpp->lpcc->hwndOwner, cokmsg, 0, (LPARAM)lpp->lpcc16))
break; /* do NOT close */ break; /* do NOT close */
} }
else else
......
...@@ -7,10 +7,10 @@ import shell32.dll ...@@ -7,10 +7,10 @@ import shell32.dll
import shlwapi.dll import shlwapi.dll
import comctl32.dll import comctl32.dll
import winspool.drv import winspool.drv
#import user32.dll import user32.dll
#import gdi32.dll import gdi32.dll
#import kernel32.dll import kernel32.dll
#import ntdll.dll import ntdll.dll
debug_channels (commdlg) debug_channels (commdlg)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "module.h" #include "module.h"
#include "debugtools.h" #include "debugtools.h"
#include "cderr.h" #include "cderr.h"
#include "tweak.h"
DEFAULT_DEBUG_CHANNEL(commdlg); DEFAULT_DEBUG_CHANNEL(commdlg);
...@@ -1560,18 +1559,13 @@ BOOL16 WINAPI GetSaveFileName16( ...@@ -1560,18 +1559,13 @@ BOOL16 WINAPI GetSaveFileName16(
BOOL WINAPI GetOpenFileNameA( BOOL WINAPI GetOpenFileNameA(
LPOPENFILENAMEA ofn) /* address of init structure */ LPOPENFILENAMEA ofn) /* address of init structure */
{ {
BOOL newlook; BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */
/* some flags don't allow to match the TWEAK_WineLook */ /* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE)) if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{ {
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE; newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
} }
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook) if (newlook)
{ {
...@@ -1596,18 +1590,13 @@ BOOL WINAPI GetOpenFileNameA( ...@@ -1596,18 +1590,13 @@ BOOL WINAPI GetOpenFileNameA(
BOOL WINAPI GetOpenFileNameW( BOOL WINAPI GetOpenFileNameW(
LPOPENFILENAMEW ofn) /* address of init structure */ LPOPENFILENAMEW ofn) /* address of init structure */
{ {
BOOL newlook; BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */
/* some flags don't allow to match the TWEAK_WineLook */ /* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE)) if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{ {
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE; newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
} }
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook) if (newlook)
{ {
...@@ -1632,18 +1621,13 @@ BOOL WINAPI GetOpenFileNameW( ...@@ -1632,18 +1621,13 @@ BOOL WINAPI GetOpenFileNameW(
BOOL WINAPI GetSaveFileNameA( BOOL WINAPI GetSaveFileNameA(
LPOPENFILENAMEA ofn) /* address of init structure */ LPOPENFILENAMEA ofn) /* address of init structure */
{ {
BOOL newlook; BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */
/* some flags don't allow to match the TWEAK_WineLook */ /* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE)) if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{ {
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE; newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
} }
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook) if (newlook)
{ {
...@@ -1668,18 +1652,13 @@ BOOL WINAPI GetSaveFileNameA( ...@@ -1668,18 +1652,13 @@ BOOL WINAPI GetSaveFileNameA(
BOOL WINAPI GetSaveFileNameW( BOOL WINAPI GetSaveFileNameW(
LPOPENFILENAMEW ofn) /* address of init structure */ LPOPENFILENAMEW ofn) /* address of init structure */
{ {
BOOL newlook; BOOL newlook = TRUE; /* FIXME: TWEAK_WineLook */
/* some flags don't allow to match the TWEAK_WineLook */ /* some flags don't allow to match the TWEAK_WineLook */
if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE)) if (ofn->Flags & (OFN_ALLOWMULTISELECT|OFN_ENABLEHOOK|OFN_ENABLETEMPLATE))
{ {
newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE; newlook = (ofn->Flags & OFN_EXPLORER) ? TRUE : FALSE;
} }
else
{
/* no special flags set, we can match the TWEAK_WineLook */
newlook = (TWEAK_WineLook>WIN31_LOOK) ? TRUE : FALSE;
}
if (newlook) if (newlook)
{ {
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "ldt.h" #include "ldt.h"
#include "heap.h" #include "heap.h"
#include "commdlg.h" #include "commdlg.h"
#include "dialog.h"
#include "dlgs.h" #include "dlgs.h"
#include "module.h" #include "module.h"
#include "debugtools.h" #include "debugtools.h"
...@@ -407,7 +406,7 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf) ...@@ -407,7 +406,7 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf)
{ {
j=SendMessageA(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname ); j=SendMessageA(hwnd,CB_ADDSTRING,0,(LPARAM)fontstyles[i].stname );
if (j==CB_ERR) return 1; if (j==CB_ERR) return 1;
j=SendMessage16(hwnd, CB_SETITEMDATA16, j, j=SendMessageA(hwnd, CB_SETITEMDATA, j,
MAKELONG(fontstyles[i].weight,fontstyles[i].italic)); MAKELONG(fontstyles[i].weight,fontstyles[i].italic));
if (j==CB_ERR) return 1; if (j==CB_ERR) return 1;
} }
...@@ -926,8 +925,6 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam, ...@@ -926,8 +925,6 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
{ {
LPCHOOSEFONT16 lpcf; LPCHOOSEFONT16 lpcf;
LPCHOOSEFONTA lpcf32a; LPCHOOSEFONTA lpcf32a;
UINT uMsg32;
WPARAM wParam32;
LRESULT res=0; LRESULT res=0;
if (message!=WM_INITDIALOG) if (message!=WM_INITDIALOG)
{ {
...@@ -951,32 +948,55 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam, ...@@ -951,32 +948,55 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
if (CFn_HookCallChk(lpcf)) if (CFn_HookCallChk(lpcf))
return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam); return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
} }
WINPROC_MapMsg16To32A(message, wParam, &uMsg32, &wParam32, &lParam);
lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName; lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName;
switch (uMsg32) switch (message)
{ {
case WM_MEASUREITEM: case WM_MEASUREITEM:
res=CFn_WMMeasureItem(hDlg, wParam32, lParam); {
MEASUREITEMSTRUCT16* mis16 = (MEASUREITEMSTRUCT16 *)PTR_SEG_TO_LIN(lParam);
MEASUREITEMSTRUCT mis;
mis.CtlType = mis16->CtlType;
mis.CtlID = mis16->CtlID;
mis.itemID = mis16->itemID;
mis.itemWidth = mis16->itemWidth;
mis.itemHeight = mis16->itemHeight;
mis.itemData = mis16->itemData;
res = CFn_WMMeasureItem(hDlg, wParam, (LPARAM)&mis);
mis16->itemWidth = (UINT16)mis.itemWidth;
mis16->itemHeight = (UINT16)mis.itemHeight;
}
break; break;
case WM_DRAWITEM: case WM_DRAWITEM:
res=CFn_WMDrawItem(hDlg, wParam32, lParam); {
DRAWITEMSTRUCT16* dis16 = (DRAWITEMSTRUCT16 *)PTR_SEG_TO_LIN(lParam);
DRAWITEMSTRUCT dis;
dis.CtlType = dis16->CtlType;
dis.CtlID = dis16->CtlID;
dis.itemID = dis16->itemID;
dis.itemAction = dis16->itemAction;
dis.itemState = dis16->itemState;
dis.hwndItem = dis16->hwndItem;
dis.hDC = dis16->hDC;
dis.itemData = dis16->itemData;
CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem );
res = CFn_WMDrawItem(hDlg, wParam, (LPARAM)&dis);
}
break; break;
case WM_CTLCOLORSTATIC: case WM_CTLCOLOR:
res=CFn_WMCtlColorStatic(hDlg, wParam32, lParam, lpcf32a); if (HIWORD(lParam) == CTLCOLOR_STATIC)
res=CFn_WMCtlColorStatic(hDlg, (HDC)wParam, (HWND)LOWORD(lParam), lpcf32a);
break; break;
case WM_COMMAND: case WM_COMMAND:
res=CFn_WMCommand(hDlg, wParam32, lParam, lpcf32a); res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a);
break; break;
case WM_DESTROY: case WM_DESTROY:
res=CFn_WMDestroy(hDlg, wParam32, lParam); res=CFn_WMDestroy(hDlg, wParam, lParam);
break; break;
case WM_CHOOSEFONT_GETLOGFONT: case WM_CHOOSEFONT_GETLOGFONT:
TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", TRACE("WM_CHOOSEFONT_GETLOGFONT lParam=%08lX\n", lParam);
lParam);
FIXME("current logfont back to caller\n"); FIXME("current logfont back to caller\n");
break; break;
} }
WINPROC_UnmapMsg16To32A(hDlg,uMsg32, wParam32, lParam, res);
return res; return res;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment