- Implementation of registering system atom listings with table references. Se bug 4705.

svn path=/trunk/; revision=41993
This commit is contained in:
James Tabor 2009-07-16 19:07:04 +00:00
parent 6e038baa16
commit bcbeefce98
2 changed files with 45 additions and 3 deletions

View file

@ -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 @@ UserRegisterSystemClasses(IN ULONG Count,
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;

View file

@ -2248,11 +2248,10 @@ AllocErr:
}
}
/* 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);