-/* $Id: scrollbar.c,v 1.15 2003/09/12 12:54:26 weiden Exp $
+/* $Id: scrollbar.c,v 1.16 2003/09/13 13:58:38 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
SCROLLINFO si;
if(!lpsi ||
- ((lpsi->cbSize != sizeof(SCROLLINFO)) && (lpsi->cbSize != sizeof(SCROLLINFO))))
+ ((lpsi->cbSize != sizeof(SCROLLINFO)) && (lpsi->cbSize != sizeof(SCROLLINFO) - sizeof(si.nTrackPos))))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
{
SCROLLINFO si;
- if(!lpsi)
+ if(!lpsi ||
+ ((lpsi->cbSize != sizeof(SCROLLINFO)) && (lpsi->cbSize != sizeof(SCROLLINFO) - sizeof(si.nTrackPos))))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: messagebox.c,v 1.17 2003/08/30 18:38:08 weiden Exp $
+/* $Id: messagebox.c,v 1.18 2003/09/13 13:58:38 weiden Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/messagebox.c
static HWND MSGBOX_CreateButton(HWND hwnd, LONG ID, LPWSTR Caption)
{
- HWND btn = CreateWindowExW(0, L"BUTTON", Caption, WS_CHILD | WS_TABSTOP | WS_VISIBLE,
- 0, 0, 10, 10, hwnd, 0, 0, NULL);
- if(btn)
- {
- SetWindowLongW(btn, GWL_ID, ID);
- }
- return btn;
+ return CreateWindowExW(0, L"BUTTON", Caption, WS_CHILD | WS_TABSTOP | WS_VISIBLE,
+ 0, 0, 10, 10, hwnd, (HMENU)ID, 0, NULL);
}
static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMS lpmb)
-/* $Id: window.c,v 1.71 2003/08/28 13:38:23 gvg Exp $
+/* $Id: window.c,v 1.72 2003/09/13 13:58:38 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
}
}
- if(!hMenu)
+ if(!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
{
wce.cbSize = sizeof(WNDCLASSEXA);
if(GetClassInfoExA(hInstance, lpClassName, &wce) && wce.lpszMenuName)
}
}
- if(!hMenu)
+ if(!hMenu && (dwStyle & (WS_OVERLAPPEDWINDOW | WS_POPUP)))
{
wce.cbSize = sizeof(WNDCLASSEXW);
if(GetClassInfoExW(hInstance, lpClassName, &wce) && wce.lpszMenuName)
DWORD ContextHelpId;
/* Parent window handle. */
HWND ParentHandle;
- /* Window menu handle. */
- HMENU Menu;
/* system menu handle. */
HMENU SystemMenu;
/* Handle of the module that created the window. */
HANDLE Self;
/* Window flags. */
ULONG Flags;
- /* FIXME: Don't know. */
+ /* Window menu handle or window id */
UINT IDMenu;
/* Handle of region of the window to be updated. */
HANDLE UpdateRegion;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: menu.c,v 1.29 2003/08/28 10:39:44 weiden Exp $
+/* $Id: menu.c,v 1.30 2003/09/13 13:58:38 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
SetLastWin32Error(ERROR_INVALID_MENU_HANDLE);
return res;
}
- if(WindowObject->Menu == hmenu)
+ if(WindowObject->IDMenu == (UINT)hmenu)
{
ExAcquireFastMutexUnsafe(&MenuObject->MenuItemsLock);
res = IntHiliteMenuItem(WindowObject, MenuObject, uItemHilite, uHilite);
-/* $Id: misc.c,v 1.16 2003/09/12 12:54:26 weiden Exp $
+/* $Id: misc.c,v 1.17 2003/09/13 13:58:38 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
return FALSE;
}
- Result = (DWORD)WindowObject->Menu;
+ Result = (DWORD)WindowObject->IDMenu;
IntReleaseWindowObject(WindowObject);
return Result;
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: window.c,v 1.107 2003/09/07 09:55:52 weiden Exp $
+/* $Id: window.c,v 1.108 2003/09/13 13:58:38 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
WindowObject->Height = Height;
WindowObject->ParentHandle = NULL;
WindowObject->Parent = NULL;
- WindowObject->Menu = NULL;
+ WindowObject->IDMenu = 0;
WindowObject->Instance = NULL;
WindowObject->Parameters = NULL;
WindowObject->Self = Handle;
if (!(Wnd->Style & WS_CHILD))
{
//if ( Wnd->Menu ) DestroyMenu ( Wnd->menu );
- Wnd->Menu = NULL;
+ Wnd->IDMenu = 0;
}
}
}
WindowObject->Height = nHeight;
WindowObject->ContextHelpId = 0;
WindowObject->ParentHandle = hWndParent;
- WindowObject->Menu = hMenu;
+ WindowObject->IDMenu = (UINT)hMenu;
if(SystemMenu)
WindowObject->SystemMenu = SystemMenu->Self;
else
return FALSE;
}
- WindowObject->Menu = hMenu;
+ WindowObject->IDMenu = (UINT)hMenu;
IntReleaseMenuObject(MenuObject);
}
else
{
/* remove the menu handle */
- WindowObject->Menu = 0;
+ WindowObject->IDMenu = 0;
}
IntReleaseWindowObject(WindowObject);