mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
added builtin PopupMenu window class
svn path=/trunk/; revision=5585
This commit is contained in:
parent
898e3104f1
commit
946116f8d4
3 changed files with 37 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: regcontrol.h,v 1.3 2003/06/25 23:59:43 sedwards Exp $
|
/* $Id: regcontrol.h,v 1.4 2003/08/15 15:12:14 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS User32
|
* PROJECT: ReactOS User32
|
||||||
|
@ -11,6 +11,9 @@
|
||||||
#ifndef ROS_REGCONTROL_H
|
#ifndef ROS_REGCONTROL_H
|
||||||
#define ROS_REGCONTROL_H
|
#define ROS_REGCONTROL_H
|
||||||
|
|
||||||
|
#define IS_ATOM(x) \
|
||||||
|
(((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
|
||||||
|
|
||||||
/* Built-in class names (see _Undocumented_Windows_ p.418) */
|
/* Built-in class names (see _Undocumented_Windows_ p.418) */
|
||||||
#define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
|
#define ICONTITLE_CLASS_ATOM MAKEINTATOMA(32772) /* IconTitle */
|
||||||
|
|
||||||
|
@ -32,6 +35,7 @@ extern const struct builtin_class_descr BUTTON_builtin_class;
|
||||||
extern const struct builtin_class_descr COMBO_builtin_class;
|
extern const struct builtin_class_descr COMBO_builtin_class;
|
||||||
extern const struct builtin_class_descr COMBOLBOX_builtin_class;
|
extern const struct builtin_class_descr COMBOLBOX_builtin_class;
|
||||||
extern const struct builtin_class_descr DIALOG_builtin_class;
|
extern const struct builtin_class_descr DIALOG_builtin_class;
|
||||||
|
extern const struct builtin_class_descr POPUPMENU_builtin_class;
|
||||||
extern const struct builtin_class_descr DESKTOP_builtin_class;
|
extern const struct builtin_class_descr DESKTOP_builtin_class;
|
||||||
extern const struct builtin_class_descr EDIT_builtin_class;
|
extern const struct builtin_class_descr EDIT_builtin_class;
|
||||||
extern const struct builtin_class_descr ICONTITLE_builtin_class;
|
extern const struct builtin_class_descr ICONTITLE_builtin_class;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: regcontrol.c,v 1.8 2003/08/15 02:51:53 silverblade Exp $
|
/* $Id: regcontrol.c,v 1.9 2003/08/15 15:12:14 weiden Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS User32
|
* PROJECT: ReactOS User32
|
||||||
|
@ -27,8 +27,13 @@ static void RegisterBuiltinClass(const struct builtin_class_descr *Descr)
|
||||||
wca.cbClsExtra = 0;
|
wca.cbClsExtra = 0;
|
||||||
wca.cbWndExtra = Descr->extra;
|
wca.cbWndExtra = Descr->extra;
|
||||||
|
|
||||||
DbgPrint("Registering built-in class %s\n", wca.lpszClassName);
|
#if 1
|
||||||
|
if(IS_ATOM(wca.lpszClassName))
|
||||||
|
DbgPrint("Registering built-in class atom=0x%x\n", wca.lpszClassName);
|
||||||
|
else
|
||||||
|
DbgPrint("Registering built-in class %s\n", wca.lpszClassName);
|
||||||
DbgPrint("RegisterClassA = %d\n", RegisterClassA(&wca));
|
DbgPrint("RegisterClassA = %d\n", RegisterClassA(&wca));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -41,7 +46,8 @@ void ControlsInit(void)
|
||||||
DbgPrint("ControlsInit()\n");
|
DbgPrint("ControlsInit()\n");
|
||||||
|
|
||||||
RegisterBuiltinClass(&BUTTON_builtin_class);
|
RegisterBuiltinClass(&BUTTON_builtin_class);
|
||||||
// RegisterBuiltinClass(&DIALOG_builtin_class);
|
RegisterBuiltinClass(&DIALOG_builtin_class);
|
||||||
|
RegisterBuiltinClass(&POPUPMENU_builtin_class);
|
||||||
#if 0
|
#if 0
|
||||||
RegisterBuiltinClass(&COMBO_builtin_class);
|
RegisterBuiltinClass(&COMBO_builtin_class);
|
||||||
RegisterBuiltinClass(&COMBOLBOX_builtin_class);
|
RegisterBuiltinClass(&COMBOLBOX_builtin_class);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: menu.c,v 1.23 2003/08/09 14:25:07 chorns Exp $
|
/* $Id: menu.c,v 1.24 2003/08/15 15:12:14 weiden Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/menu.c
|
* FILE: lib/user32/windows/menu.c
|
||||||
|
@ -36,6 +36,9 @@
|
||||||
#include <window.h>
|
#include <window.h>
|
||||||
#include <strpool.h>
|
#include <strpool.h>
|
||||||
|
|
||||||
|
#include "user32/regcontrol.h"
|
||||||
|
#include "../controls/controls.h"
|
||||||
|
|
||||||
/* TYPES *********************************************************************/
|
/* TYPES *********************************************************************/
|
||||||
|
|
||||||
#define MENU_TYPE_MASK ((MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
|
#define MENU_TYPE_MASK ((MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
|
||||||
|
@ -47,10 +50,6 @@
|
||||||
#define SEPARATOR_HEIGHT (5)
|
#define SEPARATOR_HEIGHT (5)
|
||||||
#define MENU_TAB_SPACE (8)
|
#define MENU_TAB_SPACE (8)
|
||||||
|
|
||||||
#define MENU_MAGIC (0x554D)
|
|
||||||
|
|
||||||
#define NO_SELECTED_ITEM (0xffff)
|
|
||||||
|
|
||||||
#ifndef MF_END
|
#ifndef MF_END
|
||||||
#define MF_END (0x0080)
|
#define MF_END (0x0080)
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,6 +58,25 @@
|
||||||
#define MIIM_STRING (0x00000040)
|
#define MIIM_STRING (0x00000040)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MAKEINTATOMA(atom) ((LPCSTR)((ULONG_PTR)((WORD)(atom))))
|
||||||
|
#define MAKEINTATOMW(atom) ((LPCWSTR)((ULONG_PTR)((WORD)(atom))))
|
||||||
|
#define POPUPMENU_CLASS_ATOMA MAKEINTATOMA(32768) /* PopupMenu */
|
||||||
|
#define POPUPMENU_CLASS_ATOMW MAKEINTATOMW(32768) /* PopupMenu */
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* PopupMenu class descriptor
|
||||||
|
*/
|
||||||
|
const struct builtin_class_descr POPUPMENU_builtin_class =
|
||||||
|
{
|
||||||
|
POPUPMENU_CLASS_ATOMA, /* name */
|
||||||
|
CS_GLOBALCLASS | CS_SAVEBITS | CS_DBLCLKS, /* style */
|
||||||
|
(WNDPROC) NULL, /* FIXME - procA */
|
||||||
|
(WNDPROC) NULL, /* FIXME - procW */
|
||||||
|
sizeof(MENUINFO *), /* extra */
|
||||||
|
(LPCSTR) IDC_ARROW, /* cursor */
|
||||||
|
(HBRUSH)COLOR_MENU /* brush */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* INTERNAL FUNCTIONS ********************************************************/
|
/* INTERNAL FUNCTIONS ********************************************************/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue