Commit a7f8195b authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

include: The PSDK does not have the A/W variants of MAKEINTATOM() so we should not either.

parent b1602267
......@@ -77,8 +77,8 @@ static LRESULT CALLBACK subclass_proc ## N (HWND wnd, UINT msg, \
{ \
LRESULT result; \
ULONG_PTR refData; \
SetPropW (wnd, MAKEINTATOMW (atSubclassProp), (HANDLE)N); \
refData = (ULONG_PTR)GetPropW (wnd, MAKEINTATOMW (atRefDataProp)); \
SetPropW (wnd, (LPCWSTR)MAKEINTATOM(atSubclassProp), (HANDLE)N); \
refData = (ULONG_PTR)GetPropW (wnd, (LPCWSTR)MAKEINTATOM(atRefDataProp)); \
TRACE ("%d; (%p, %x, %x, %lx, %lx)\n", N, wnd, msg, wParam, lParam, \
refData); \
result = subclasses[N].subclassProc (wnd, msg, wParam, lParam, refData);\
......@@ -173,7 +173,7 @@ void THEMING_Uninitialize (void)
*/
LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
INT_PTR subclass = (INT_PTR)GetPropW (wnd, MAKEINTATOMW (atSubclassProp));
INT_PTR subclass = (INT_PTR)GetPropW (wnd, (LPCWSTR)MAKEINTATOM(atSubclassProp));
WNDPROC oldProc = originalProcs[subclass];
return CallWindowProcW (oldProc, wnd, msg, wParam, lParam);
}
......@@ -185,5 +185,5 @@ LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lPa
*/
void THEMING_SetSubclassData (HWND wnd, ULONG_PTR refData)
{
SetPropW (wnd, MAKEINTATOMW (atRefDataProp), (HANDLE)refData);
SetPropW (wnd, (LPCWSTR)MAKEINTATOM(atRefDataProp), (HANDLE)refData);
}
......@@ -570,7 +570,7 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
{
ATOM atom = HIWORD(className) ? GlobalFindAtomA( className ) : LOWORD(className);
return UnregisterClassW( MAKEINTATOMW(atom), hInstance );
return UnregisterClassW( (LPCWSTR)MAKEINTATOM(atom), hInstance );
}
/***********************************************************************
......
......@@ -25,13 +25,11 @@
#include "wine/winbase16.h"
/* Built-in class names (see _Undocumented_Windows_ p.418) */
#define POPUPMENU_CLASS_ATOMA MAKEINTATOMA(32768) /* PopupMenu */
#define POPUPMENU_CLASS_ATOMW MAKEINTATOMW(32768) /* PopupMenu */
#define DESKTOP_CLASS_ATOM MAKEINTATOMA(32769) /* Desktop */
#define DIALOG_CLASS_ATOMA MAKEINTATOMA(32770) /* Dialog */
#define DIALOG_CLASS_ATOMW MAKEINTATOMW(32770) /* Dialog */
#define WINSWITCH_CLASS_ATOM MAKEINTATOMA(32771) /* WinSwitch */
#define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
#define POPUPMENU_CLASS_ATOM MAKEINTATOM(32768) /* PopupMenu */
#define DESKTOP_CLASS_ATOM MAKEINTATOM(32769) /* Desktop */
#define DIALOG_CLASS_ATOM MAKEINTATOM(32770) /* Dialog */
#define WINSWITCH_CLASS_ATOM MAKEINTATOM(32771) /* WinSwitch */
#define ICONTITLE_CLASS_ATOM MAKEINTATOM(32772) /* IconTitle */
/* Built-in class descriptor */
struct builtin_class_descr
......
......@@ -46,7 +46,7 @@ static LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LP
*/
const struct builtin_class_descr DESKTOP_builtin_class =
{
DESKTOP_CLASS_ATOM, /* name */
(LPCSTR)DESKTOP_CLASS_ATOM, /* name */
CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */
DesktopWndProc, /* procW */
......
......@@ -95,7 +95,7 @@ typedef struct
*/
const struct builtin_class_descr DIALOG_builtin_class =
{
DIALOG_CLASS_ATOMA, /* name */
(LPCSTR)DIALOG_CLASS_ATOM, /* name */
CS_SAVEBITS | CS_DBLCLKS, /* style */
DefDlgProcA, /* procA */
DefDlgProcW, /* procW */
......@@ -400,7 +400,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
switch(GET_WORD(p))
{
case 0x0000:
result->className = DIALOG_CLASS_ATOMW;
result->className = (LPCWSTR)DIALOG_CLASS_ATOM;
p++;
break;
case 0xffff:
......
......@@ -249,7 +249,7 @@ static LPCSTR DIALOG_ParseTemplate16( LPCSTR p, DLG_TEMPLATE * result )
result->className = p;
TRACE(" CLASS '%s'\n", result->className );
}
else result->className = DIALOG_CLASS_ATOMA;
else result->className = (LPCSTR)DIALOG_CLASS_ATOM;
p += strlen(p) + 1;
/* Get the window caption */
......
......@@ -45,7 +45,7 @@ static LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPAR
*/
const struct builtin_class_descr ICONTITLE_builtin_class =
{
ICONTITLE_CLASS_ATOM, /* name */
(LPCSTR)ICONTITLE_CLASS_ATOM, /* name */
0, /* style */
NULL, /* procA (winproc is Unicode only) */
IconTitleWndProc, /* procW */
......@@ -67,11 +67,11 @@ HWND ICONTITLE_Create( HWND owner )
if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
style | WS_CHILD, 0, 0, 1, 1,
GetParent(owner), 0, instance, NULL );
else
hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
style, 0, 0, 1, 1,
owner, 0, instance, NULL );
WIN_SetOwner( hWnd, owner ); /* MDI depends on this */
......
......@@ -189,7 +189,7 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO
*/
const struct builtin_class_descr MENU_builtin_class =
{
POPUPMENU_CLASS_ATOMA, /* name */
(LPCSTR)POPUPMENU_CLASS_ATOM, /* name */
CS_DROPSHADOW | CS_SAVEBITS | CS_DBLCLKS, /* style */
NULL, /* procA (winproc is Unicode only) */
PopupMenuWndProc, /* procW */
......@@ -1826,7 +1826,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
if( y < info.rcWork.top ) y = info.rcWork.top;
/* NOTE: In Windows, top menu popup is not owned. */
menu->hWnd = CreateWindowExW( 0, POPUPMENU_CLASS_ATOMW, NULL,
menu->hWnd = CreateWindowExW( 0, (LPCWSTR)POPUPMENU_CLASS_ATOM, NULL,
WS_POPUP, x, y, width, height,
hwndOwner, 0, (HINSTANCE)GetWindowLongPtrW(hwndOwner, GWLP_HINSTANCE),
(LPVOID)hmenu );
......
......@@ -2037,7 +2037,7 @@ static void SPY_GetClassName( SPY_INSTANCE *sp_e )
/* save and restore error code over the next call */
save_error = GetLastError();
/* special code to detect a property sheet dialog */
if ((GetClassLongW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOGW) &&
if ((GetClassLongW(sp_e->msg_hwnd, GCW_ATOM) == WC_DIALOG) &&
(GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) {
strcpyW(sp_e->wnd_class, WC_PROPSHEETW);
}
......
......@@ -1961,7 +1961,7 @@ static void test_window_tree(HWND parent, const DWORD *style, const int *order,
{
if (style[i] & DS_CONTROL)
{
child[i] = CreateWindowExA(0, MAKEINTATOMA(32770), "", style[i] & ~WS_VISIBLE,
child[i] = CreateWindowExA(0, MAKEINTATOM(32770), "", style[i] & ~WS_VISIBLE,
0,0,0,0, parent, (HMENU)i, 0, NULL);
if (style[i] & WS_VISIBLE)
ShowWindow(child[i], SW_SHOW);
......
......@@ -54,7 +54,7 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
HRESULT hr;
TRACE("(%p,0x%08x\n", hwnd, dwFlags);
hr = SetPropW (hwnd, MAKEINTATOMW (atDialogThemeEnabled),
hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
(HANDLE)(dwFlags|0x80000000));
/* 0x80000000 serves as a "flags set" flag */
if (FAILED(hr))
......@@ -75,7 +75,7 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
TRACE("(%p)\n", hwnd);
dwDialogTextureFlags = (DWORD)GetPropW (hwnd,
MAKEINTATOMW (atDialogThemeEnabled));
(LPCWSTR)MAKEINTATOM(atDialogThemeEnabled));
if (dwDialogTextureFlags == 0)
/* Means EnableThemeDialogTexture wasn't called for this dialog */
return TRUE;
......
......@@ -606,13 +606,13 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
*/
HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
{
ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, MAKEINTATOMW(aProp));
ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
if(oldValue)
DeleteAtom(oldValue);
if(pszValue) {
ATOM atValue = AddAtomW(pszValue);
if(!atValue
|| !SetPropW(hwnd, MAKEINTATOMW(aProp), (LPWSTR)MAKEINTATOMW(atValue))) {
|| !SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue))) {
HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
if(atValue) DeleteAtom(atValue);
return hr;
......@@ -623,7 +623,7 @@ HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
{
ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, MAKEINTATOMW(aProp));
ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
if(atValue) {
if(GetAtomNameW(atValue, pszBuffer, dwLen))
return pszBuffer;
......@@ -656,7 +656,7 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList);
}
if(IsWindow(hwnd))
SetPropW(hwnd, MAKEINTATOMW(atWindowTheme), hTheme);
SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme);
TRACE(" = %p\n", hTheme);
return hTheme;
}
......@@ -675,7 +675,7 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
{
TRACE("(%p)\n", hwnd);
return GetPropW(hwnd, MAKEINTATOMW(atWindowTheme));
return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
}
/***********************************************************************
......
......@@ -454,9 +454,12 @@ typedef struct _PROCESS_HEAP_ENTRY
#define INVALID_ATOM ((ATOM)0)
#define MAXINTATOM 0xc000
#define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
#define MAKEINTATOM WINELIB_NAME_AW(MAKEINTATOM)
#ifdef __WINESRC__
/* force using a cast when inside Wine */
#define MAKEINTATOM(atom) ((ULONG_PTR)((WORD)(atom)))
#else
#define MAKEINTATOM(atom) ((LPTSTR)((ULONG_PTR)((WORD)(atom))))
#endif
typedef struct tagMEMORYSTATUS
{
......
......@@ -1439,9 +1439,7 @@ typedef struct tagSTYLESTRUCT {
DWORD styleNew;
} STYLESTRUCT, *LPSTYLESTRUCT;
#define WC_DIALOGA MAKEINTATOMA(0x8002)
#define WC_DIALOGW MAKEINTATOMW(0x8002)
#define WC_DIALOG WINELIB_NAME_AW(WC_DIALOG)
#define WC_DIALOG MAKEINTATOM(0x8002)
/* Offsets for GetWindowLong() and GetWindowWord() */
#define GWL_EXSTYLE (-20)
......
......@@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(explorer);
#define DESKTOP_CLASS_ATOM MAKEINTATOMW(32769)
#define DESKTOP_CLASS_ATOM ((LPCWSTR)MAKEINTATOM(32769))
#define DESKTOP_ALL_ACCESS 0x01ff
static BOOL using_root;
......
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