Replaced WIN_GetWindowInstance by GetWindowLongA(GWL_HINSTANCE),

removed unnecessary win.h includes, added syslevel.h to queue.c.
This commit is contained in:
Marcus Meissner 1999-05-14 18:39:37 +00:00 committed by Alexandre Julliard
parent 3b876e4040
commit d7c565f5de
11 changed files with 23 additions and 41 deletions

View File

@ -11,7 +11,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "win.h"
#include "ldt.h"
#include "heap.h"
#include "commdlg.h"
#include "resource.h"
@ -82,7 +82,7 @@ BOOL16 WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol)
win32Format = TRUE;
}
hInst = WIN_GetWindowInstance( lpChCol->hwndOwner );
hInst = GetWindowLongA( lpChCol->hwndOwner, GWL_HINSTANCE );
hwndDialog = DIALOG_CreateIndirect( hInst, template, win32Format,
lpChCol->hwndOwner,
(DLGPROC16)MODULE_GetWndProcEntry16("ColorDlgProc"),

View File

@ -11,7 +11,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "win.h"
#include "ldt.h"
#include "heap.h"
#include "message.h"
#include "commdlg.h"
@ -179,7 +179,7 @@ BOOL16 WINAPI GetOpenFileName16(
}
}
hInst = WIN_GetWindowInstance( lpofn->hwndOwner );
hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
if (!(lpofn->lpstrFilter))
{
@ -342,7 +342,7 @@ BOOL16 WINAPI GetSaveFileName16(
}
}
hInst = WIN_GetWindowInstance( lpofn->hwndOwner );
hInst = GetWindowLongA( lpofn->hwndOwner, GWL_HINSTANCE );
if (!(lpofn->lpstrFilter))
{

View File

@ -10,7 +10,7 @@
#include <string.h>
#include "winbase.h"
#include "wine/winbase16.h"
#include "win.h"
#include "ldt.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
@ -52,7 +52,7 @@ HWND16 WINAPI FindText16( SEGPTR find )
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
return FALSE;
}
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
hInst = GetWindowLongA( lpFind->hwndOwner , GWL_HINSTANCE);
return DIALOG_CreateIndirect( hInst, ptr, TRUE, lpFind->hwndOwner,
(DLGPROC16)MODULE_GetWndProcEntry16("FindTextDlgProc"),
find, WIN_PROC_16 );
@ -86,7 +86,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
return FALSE;
}
hInst = WIN_GetWindowInstance( lpFind->hwndOwner );
hInst = GetWindowLongA( lpFind->hwndOwner , GWL_HINSTANCE);
return DIALOG_CreateIndirect( hInst, ptr, TRUE, lpFind->hwndOwner,
(DLGPROC16)MODULE_GetWndProcEntry16("ReplaceTextDlgProc"),
find, WIN_PROC_16 );

View File

@ -11,7 +11,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "win.h"
#include "ldt.h"
#include "heap.h"
#include "message.h"
#include "commdlg.h"
@ -115,7 +115,7 @@ BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16 lpChFont)
win32Format = TRUE;
}
hInst = WIN_GetWindowInstance( lpChFont->hwndOwner );
hInst = GetWindowLongA( lpChFont->hwndOwner, GWL_HINSTANCE );
/* lpTemplateName is not used in the dialog */
lpTemplateName=lpChFont->lpTemplateName;
@ -141,7 +141,7 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
{
BOOL bRet=FALSE;
HWND hwndDialog;
HINSTANCE hInst=WIN_GetWindowInstance( lpChFont->hwndOwner );
HINSTANCE hInst=GetWindowLongA( lpChFont->hwndOwner, GWL_HINSTANCE );
LPCVOID template;
HANDLE hResInfo, hDlgTmpl;
@ -172,7 +172,7 @@ BOOL WINAPI ChooseFontW(LPCHOOSEFONTW lpChFont)
{
BOOL bRet=FALSE;
HWND hwndDialog;
HINSTANCE hInst=WIN_GetWindowInstance( lpChFont->hwndOwner );
HINSTANCE hInst=GetWindowLongA( lpChFont->hwndOwner, GWL_HINSTANCE );
CHOOSEFONTA cf32a;
LOGFONTA lf32a;
LPCVOID template;

View File

@ -12,7 +12,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "win.h"
#include "ldt.h"
#include "message.h"
#include "commdlg.h"
#include "resource.h"
@ -64,7 +64,7 @@ BOOL16 WINAPI PrintDlg16( SEGPTR printdlg )
return FALSE;
}
hInst = WIN_GetWindowInstance( lpPrint->hwndOwner );
hInst = GetWindowLongA( lpPrint->hwndOwner, GWL_HINSTANCE );
hwndDialog = DIALOG_CreateIndirect( hInst, template, TRUE,
lpPrint->hwndOwner,
(DLGPROC16)((lpPrint->Flags & PD_PRINTSETUP) ?
@ -126,7 +126,7 @@ BOOL WINAPI PrintDlgA(
BOOL bRet = FALSE;
LPCVOID ptr;
HANDLE hResInfo, hDlgTmpl;
HINSTANCE hInst = WIN_GetWindowInstance( lppd->hwndOwner );
HINSTANCE hInst = GetWindowLongA( lppd->hwndOwner, GWL_HINSTANCE );
DWORD EnumBytesNeeded;
DWORD CopyOfEnumBytesNeeded;
PRINT_PTRA PrintStructures;

View File

@ -12,7 +12,7 @@
#include "heap.h"
#include "resource.h"
#include "dlgs.h"
#include "win.h"
#include "ldt.h"
#include "sysmetrics.h"
#include "debugtools.h"
#include "winreg.h"
@ -878,7 +878,7 @@ BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
info.szOtherStuff = szOtherStuff;
info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIcon16( 0, MAKEINTRESOURCE16(OIC_WINEICON) );
return DialogBoxIndirectParamA( WIN_GetWindowInstance( hWnd ),
return DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ),
template, hWnd, AboutDlgProc, (LPARAM)&info );
}
@ -904,7 +904,7 @@ BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
info.szOtherStuff = HEAP_strdupWtoA( GetProcessHeap(), 0, szOtherStuff );
info.hIcon = hIcon;
if (!hIcon) info.hIcon = LoadIcon16( 0, MAKEINTRESOURCE16(OIC_WINEICON) );
ret = DialogBoxIndirectParamA( WIN_GetWindowInstance( hWnd ),
ret = DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ),
template, hWnd, AboutDlgProc, (LPARAM)&info );
HeapFree( GetProcessHeap(), 0, (LPSTR)info.szApp );
HeapFree( GetProcessHeap(), 0, (LPSTR)info.szOtherStuff );

View File

@ -136,7 +136,7 @@ LRESULT WINAPI PSDRV_AdvancedSetupDlgProc(HWND hWnd, UINT wMsg,
return TRUE;
case 200:
DialogBoxIndirectParamA( WIN_GetWindowInstance( hWnd ),
DialogBoxIndirectParamA( GetWindowLongA( hWnd, GWL_HINSTANCE ),
SYSRES_GetResPtr( SYSRES_DIALOG_PSDRV_NEWPRINTER ),
hWnd, PSDRV_NewPrinterDlgProc, (LPARAM) NULL );
return TRUE;
@ -166,7 +166,7 @@ WORD WINAPI PSDRV_AdvancedSetupDialog16(HWND16 hwnd, HANDLE16 hDriver,
#if 0
return DialogBoxIndirectParamA( WIN_GetWindowInstance( hwnd ),
return DialogBoxIndirectParamA( GetWindowLongA( hwnd, GWL_HINSTANCE ),
SYSRES_GetResPtr( SYSRES_DIALOG_PSDRV_ADVANCEDSETUP ),
hwnd, PSDRV_AdvancedSetupDlgProc, (LPARAM) NULL );
#endif

View File

@ -185,7 +185,6 @@ extern BOOL WIN_CreateDesktopWindow(void);
extern HWND WIN_GetTopParent( HWND hwnd );
extern WND* WIN_GetTopParentPtr( WND* pWnd );
extern BOOL WIN_IsWindowDrawable(WND*, BOOL );
extern HINSTANCE WIN_GetWindowInstance( HWND hwnd );
extern WND** WIN_BuildWinArray( WND *wndPtr, UINT bwa, UINT* pnum );
extern void WIN_ReleaseWinArray(WND **wndArray);

View File

@ -8,10 +8,7 @@
#include "wine/winuser16.h"
#include "dlgs.h"
#include "heap.h"
#include "module.h"
#include "win.h"
#include "resource.h"
#include "task.h"
#include "ldt.h"
#include "debug.h"
#include "debugstr.h"
#include "tweak.h"
@ -234,7 +231,7 @@ INT WINAPI MessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type)
mbox.lpszCaption = title;
mbox.lpszText = text;
mbox.dwStyle = type;
return DialogBoxIndirectParamA( WIN_GetWindowInstance(hWnd), template,
return DialogBoxIndirectParamA( GetWindowLongA(hWnd,GWL_HINSTANCE), template,
hWnd, (DLGPROC)MSGBOX_DlgProc, (LPARAM)&mbox );
}

View File

@ -8,6 +8,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "miscemu.h"
#include "syslevel.h"
#include "module.h"
#include "queue.h"
#include "task.h"

View File

@ -1854,21 +1854,6 @@ end:
return retvalue;
}
/**********************************************************************
* WIN_GetWindowInstance
*/
HINSTANCE WIN_GetWindowInstance( HWND hwnd )
{
WND * wndPtr = WIN_FindWndPtr( hwnd );
if (!wndPtr) return (HINSTANCE)0;
WIN_ReleaseWndPtr(wndPtr);
return wndPtr->hInstance;
}
/**********************************************************************
* SetWindowWord16 (USER.134)
*/