diff --git a/reactos/dll/win32/user32/controls/edit.c b/reactos/dll/win32/user32/controls/edit.c index fc9b98464b0..b020ef64856 100644 --- a/reactos/dll/win32/user32/controls/edit.c +++ b/reactos/dll/win32/user32/controls/edit.c @@ -171,7 +171,7 @@ typedef struct /* * These functions have trivial implementations * We still like to call them internally - * "static inline" makes them more like macro's + * "static __inline" makes them more like macro's */ static __inline BOOL EDIT_EM_CanUndo(EDITSTATE *es); static __inline void EDIT_EM_EmptyUndoBuffer(EDITSTATE *es); @@ -402,14 +402,14 @@ static DWORD get_app_version(void) return version; } -static inline UINT get_text_length(EDITSTATE *es) +static __inline UINT get_text_length(EDITSTATE *es) { if(es->text_length == (UINT)-1) es->text_length = strlenW(es->text); return es->text_length; } -static inline void text_buffer_changed(EDITSTATE *es) +static __inline void text_buffer_changed(EDITSTATE *es) { es->text_length = (UINT)-1; } diff --git a/reactos/dll/win32/user32/controls/listbox.c b/reactos/dll/win32/user32/controls/listbox.c index efcf88d7404..9f0f8a67b30 100644 --- a/reactos/dll/win32/user32/controls/listbox.c +++ b/reactos/dll/win32/user32/controls/listbox.c @@ -894,7 +894,7 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL } } -static inline INT LISTBOX_lstrcmpiW( LCID lcid, LPCWSTR str1, LPCWSTR str2 ) +static __inline INT LISTBOX_lstrcmpiW( LCID lcid, LPCWSTR str1, LPCWSTR str2 ) { INT ret = CompareStringW( lcid, NORM_IGNORECASE, str1, -1, str2, -1 ); if (ret == CSTR_LESS_THAN) diff --git a/reactos/dll/win32/user32/include/dde_private.h b/reactos/dll/win32/user32/include/dde_private.h index e02d2283830..bf66d612cd8 100644 --- a/reactos/dll/win32/user32/include/dde_private.h +++ b/reactos/dll/win32/user32/include/dde_private.h @@ -243,7 +243,7 @@ extern void WDML_BroadcastDDEWindows(LPCWSTR clsName, UINT uMsg, WPARAM wParam, LPARAM lParam); extern void WDML_NotifyThreadExit(DWORD tid); -static inline void WDML_ExtractAck(WORD status, DDEACK* da) +static __inline void WDML_ExtractAck(WORD status, DDEACK* da) { *da = *((DDEACK*)&status); } diff --git a/reactos/dll/win32/user32/include/user32.h b/reactos/dll/win32/user32/include/user32.h index 54c385e2a97..91e44684598 100644 --- a/reactos/dll/win32/user32/include/user32.h +++ b/reactos/dll/win32/user32/include/user32.h @@ -23,6 +23,7 @@ #include #include #include +#include /* CSRSS Headers */ #include @@ -38,6 +39,9 @@ /* Internal User32 Headers */ #include "user32p.h" +#include +#include + /* FIXME: Use ntgdi.h then cleanup... */ HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj); BOOL STDCALL NtGdiPatBlt(HDC hdcDst, INT x, INT y, INT cx, INT cy, DWORD rop4); diff --git a/reactos/dll/win32/user32/misc/resources.c b/reactos/dll/win32/user32/misc/resources.c index eb7e6fa025b..2a1f5fc9168 100644 --- a/reactos/dll/win32/user32/misc/resources.c +++ b/reactos/dll/win32/user32/misc/resources.c @@ -9,8 +9,8 @@ #define CR_INVALID_DATA 0x0000001F #endif -typedef DWORD STDCALL (*CMP_REGNOTIFY) (HANDLE, LPVOID, DWORD, PULONG); -typedef DWORD STDCALL (*CMP_UNREGNOTIFY) (ULONG ); +typedef DWORD (STDCALL *CMP_REGNOTIFY) (HANDLE, LPVOID, DWORD, PULONG); +typedef DWORD (STDCALL *CMP_UNREGNOTIFY) (ULONG ); /* FIXME: Currently IsBadWritePtr is implemented using VirtualQuery which does not seem to work properly for stack address space. */ diff --git a/reactos/dll/win32/user32/windows/defwnd.c b/reactos/dll/win32/user32/windows/defwnd.c index 0fced4bbb4f..3b350fc3eac 100644 --- a/reactos/dll/win32/user32/windows/defwnd.c +++ b/reactos/dll/win32/user32/windows/defwnd.c @@ -1000,17 +1000,22 @@ VOID FASTCALL DefWndScreenshot(HWND hWnd) { RECT rect; + HDC hdc; + INT w; + INT h; + HBITMAP hbitmap; + HDC hdc2; OpenClipboard(hWnd); EmptyClipboard(); - HDC hdc = GetWindowDC(hWnd); + hdc = GetWindowDC(hWnd); GetWindowRect(hWnd, &rect); - INT w = rect.right - rect.left; - INT h = rect.bottom - rect.top; + w = rect.right - rect.left; + h = rect.bottom - rect.top; - HBITMAP hbitmap = CreateCompatibleBitmap(hdc, w, h); - HDC hdc2 = CreateCompatibleDC(hdc); + hbitmap = CreateCompatibleBitmap(hdc, w, h); + hdc2 = CreateCompatibleDC(hdc); SelectObject(hdc2, hbitmap); BitBlt(hdc2, 0, 0, w, h, diff --git a/reactos/dll/win32/user32/windows/spy.c b/reactos/dll/win32/user32/windows/spy.c index f8c9661395c..7197646410d 100644 --- a/reactos/dll/win32/user32/windows/spy.c +++ b/reactos/dll/win32/user32/windows/spy.c @@ -1916,7 +1916,7 @@ static int indent_tls_index; /*********************************************************************** * get_indent_level */ -inline static INT_PTR get_indent_level(void) +__inline static INT_PTR get_indent_level(void) { return (INT_PTR)TlsGetValue( indent_tls_index ); } @@ -1925,7 +1925,7 @@ inline static INT_PTR get_indent_level(void) /*********************************************************************** * set_indent_level */ -inline static void set_indent_level( INT_PTR level ) +__inline static void set_indent_level( INT_PTR level ) { TlsSetValue( indent_tls_index, (void *)level ); } diff --git a/reactos/dll/win32/user32/windows/window.c b/reactos/dll/win32/user32/windows/window.c index f63710a5d2c..a340ccfe90c 100644 --- a/reactos/dll/win32/user32/windows/window.c +++ b/reactos/dll/win32/user32/windows/window.c @@ -277,6 +277,7 @@ CreateWindowExA(DWORD dwExStyle, { POINT mPos[2]; UINT id = 0; + HWND top_child; /* lpParams of WM_[NC]CREATE is different for MDI children. * MDICREATESTRUCT members have the originally passed values. @@ -309,7 +310,7 @@ CreateWindowExA(DWORD dwExStyle, WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX); } - HWND top_child = GetWindow(hWndParent, GW_CHILD); + top_child = GetWindow(hWndParent, GW_CHILD); if (top_child) { @@ -382,6 +383,7 @@ CreateWindowExW(DWORD dwExStyle, { POINT mPos[2]; UINT id = 0; + HWND top_child; /* lpParams of WM_[NC]CREATE is different for MDI children. * MDICREATESTRUCT members have the originally passed values. @@ -414,7 +416,7 @@ CreateWindowExW(DWORD dwExStyle, WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX); } - HWND top_child = GetWindow(hWndParent, GW_CHILD); + top_child = GetWindow(hWndParent, GW_CHILD); if (top_child) {