Author: jimtabor
Date: Thu Jul 16 21:07:04 2009
New Revision: 41993
URL:
http://svn.reactos.org/svn/reactos?rev=41993&view=rev
Log:
- Implementation of registering system atom listings with table references. Se bug 4705.
Modified:
trunk/reactos/subsystems/win32/win32k/ntuser/class.c
trunk/reactos/subsystems/win32/win32k/ntuser/window.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/class.c [iso-8859-1] Thu Jul 16 21:07:04
2009
@@ -35,6 +35,43 @@
#define WARN DPRINT1
#define ERR DPRINT1
+static struct
+{
+ int FnId;
+ INT ClsId;
+} FnidToiCls[] =
+{
+ { FNID_BUTTON, ICLS_BUTTON},
+ { FNID_EDIT, ICLS_EDIT},
+ { FNID_STATIC, ICLS_STATIC},
+ { FNID_LISTBOX, ICLS_LISTBOX},
+ { FNID_SCROLLBAR, ICLS_SCROLLBAR},
+ { FNID_COMBOBOX, ICLS_COMBOBOX},
+ { FNID_MDICLIENT, ICLS_MDICLIENT},
+ { FNID_COMBOLBOX, ICLS_COMBOLBOX},
+ { FNID_DIALOG, ICLS_DIALOG},
+ { FNID_MENU, ICLS_MENU},
+ { FNID_ICONTITLE, ICLS_ICONTITLE}
+};
+
+static
+BOOL
+FASTCALL
+LockupFnIdToiCls(int FnId, int *iCls )
+{
+ int i;
+
+ for ( i = 0; i < 10; i++)
+ {
+ if (FnidToiCls[i].FnId == FnId)
+ {
+ *iCls = FnidToiCls[i].ClsId;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
/* WINDOWCLASS ***************************************************************/
static VOID
@@ -1869,7 +1906,13 @@
pi);
if (Class != NULL)
{
+ int iCls;
+
Class->fnID = SystemClasses[i].ClassId;
+ if (LockupFnIdToiCls(Class->fnID, &iCls))
+ {
+ gpsi->atomSysClass[iCls] = Class->Atom;
+ }
ASSERT(Class->System);
Class->Next = pi->SystemClassList;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Thu Jul 16 21:07:04
2009
@@ -2248,11 +2248,10 @@
}
}
- /* BugBoy Comments: if the window being created is a edit control, ATOM 0xC007,
+ /* BugBoy Comments: if the window being created is a edit control, ATOM 0xCxxx,
then my testing shows that windows (2k and XP) creates a CallProc for it
immediately
Dont understand why it does this. */
-// if (ClassAtom == gpsi->atomSysClass[ICLS_EDIT]) <--- real fix!
- if (ClassAtom == 0XC008) // <--- HACK!!!!
+ if (ClassAtom == gpsi->atomSysClass[ICLS_EDIT])
{
PCALLPROC CallProc;
//CallProc = CreateCallProc(NULL, Wnd->WndProc, bUnicodeWindow,
Wnd->ti->ppi);