mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
changed registering builtin classes to unicode
svn path=/trunk/; revision=5586
This commit is contained in:
parent
946116f8d4
commit
f916e75837
9 changed files with 46 additions and 48 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: regcontrol.h,v 1.4 2003/08/15 15:12:14 weiden Exp $
|
||||
/* $Id: regcontrol.h,v 1.5 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User32
|
||||
|
@ -20,12 +20,11 @@
|
|||
/* Built-in class descriptor */
|
||||
struct builtin_class_descr
|
||||
{
|
||||
LPCSTR name; /* class name */
|
||||
LPCWSTR name; /* class name */
|
||||
UINT style; /* class style */
|
||||
WNDPROC procA; /* ASCII window procedure */
|
||||
WNDPROC procW; /* Unicode window procedure */
|
||||
INT extra; /* window extra bytes */
|
||||
LPCSTR cursor; /* cursor name */
|
||||
LPCWSTR cursor; /* cursor name */
|
||||
HBRUSH brush; /* brush or system color */
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: button.c,v 1.7 2003/08/15 02:51:53 silverblade Exp $
|
||||
/* $Id: button.c,v 1.8 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User32
|
||||
|
@ -36,7 +36,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action );
|
|||
static void UB_Paint( HWND hwnd, HDC hDC, UINT action );
|
||||
static void OB_Paint( HWND hwnd, HDC hDC, UINT action );
|
||||
static void BUTTON_CheckAutoRadioButton( HWND hwnd );
|
||||
static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
// static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
#define MAX_BTN_TYPE 12
|
||||
|
@ -84,12 +84,11 @@ static WORD checkBoxWidth = 0, checkBoxHeight = 0;
|
|||
*/
|
||||
const struct builtin_class_descr BUTTON_builtin_class =
|
||||
{
|
||||
"Button", /* name */
|
||||
L"Button", /* name */
|
||||
CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */
|
||||
(WNDPROC) ButtonWndProcA, /* procA */
|
||||
(WNDPROC) ButtonWndProcW, /* procW */
|
||||
NB_EXTRA_BYTES, /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
@ -466,6 +465,7 @@ static LRESULT WINAPI ButtonWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
|||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/***********************************************************************
|
||||
* ButtonWndProcA
|
||||
*/
|
||||
|
@ -474,6 +474,7 @@ static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
|
|||
if (!IsWindow( hWnd )) return 0;
|
||||
return ButtonWndProc_common( hWnd, uMsg, wParam, lParam, FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
|
|
@ -74,7 +74,7 @@ static UINT CBitHeight, CBitWidth;
|
|||
#define COMBO_EDITBUTTONSPACE() ( 0 )
|
||||
#define EDIT_CONTROL_PADDING() ( 1 )
|
||||
|
||||
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
// static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
/*********************************************************************
|
||||
|
@ -82,12 +82,11 @@ static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
|||
*/
|
||||
const struct builtin_class_descr COMBO_builtin_class =
|
||||
{
|
||||
"ComboBox", /* name */
|
||||
L"ComboBox", /* name */
|
||||
CS_GLOBALCLASS | CS_PARENTDC | CS_DBLCLKS, /* style */
|
||||
(WNDPROC) ComboWndProcA, /* procA */
|
||||
(WNDPROC) ComboWndProcW, /* procW */
|
||||
sizeof(HEADCOMBO *), /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
@ -2182,6 +2181,7 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
|
|||
DefWindowProcA(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/***********************************************************************
|
||||
* ComboWndProcA
|
||||
*
|
||||
|
@ -2193,6 +2193,7 @@ static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPA
|
|||
if (!IsWindow(hwnd)) return 0;
|
||||
return ComboWndProc_common( hwnd, message, wParam, lParam, FALSE );
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* ComboWndProcW
|
||||
|
|
|
@ -297,12 +297,11 @@ LRESULT CALLBACK EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
*/
|
||||
const struct builtin_class_descr EDIT_builtin_class =
|
||||
{
|
||||
"Edit", /* name */
|
||||
L"Edit", /* name */
|
||||
CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC, /* style */
|
||||
(WNDPROC) EditWndProcA, /* procA */
|
||||
(WNDPROC) EditWndProcW, /* procW */
|
||||
sizeof(EDITSTATE *), /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
|
|
@ -42,12 +42,11 @@ static LRESULT CALLBACK IconTitleWndProc( HWND hWnd, UINT msg, WPARAM wParam, LP
|
|||
*/
|
||||
const struct builtin_class_descr ICONTITLE_builtin_class =
|
||||
{
|
||||
"ICONTITLE_CLASS_ATOM", /* name */
|
||||
L"ICONTITLE_CLASS_ATOM", /* name */
|
||||
CS_GLOBALCLASS, /* style */
|
||||
NULL, /* procA (winproc is Unicode only) */
|
||||
(WNDPROC) IconTitleWndProc, /* procW */
|
||||
0, /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: regcontrol.c,v 1.9 2003/08/15 15:12:14 weiden Exp $
|
||||
/* $Id: regcontrol.c,v 1.10 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User32
|
||||
|
@ -14,25 +14,25 @@
|
|||
|
||||
static void RegisterBuiltinClass(const struct builtin_class_descr *Descr)
|
||||
{
|
||||
WNDCLASSA wca;
|
||||
WNDCLASSW wc;
|
||||
|
||||
wca.lpszClassName = Descr->name;
|
||||
wca.lpfnWndProc = Descr->procA;
|
||||
wca.style = Descr->style;
|
||||
wca.hInstance = NULL;
|
||||
wca.hIcon = NULL;
|
||||
wca.hCursor = LoadCursorA(NULL, Descr->cursor);
|
||||
wca.hbrBackground = Descr->brush;
|
||||
wca.lpszMenuName = NULL;
|
||||
wca.cbClsExtra = 0;
|
||||
wca.cbWndExtra = Descr->extra;
|
||||
wc.lpszClassName = Descr->name;
|
||||
wc.lpfnWndProc = Descr->procW;
|
||||
wc.style = Descr->style;
|
||||
wc.hInstance = NULL;
|
||||
wc.hIcon = NULL;
|
||||
wc.hCursor = LoadCursorW(NULL, Descr->cursor);
|
||||
wc.hbrBackground = Descr->brush;
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = Descr->extra;
|
||||
|
||||
#if 1
|
||||
if(IS_ATOM(wca.lpszClassName))
|
||||
DbgPrint("Registering built-in class atom=0x%x\n", wca.lpszClassName);
|
||||
if(IS_ATOM(wc.lpszClassName))
|
||||
DbgPrint("Registering built-in class atom=0x%x\n", wc.lpszClassName);
|
||||
else
|
||||
DbgPrint("Registering built-in class %s\n", wca.lpszClassName);
|
||||
DbgPrint("RegisterClassA = %d\n", RegisterClassA(&wca));
|
||||
DbgPrint("Registering built-in class %wS\n", wc.lpszClassName);
|
||||
DbgPrint("RegisterClassW = %d\n", RegisterClassW(&wc));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: static.c,v 1.3 2003/06/16 13:46:26 gvg Exp $
|
||||
/* $Id: static.c,v 1.4 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS User32
|
||||
|
@ -18,7 +18,7 @@ static void STATIC_PaintRectfn( HWND hwnd, HDC hdc, DWORD style );
|
|||
static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static LRESULT CALLBACK StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
//static LRESULT CALLBACK StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
static LRESULT CALLBACK StaticWndProcW( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
static COLORREF color_windowframe, color_background, color_window;
|
||||
|
@ -59,12 +59,11 @@ static pfPaint staticPaintFunc[SS_TYPEMASK+1] =
|
|||
*/
|
||||
const struct builtin_class_descr STATIC_builtin_class =
|
||||
{
|
||||
"Static", /* name */
|
||||
L"Static", /* name */
|
||||
CS_GLOBALCLASS | CS_DBLCLKS | CS_PARENTDC, /* style */
|
||||
(WNDPROC) StaticWndProcA, /* procA */
|
||||
(WNDPROC) StaticWndProcW, /* procW */
|
||||
STATIC_EXTRA_BYTES, /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */ /* FIXME Wine uses IDC_ARROWA */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
@ -371,6 +370,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
|
|||
return lResult;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/***********************************************************************
|
||||
* StaticWndProcA
|
||||
*/
|
||||
|
@ -379,6 +379,7 @@ static LRESULT CALLBACK StaticWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPA
|
|||
if (!IsWindow( hWnd )) return 0;
|
||||
return StaticWndProc_common(hWnd, uMsg, wParam, lParam, FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* StaticWndProcW
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: dialog.c,v 1.15 2003/08/09 14:25:07 chorns Exp $
|
||||
/* $Id: dialog.c,v 1.16 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/dialog.c
|
||||
|
@ -121,12 +121,11 @@ typedef struct
|
|||
*/
|
||||
const struct builtin_class_descr DIALOG_builtin_class =
|
||||
{
|
||||
DIALOG_CLASS_ATOMA, /* name */
|
||||
DIALOG_CLASS_ATOMW, /* name */
|
||||
CS_GLOBALCLASS | CS_SAVEBITS | CS_DBLCLKS, /* style */
|
||||
(WNDPROC) DefDlgProcA, /* procA */
|
||||
(WNDPROC) DefDlgProcW, /* procW */
|
||||
sizeof(DIALOGINFO *), /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */
|
||||
0 /* brush */
|
||||
};
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* 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.24 2003/08/15 15:12:14 weiden Exp $
|
||||
/* $Id: menu.c,v 1.25 2003/08/15 15:55:02 weiden Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/windows/menu.c
|
||||
|
@ -68,12 +68,11 @@
|
|||
*/
|
||||
const struct builtin_class_descr POPUPMENU_builtin_class =
|
||||
{
|
||||
POPUPMENU_CLASS_ATOMA, /* name */
|
||||
POPUPMENU_CLASS_ATOMW, /* name */
|
||||
CS_GLOBALCLASS | CS_SAVEBITS | CS_DBLCLKS, /* style */
|
||||
(WNDPROC) NULL, /* FIXME - procA */
|
||||
(WNDPROC) NULL, /* FIXME - procW */
|
||||
sizeof(MENUINFO *), /* extra */
|
||||
(LPCSTR) IDC_ARROW, /* cursor */
|
||||
(LPCWSTR) IDC_ARROW, /* cursor */
|
||||
(HBRUSH)COLOR_MENU /* brush */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue