Finish the conversion of HWND to a void*.
This commit is contained in:
parent
cbe88fc3a1
commit
e149b37f3a
|
@ -24,6 +24,10 @@
|
|||
#include "dlgs.h"
|
||||
#include "wine/windef16.h"
|
||||
|
||||
/* handle conversions */
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
/*---------------- 16-bit ----------------*/
|
||||
extern HINSTANCE16 COMMDLG_hInstance;
|
||||
extern HINSTANCE COMMDLG_hInstance32;
|
||||
|
|
|
@ -845,8 +845,9 @@ static LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 )
|
|||
return FALSE;
|
||||
}
|
||||
ch32->lStructSize = sizeof(CHOOSECOLORW);
|
||||
ch32->hwndOwner = ch16->hwndOwner;
|
||||
ch32->hInstance = ch16->hInstance;
|
||||
ch32->hwndOwner = HWND_32(ch16->hwndOwner);
|
||||
/* Should be an HINSTANCE but MS made a typo */
|
||||
ch32->hInstance = HWND_32(ch16->hInstance);
|
||||
ch32->lpCustColors = MapSL(ch16->lpCustColors);
|
||||
ch32->lpfnHook = (LPCCHOOKPROC) ch16->lpfnHook; /* only used as flag */
|
||||
ch32->Flags = ch16->Flags;
|
||||
|
@ -917,7 +918,8 @@ static LONG CC_WMInitDialog( HWND hDlg, WPARAM wParam, LPARAM lParam, BOOL b16 )
|
|||
if (CC_HookCallChk(lpp->lpcc))
|
||||
{
|
||||
if (b16)
|
||||
res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook, hDlg, WM_INITDIALOG, wParam, lParam);
|
||||
res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook,
|
||||
HWND_16(hDlg), WM_INITDIALOG, wParam, lParam);
|
||||
else
|
||||
res = CallWindowProcA( (WNDPROC)lpp->lpcc->lpfnHook, hDlg, WM_INITDIALOG, wParam, lParam);
|
||||
}
|
||||
|
@ -1054,8 +1056,9 @@ static LRESULT CC_WMCommand( HWND hDlg, WPARAM wParam, LPARAM lParam, WORD notif
|
|||
if (lpp->lpcc->hwndOwner)
|
||||
SendMessageA(lpp->lpcc->hwndOwner, i, 0, (LPARAM)lpp->lpcc16);
|
||||
if ( CC_HookCallChk(lpp->lpcc))
|
||||
CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook, hDlg,
|
||||
WM_COMMAND, psh15, (LPARAM)lpp->lpcc16);
|
||||
CallWindowProc16( (WNDPROC16) lpp->lpcc16->lpfnHook,
|
||||
HWND_16(hDlg), WM_COMMAND, psh15,
|
||||
(LPARAM)lpp->lpcc16);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1299,10 +1302,12 @@ static LRESULT WINAPI ColorDlgProc( HWND hDlg, UINT message,
|
|||
/***********************************************************************
|
||||
* ColorDlgProc (COMMDLG.8)
|
||||
*/
|
||||
LRESULT WINAPI ColorDlgProc16( HWND16 hDlg, UINT16 message,
|
||||
LRESULT WINAPI ColorDlgProc16( HWND16 hDlg16, UINT16 message,
|
||||
WPARAM16 wParam, LONG lParam )
|
||||
{
|
||||
int res;
|
||||
HWND hDlg = HWND_32(hDlg16);
|
||||
|
||||
LCCPRIV lpp = (LCCPRIV)GetWindowLongA(hDlg, DWL_USER);
|
||||
if (message != WM_INITDIALOG)
|
||||
{
|
||||
|
@ -1310,7 +1315,7 @@ LRESULT WINAPI ColorDlgProc16( HWND16 hDlg, UINT16 message,
|
|||
return FALSE;
|
||||
res=0;
|
||||
if (CC_HookCallChk(lpp->lpcc))
|
||||
res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook, hDlg, message, wParam, lParam);
|
||||
res = CallWindowProc16( (WNDPROC16)lpp->lpcc16->lpfnHook, hDlg16, message, wParam, lParam);
|
||||
if (res)
|
||||
return res;
|
||||
}
|
||||
|
@ -1332,7 +1337,8 @@ LRESULT WINAPI ColorDlgProc16( HWND16 hDlg, UINT16 message,
|
|||
SetWindowLongA(hDlg, DWL_USER, 0L); /* we don't need it anymore */
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
if (CC_WMCommand(hDlg, wParam, lParam, HIWORD(lParam), (HWND)LOWORD(lParam)))
|
||||
if (CC_WMCommand(hDlg, wParam, lParam,
|
||||
HIWORD(lParam), HWND_32(LOWORD(lParam))))
|
||||
return TRUE;
|
||||
break;
|
||||
case WM_PAINT:
|
||||
|
@ -1432,7 +1438,7 @@ BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 lpChCol )
|
|||
}
|
||||
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 8);
|
||||
hInst = GetWindowLongA(lpChCol->hwndOwner, GWL_HINSTANCE);
|
||||
hInst = GetWindowLongA(HWND_32(lpChCol->hwndOwner), GWL_HINSTANCE);
|
||||
bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChCol->hwndOwner,
|
||||
(DLGPROC16) ptr, (DWORD)lpChCol);
|
||||
if (hResource16) FreeResource16(hDlgTmpl16);
|
||||
|
|
|
@ -297,7 +297,7 @@ static BOOL FILEDLG_CallWindowProc(LFSPRIVATE lfs, UINT wMsg, WPARAM wParam,
|
|||
if (lfs->ofn16)
|
||||
{
|
||||
return (BOOL16) CallWindowProc16(
|
||||
(WNDPROC16)lfs->ofn16->lpfnHook, lfs->hwnd,
|
||||
(WNDPROC16)lfs->ofn16->lpfnHook, HWND_16(lfs->hwnd),
|
||||
(UINT16)wMsg, (WPARAM16)wParam, lParam);
|
||||
}
|
||||
if (lfs->ofnA)
|
||||
|
@ -1042,7 +1042,7 @@ void FILEDLG_MapDrawItemStruct(LPDRAWITEMSTRUCT16 lpdis16, LPDRAWITEMSTRUCT lpdi
|
|||
lpdis->itemID = lpdis16->itemID;
|
||||
lpdis->itemAction = lpdis16->itemAction;
|
||||
lpdis->itemState = lpdis16->itemState;
|
||||
lpdis->hwndItem = lpdis16->hwndItem;
|
||||
lpdis->hwndItem = HWND_32(lpdis16->hwndItem);
|
||||
lpdis->hDC = lpdis16->hDC;
|
||||
lpdis->rcItem.right = lpdis16->rcItem.right;
|
||||
lpdis->rcItem.left = lpdis16->rcItem.left;
|
||||
|
@ -1145,7 +1145,7 @@ void FILEDLG_MapOfnStruct16(LPOPENFILENAME16 ofn16, LPOPENFILENAMEW ofnW, BOOL o
|
|||
/* first convert to linear pointers */
|
||||
memset(&ofnA, 0, sizeof(OPENFILENAMEA));
|
||||
ofnA.lStructSize = sizeof(OPENFILENAMEA);
|
||||
ofnA.hwndOwner = ofn16->hwndOwner;
|
||||
ofnA.hwndOwner = HWND_32(ofn16->hwndOwner);
|
||||
ofnA.hInstance = ofn16->hInstance;
|
||||
if (ofn16->lpstrFilter)
|
||||
ofnA.lpstrFilter = MapSL(ofn16->lpstrFilter);
|
||||
|
@ -1343,9 +1343,10 @@ BOOL WINAPI GetFileName31W(
|
|||
/***********************************************************************
|
||||
* FileOpenDlgProc (COMMDLG.6)
|
||||
*/
|
||||
LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hWnd = HWND_32(hWnd16);
|
||||
LFSPRIVATE lfs = (LFSPRIVATE)GetPropA(hWnd,OFN_PROP);
|
||||
DRAWITEMSTRUCT dis;
|
||||
|
||||
|
@ -1362,7 +1363,7 @@ LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
|||
return FILEDLG_WMInitDialog(hWnd, wParam, lParam);
|
||||
|
||||
case WM_MEASUREITEM:
|
||||
return FILEDLG_WMMeasureItem16(hWnd, wParam, lParam);
|
||||
return FILEDLG_WMMeasureItem16(hWnd16, wParam, lParam);
|
||||
|
||||
case WM_DRAWITEM:
|
||||
FILEDLG_MapDrawItemStruct(MapSL(lParam), &dis);
|
||||
|
@ -1391,9 +1392,10 @@ LRESULT WINAPI FileOpenDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
|||
/***********************************************************************
|
||||
* FileSaveDlgProc (COMMDLG.7)
|
||||
*/
|
||||
LRESULT WINAPI FileSaveDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI FileSaveDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hWnd = HWND_32(hWnd16);
|
||||
LFSPRIVATE lfs = (LFSPRIVATE)GetPropA(hWnd,OFN_PROP);
|
||||
DRAWITEMSTRUCT dis;
|
||||
|
||||
|
@ -1410,7 +1412,7 @@ LRESULT WINAPI FileSaveDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
|||
return FILEDLG_WMInitDialog(hWnd, wParam, lParam);
|
||||
|
||||
case WM_MEASUREITEM:
|
||||
return FILEDLG_WMMeasureItem16(hWnd, wParam, lParam);
|
||||
return FILEDLG_WMMeasureItem16(hWnd16, wParam, lParam);
|
||||
|
||||
case WM_DRAWITEM:
|
||||
FILEDLG_MapDrawItemStruct(MapSL(lParam), &dis);
|
||||
|
@ -1515,7 +1517,7 @@ BOOL16 WINAPI GetOpenFileName16(
|
|||
lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, OPEN_DIALOG);
|
||||
if (lfs)
|
||||
{
|
||||
hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
|
||||
hInst = GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 6);
|
||||
bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
|
||||
(DLGPROC16) ptr, (DWORD) lfs);
|
||||
|
@ -1553,7 +1555,7 @@ BOOL16 WINAPI GetSaveFileName16(
|
|||
lfs = FILEDLG_AllocPrivate((LPARAM) ofn, LFS16, SAVE_DIALOG);
|
||||
if (lfs)
|
||||
{
|
||||
hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
|
||||
hInst = GetWindowLongA( HWND_32(lpofn->hwndOwner), GWL_HINSTANCE );
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 7);
|
||||
bRet = DialogBoxIndirectParam16( hInst, lfs->hDlgTmpl16, lpofn->hwndOwner,
|
||||
(DLGPROC16) ptr, (DWORD) lfs);
|
||||
|
|
|
@ -176,7 +176,7 @@ HWND16 WINAPI FindText16( SEGPTR find )
|
|||
lfr->find = TRUE;
|
||||
if (FINDDLG_Get16BitsTemplate(lfr))
|
||||
{
|
||||
hInst = GetWindowLongA( lfr->fr16->hwndOwner , GWL_HINSTANCE);
|
||||
hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE);
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 13);
|
||||
ret = CreateDialogIndirectParam16( hInst, lfr->template,
|
||||
lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);
|
||||
|
@ -206,7 +206,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
|
|||
lfr->find = FALSE;
|
||||
if (FINDDLG_Get16BitsTemplate(lfr))
|
||||
{
|
||||
hInst = GetWindowLongA( lfr->fr16->hwndOwner , GWL_HINSTANCE);
|
||||
hInst = GetWindowLongA( HWND_32(lfr->fr16->hwndOwner), GWL_HINSTANCE);
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 14);
|
||||
ret = CreateDialogIndirectParam16( hInst, lfr->template,
|
||||
lfr->fr16->hwndOwner, (DLGPROC16) ptr, find);
|
||||
|
@ -311,9 +311,10 @@ static LRESULT FINDDLG_WMCommand(HWND hWnd, WPARAM wParam,
|
|||
/***********************************************************************
|
||||
* FindTextDlgProc (COMMDLG.13)
|
||||
*/
|
||||
LRESULT WINAPI FindTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hWnd = HWND_32(hWnd16);
|
||||
LPFINDREPLACE16 lpfr;
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
|
@ -322,7 +323,7 @@ LRESULT WINAPI FindTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
|||
MapSL(lpfr->lpstrFindWhat), FALSE);
|
||||
case WM_COMMAND:
|
||||
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
|
||||
return FINDDLG_WMCommand(hWnd, wParam, lpfr->hwndOwner,
|
||||
return FINDDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
||||
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
||||
lpfr->wFindWhatLen, FALSE);
|
||||
}
|
||||
|
@ -467,9 +468,10 @@ static LRESULT REPLACEDLG_WMCommand(HWND hWnd, WPARAM16 wParam,
|
|||
/***********************************************************************
|
||||
* ReplaceTextDlgProc (COMMDLG.14)
|
||||
*/
|
||||
LRESULT WINAPI ReplaceTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI ReplaceTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hWnd = HWND_32(hWnd16);
|
||||
LPFINDREPLACE16 lpfr;
|
||||
switch (wMsg) {
|
||||
case WM_INITDIALOG:
|
||||
|
@ -479,11 +481,10 @@ LRESULT WINAPI ReplaceTextDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
|||
MapSL(lpfr->lpstrReplaceWith), FALSE);
|
||||
case WM_COMMAND:
|
||||
lpfr=MapSL(GetWindowLongA(hWnd, DWL_USER));
|
||||
return REPLACEDLG_WMCommand(hWnd, wParam, lpfr->hwndOwner,
|
||||
return REPLACEDLG_WMCommand(hWnd, wParam, HWND_32(lpfr->hwndOwner),
|
||||
&lpfr->Flags, MapSL(lpfr->lpstrFindWhat),
|
||||
lpfr->wFindWhatLen, MapSL(lpfr->lpstrReplaceWith),
|
||||
lpfr->wReplaceWithLen, FALSE);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static void FONT_LogFont16To32A( const LPLOGFONT16 font16, LPLOGFONTA font32 )
|
|||
static void CFn_CHOOSEFONT16to32A(LPCHOOSEFONT16 chf16, LPCHOOSEFONTA chf32a)
|
||||
{
|
||||
chf32a->lStructSize=sizeof(CHOOSEFONTA);
|
||||
chf32a->hwndOwner=chf16->hwndOwner;
|
||||
chf32a->hwndOwner=HWND_32(chf16->hwndOwner);
|
||||
chf32a->hDC=chf16->hDC;
|
||||
chf32a->iPointSize=chf16->iPointSize;
|
||||
chf32a->Flags=chf16->Flags;
|
||||
|
@ -223,7 +223,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
|
|||
lpChFont->lpTemplateName=(SEGPTR)&cf32a;
|
||||
|
||||
ptr = GetProcAddress16(GetModuleHandle16("COMMDLG"), (LPCSTR) 16);
|
||||
hInst = GetWindowLongA(lpChFont->hwndOwner, GWL_HINSTANCE);
|
||||
hInst = GetWindowLongA(HWND_32(lpChFont->hwndOwner), GWL_HINSTANCE);
|
||||
bRet = DialogBoxIndirectParam16(hInst, hDlgTmpl16, lpChFont->hwndOwner,
|
||||
(DLGPROC16) ptr, (DWORD)lpChFont);
|
||||
if (hResource16) FreeResource16(hDlgTmpl16);
|
||||
|
@ -536,7 +536,7 @@ static INT WINAPI FontFamilyEnumProc(const LOGFONTA *lpLogFont,
|
|||
INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||
UINT16 nFontType, LPARAM lParam )
|
||||
{
|
||||
HWND16 hwnd=LOWORD(lParam);
|
||||
HWND hwnd=HWND_32(LOWORD(lParam));
|
||||
HWND hDlg=GetParent(hwnd);
|
||||
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
|
||||
LOGFONT16 *lplf = MapSL( logfont );
|
||||
|
@ -667,8 +667,8 @@ static INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType,
|
|||
INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||
UINT16 nFontType, LPARAM lParam )
|
||||
{
|
||||
HWND16 hcmb2=LOWORD(lParam);
|
||||
HWND16 hcmb3=HIWORD(lParam);
|
||||
HWND hcmb2=HWND_32(LOWORD(lParam));
|
||||
HWND hcmb3=HWND_32(HIWORD(lParam));
|
||||
HWND hDlg=GetParent(hcmb3);
|
||||
LPCHOOSEFONT16 lpcf=(LPCHOOSEFONT16)GetWindowLongA(hDlg, DWL_USER);
|
||||
LOGFONT16 *lplf = MapSL(logfont);
|
||||
|
@ -782,7 +782,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
|
|||
{
|
||||
SendDlgItemMessageA(hDlg, cmb1, CB_SETCURSEL, j, 0);
|
||||
SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
|
||||
GetDlgItem(hDlg,cmb1));
|
||||
(LPARAM)GetDlgItem(hDlg,cmb1));
|
||||
init=1;
|
||||
/* look for fitting font style in combobox2 */
|
||||
l=MAKELONG(lpxx->lfWeight > FW_MEDIUM ? FW_BOLD:FW_NORMAL,lpxx->lfItalic !=0);
|
||||
|
@ -805,7 +805,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
|
|||
{
|
||||
SendDlgItemMessageA(hDlg,cmb1,CB_SETCURSEL,0,0);
|
||||
SendMessageA(hDlg, WM_COMMAND, MAKEWPARAM(cmb1, CBN_SELCHANGE),
|
||||
GetDlgItem(hDlg,cmb1));
|
||||
(LPARAM)GetDlgItem(hDlg,cmb1));
|
||||
}
|
||||
if (lpcf->Flags & CF_USESTYLE && lpcf->lpszStyle)
|
||||
{
|
||||
|
@ -814,7 +814,7 @@ static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
|
|||
{
|
||||
j=SendDlgItemMessageA(hDlg,cmb2,CB_SETCURSEL,j,0);
|
||||
SendMessageA(hDlg,WM_COMMAND,cmb2,
|
||||
MAKELONG(GetDlgItem(hDlg,cmb2),CBN_SELCHANGE));
|
||||
MAKELONG(HWND_16(GetDlgItem(hDlg,cmb2)),CBN_SELCHANGE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -957,7 +957,7 @@ static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam,
|
|||
LPCHOOSEFONTA lpcf)
|
||||
{
|
||||
if (lpcf->Flags & CF_EFFECTS)
|
||||
if (GetDlgCtrlID(lParam)==stc6)
|
||||
if (GetDlgCtrlID(HWND_32(LOWORD(lParam)))==stc6)
|
||||
{
|
||||
SetTextColor((HDC)wParam, lpcf->rgbColors);
|
||||
return GetStockObject(WHITE_BRUSH);
|
||||
|
@ -1118,9 +1118,10 @@ static LRESULT CFn_WMDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
2. some CF_.. flags are not supported
|
||||
3. some TType extensions
|
||||
*/
|
||||
LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg16, UINT16 message,
|
||||
WPARAM16 wParam, LPARAM lParam)
|
||||
{
|
||||
HWND hDlg = HWND_32(hDlg16);
|
||||
LPCHOOSEFONT16 lpcf;
|
||||
LPCHOOSEFONTA lpcf32a;
|
||||
LRESULT res=0;
|
||||
|
@ -1130,7 +1131,7 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
|
|||
if (!lpcf)
|
||||
return FALSE;
|
||||
if (CFn_HookCallChk(lpcf))
|
||||
res=CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg,message,wParam,lParam);
|
||||
res=CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg16,message,wParam,lParam);
|
||||
if (res)
|
||||
return res;
|
||||
}
|
||||
|
@ -1144,7 +1145,7 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
|
|||
return FALSE;
|
||||
}
|
||||
if (CFn_HookCallChk(lpcf))
|
||||
return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg,WM_INITDIALOG,wParam,lParam);
|
||||
return CallWindowProc16((WNDPROC16)lpcf->lpfnHook,hDlg16,WM_INITDIALOG,wParam,lParam);
|
||||
}
|
||||
lpcf32a=(LPCHOOSEFONTA)lpcf->lpTemplateName;
|
||||
switch (message)
|
||||
|
@ -1173,7 +1174,7 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
|
|||
dis.itemID = dis16->itemID;
|
||||
dis.itemAction = dis16->itemAction;
|
||||
dis.itemState = dis16->itemState;
|
||||
dis.hwndItem = dis16->hwndItem;
|
||||
dis.hwndItem = HWND_32(dis16->hwndItem);
|
||||
dis.hDC = dis16->hDC;
|
||||
dis.itemData = dis16->itemData;
|
||||
CONV_RECT16TO32( &dis16->rcItem, &dis.rcItem );
|
||||
|
@ -1182,7 +1183,7 @@ LRESULT WINAPI FormatCharDlgProc16(HWND16 hDlg, UINT16 message, WPARAM16 wParam,
|
|||
break;
|
||||
case WM_CTLCOLOR:
|
||||
if (HIWORD(lParam) == CTLCOLOR_STATIC)
|
||||
res=CFn_WMCtlColorStatic(hDlg, (HDC)wParam, (HWND)LOWORD(lParam), lpcf32a);
|
||||
res=CFn_WMCtlColorStatic(hDlg, (HDC)wParam, LOWORD(lParam), lpcf32a);
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
res=CFn_WMCommand(hDlg, MAKEWPARAM( wParam, HIWORD(lParam) ), LOWORD(lParam), lpcf32a);
|
||||
|
|
|
@ -1726,7 +1726,7 @@ static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
|
|||
|
||||
memcpy(&pdlg,PrintStructures->dlg.lpPrintDlg16,sizeof(pdlg));
|
||||
pdlg.Flags |= PD_PRINTSETUP;
|
||||
pdlg.hwndOwner = hDlg;
|
||||
pdlg.hwndOwner = HWND_16(hDlg);
|
||||
if (!PrintDlg16(&pdlg))
|
||||
break;
|
||||
}
|
||||
|
@ -2660,7 +2660,7 @@ BOOL16 WINAPI PrintDlg16(
|
|||
) {
|
||||
BOOL bRet = FALSE;
|
||||
LPVOID ptr;
|
||||
HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
|
||||
HINSTANCE hInst = GetWindowLongA( HWND_32(lppd->hwndOwner), GWL_HINSTANCE );
|
||||
|
||||
if(TRACE_ON(commdlg)) {
|
||||
char flagstr[1000] = "";
|
||||
|
@ -2743,7 +2743,9 @@ BOOL16 WINAPI PrintDlg16(
|
|||
PrintStructures->dlg.lpPrintDlg = (LPPRINTDLGA)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(PRINTDLGA));
|
||||
#define CVAL(x) PrintStructures->dlg.lpPrintDlg->x = lppd->x;
|
||||
#define MVAL(x) PrintStructures->dlg.lpPrintDlg->x = MapSL(lppd->x);
|
||||
CVAL(Flags);CVAL(hwndOwner);CVAL(hDC);
|
||||
CVAL(Flags);
|
||||
PrintStructures->dlg.lpPrintDlg->hwndOwner = HWND_32(lppd->hwndOwner);
|
||||
CVAL(hDC);
|
||||
CVAL(nFromPage);CVAL(nToPage);CVAL(nMinPage);CVAL(nMaxPage);
|
||||
CVAL(nCopies);CVAL(hInstance);CVAL(lCustData);
|
||||
MVAL(lpPrintTemplateName);MVAL(lpSetupTemplateName);
|
||||
|
@ -3459,9 +3461,10 @@ BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
|
|||
/***********************************************************************
|
||||
* PrintDlgProc (COMMDLG.21)
|
||||
*/
|
||||
LRESULT WINAPI PrintDlgProc16(HWND16 hDlg, UINT16 uMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI PrintDlgProc16(HWND16 hDlg16, UINT16 uMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hDlg = HWND_32(hDlg16);
|
||||
PRINT_PTRA* PrintStructures;
|
||||
LRESULT res=FALSE;
|
||||
|
||||
|
@ -3477,7 +3480,7 @@ LRESULT WINAPI PrintDlgProc16(HWND16 hDlg, UINT16 uMsg, WPARAM16 wParam,
|
|||
if(PrintStructures->dlg.lpPrintDlg16->Flags & PD_ENABLEPRINTHOOK) {
|
||||
res = CallWindowProc16(
|
||||
(WNDPROC16)PrintStructures->dlg.lpPrintDlg16->lpfnPrintHook,
|
||||
hDlg, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg16
|
||||
hDlg16, uMsg, wParam, (LPARAM)PrintStructures->dlg.lpPrintDlg16
|
||||
);
|
||||
}
|
||||
return res;
|
||||
|
@ -3486,7 +3489,7 @@ LRESULT WINAPI PrintDlgProc16(HWND16 hDlg, UINT16 uMsg, WPARAM16 wParam,
|
|||
if(PrintStructures->dlg.lpPrintDlg16->Flags & PD_ENABLEPRINTHOOK) {
|
||||
res = CallWindowProc16(
|
||||
(WNDPROC16)PrintStructures->dlg.lpPrintDlg16->lpfnPrintHook,
|
||||
hDlg,uMsg, wParam, lParam
|
||||
hDlg16,uMsg, wParam, lParam
|
||||
);
|
||||
if(LOWORD(res)) return res;
|
||||
}
|
||||
|
@ -3517,9 +3520,10 @@ LRESULT WINAPI PrintDlgProc16(HWND16 hDlg, UINT16 uMsg, WPARAM16 wParam,
|
|||
/***********************************************************************
|
||||
* PrintSetupDlgProc (COMMDLG.22)
|
||||
*/
|
||||
LRESULT WINAPI PrintSetupDlgProc16(HWND16 hWnd, UINT16 wMsg, WPARAM16 wParam,
|
||||
LRESULT WINAPI PrintSetupDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
HWND hWnd = HWND_32(hWnd16);
|
||||
switch (wMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(psdrv);
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
|
@ -325,7 +327,7 @@ fwMode);
|
|||
psh.dwSize = sizeof(psh);
|
||||
psh.pszCaption = SetupW;
|
||||
psh.nPages = 1;
|
||||
psh.hwndParent = hwnd;
|
||||
psh.hwndParent = HWND_32(hwnd);
|
||||
psh.u3.phpage = hpsp;
|
||||
|
||||
pPropertySheet(&psh);
|
||||
|
@ -351,8 +353,8 @@ INT PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
|
|||
LPSTR lpszDevice, LPSTR lpszPort, LPDEVMODEA lpdmInput,
|
||||
LPSTR lpszProfile, DWORD dwMode)
|
||||
{
|
||||
return PSDRV_ExtDeviceMode16(hwnd, 0, lpdmOutput, lpszDevice, lpszPort,
|
||||
lpdmInput, lpszProfile, dwMode);
|
||||
return PSDRV_ExtDeviceMode16(HWND_16(hwnd), 0, lpdmOutput, lpszDevice,
|
||||
lpszPort, lpdmInput, lpszProfile, dwMode);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -485,7 +485,7 @@ static DWORD WINAPI _async_queryfun(LPVOID arg) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
PostMessageA(aq->hWnd,aq->uMsg,aq->async_handle,size|(fail<<16));
|
||||
PostMessageA(HWND_32(aq->hWnd),aq->uMsg,aq->async_handle,size|(fail<<16));
|
||||
HeapFree(GetProcessHeap(),0,arg);
|
||||
return 0;
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ static HANDLE16 __WSAsyncDBQuery(
|
|||
case AQ_DUPLOWPTR2: pfm = ptr2; ptr2 = pto; do *pto++ = tolower(*pfm); while (*pfm++); break;
|
||||
}
|
||||
|
||||
aq->hWnd = hWnd;
|
||||
aq->hWnd = HWND_16(hWnd);
|
||||
aq->uMsg = uMsg;
|
||||
aq->int1 = int1;
|
||||
aq->ptr1 = ptr1;
|
||||
|
@ -567,7 +567,8 @@ HANDLE16 WINAPI WSAAsyncGetHostByAddr16(HWND16 hWnd, UINT16 uMsg, LPCSTR addr,
|
|||
{
|
||||
TRACE("hwnd %04x, msg %04x, addr %08x[%i]\n",
|
||||
hWnd, uMsg, (unsigned)addr , len );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,len,addr,type,NULL,(void*)sbuf,buflen,
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,len,addr,type,NULL,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_NUMBER|AQ_COPYPTR1|AQ_WIN16|AQ_GETHOST);
|
||||
}
|
||||
|
||||
|
@ -591,7 +592,8 @@ HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
|
|||
{
|
||||
TRACE("hwnd %04x, msg %04x, host %s, buffer %i\n",
|
||||
hWnd, uMsg, (name)?name:"<null>", (int)buflen );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,(void*)sbuf,buflen,
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,NULL,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN16|AQ_GETHOST);
|
||||
}
|
||||
|
||||
|
@ -602,7 +604,7 @@ HANDLE WINAPI WSAAsyncGetHostByName(HWND hWnd, UINT uMsg, LPCSTR name,
|
|||
LPSTR sbuf, INT buflen)
|
||||
{
|
||||
TRACE("hwnd %04x, msg %08x, host %s, buffer %i\n",
|
||||
(HWND16)hWnd, uMsg, (name)?name:"<null>", (int)buflen );
|
||||
hWnd, uMsg, (name)?name:"<null>", (int)buflen );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,sbuf,buflen,
|
||||
AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN32|AQ_GETHOST);
|
||||
}
|
||||
|
@ -614,8 +616,9 @@ HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
|
|||
SEGPTR sbuf, INT16 buflen)
|
||||
{
|
||||
TRACE("hwnd %04x, msg %08x, protocol %s\n",
|
||||
(HWND16)hWnd, uMsg, (name)?name:"<null>" );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,(void*)sbuf,buflen,
|
||||
hWnd, uMsg, (name)?name:"<null>" );
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,NULL,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN16|AQ_GETPROTO);
|
||||
}
|
||||
|
||||
|
@ -626,7 +629,7 @@ HANDLE WINAPI WSAAsyncGetProtoByName(HWND hWnd, UINT uMsg, LPCSTR name,
|
|||
LPSTR sbuf, INT buflen)
|
||||
{
|
||||
TRACE("hwnd %04x, msg %08x, protocol %s\n",
|
||||
(HWND16)hWnd, uMsg, (name)?name:"<null>" );
|
||||
hWnd, uMsg, (name)?name:"<null>" );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,sbuf,buflen,
|
||||
AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN32|AQ_GETPROTO);
|
||||
}
|
||||
|
@ -639,7 +642,8 @@ HANDLE16 WINAPI WSAAsyncGetProtoByNumber16(HWND16 hWnd,UINT16 uMsg,INT16 number,
|
|||
SEGPTR sbuf, INT16 buflen)
|
||||
{
|
||||
TRACE("hwnd %04x, msg %04x, num %i\n", hWnd, uMsg, number );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,number,NULL,0,NULL,(void*)sbuf,buflen,
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,number,NULL,0,NULL,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_GETPROTO|AQ_NUMBER|AQ_WIN16);
|
||||
}
|
||||
|
||||
|
@ -662,7 +666,8 @@ HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
|
|||
{
|
||||
TRACE("hwnd %04x, msg %04x, name %s, proto %s\n",
|
||||
hWnd, uMsg, (name)?name:"<null>", (proto)?proto:"<null>");
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,0,name,0,proto,(void*)sbuf,buflen,
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,proto,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_GETSERV|AQ_NAME|AQ_DUPLOWPTR1|AQ_DUPLOWPTR2|AQ_WIN16);
|
||||
}
|
||||
|
||||
|
@ -686,7 +691,8 @@ HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 uMsg, INT16 port,
|
|||
{
|
||||
TRACE("hwnd %04x, msg %04x, port %i, proto %s\n",
|
||||
hWnd, uMsg, port, (proto)?proto:"<null>" );
|
||||
return __WSAsyncDBQuery(hWnd,uMsg,port,NULL,0,proto,(void*)sbuf,buflen,
|
||||
return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,port,NULL,0,proto,
|
||||
(void*)sbuf,buflen,
|
||||
AQ_GETSERV|AQ_NUMBER|AQ_DUPLOWPTR2|AQ_WIN16);
|
||||
}
|
||||
|
||||
|
|
|
@ -3314,7 +3314,7 @@ INT WINAPI WSAAsyncSelect(SOCKET s, HWND hWnd, UINT uMsg, LONG lEvent)
|
|||
*/
|
||||
INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent)
|
||||
{
|
||||
return (INT16)WSAAsyncSelect( s, hWnd, wMsg, lEvent );
|
||||
return (INT16)WSAAsyncSelect( s, HWND_32(hWnd), wMsg, lEvent );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -94,7 +94,7 @@ DECLARE_OLD_HANDLE(HRSRC);
|
|||
DECLARE_HANDLE(HTASK);
|
||||
DECLARE_HANDLE(HWINEVENTHOOK);
|
||||
DECLARE_HANDLE(HWINSTA);
|
||||
DECLARE_OLD_HANDLE(HWND);
|
||||
DECLARE_HANDLE(HWND);
|
||||
|
||||
/* Handle types that must remain interchangeable even with strict on */
|
||||
|
||||
|
|
|
@ -105,4 +105,7 @@ INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle);
|
|||
INT16 WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent);
|
||||
INT16 WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags);
|
||||
|
||||
#define HWND_16(h32) (LOWORD(h32))
|
||||
#define HWND_32(h16) ((HWND)(ULONG_PTR)(h16))
|
||||
|
||||
#endif /* __WINE_WINE_WINSOCK16_H */
|
||||
|
|
Loading…
Reference in New Issue