- register the checklist window class when attached to a process
- fixed usage of image list
Modified: trunk/reactos/lib/aclui/aclui.c
_____
Modified: trunk/reactos/lib/aclui/aclui.c
--- trunk/reactos/lib/aclui/aclui.c 2005-11-04 18:19:09 UTC (rev
19000)
+++ trunk/reactos/lib/aclui/aclui.c 2005-11-04 18:58:38 UTC (rev
19001)
@@ -636,7 +636,6 @@
case PSPCB_RELEASE:
{
DestroySecurityPage(sp);
- UnregisterCheckListControl();
return FALSE;
}
}
@@ -1214,15 +1213,20 @@
MAKEINTRESOURCE(IDB_USRGRPIMAGES),
16,
3,
- 0);
+ RGB(255,
+ 0,
+ 255));
/* setup the listview control */
-
ListView_SetExtendedListViewStyleEx(sp->hWndPrincipalsList,
-
LVS_EX_FULLROWSELECT,
-
LVS_EX_FULLROWSELECT);
- ListView_SetImageList(sp->hWndPrincipalsList,
- sp->hiPrincipals,
- LVSIL_SMALL);
+ if (sp->hiPrincipals != NULL)
+ {
+
ListView_SetExtendedListViewStyleEx(sp->hWndPrincipalsList,
+
LVS_EX_FULLROWSELECT,
+
LVS_EX_FULLROWSELECT);
+ ListView_SetImageList(sp->hWndPrincipalsList,
+ sp->hiPrincipals,
+ LVSIL_SMALL);
+ }
GetClientRect(sp->hWndPrincipalsList,
&rcLvClient);
@@ -1329,12 +1333,6 @@
return NULL;
}
- if (!RegisterCheckListControl(hDllInstance))
- {
- DPRINT("Registering the CHECKLIST_ACLUI class failed!\n");
- return NULL;
- }
-
sPage = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
sizeof(SECURITY_PAGE));
@@ -1468,12 +1466,21 @@
{
case DLL_PROCESS_ATTACH:
hDllInstance = hinstDLL;
+
+ DisableThreadLibraryCalls(hinstDLL);
+
+ if (!RegisterCheckListControl(hinstDLL))
+ {
+ DPRINT("Registering the CHECKLIST_ACLUI class
failed!\n");
+ return FALSE;
+ }
break;
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
+
case DLL_PROCESS_DETACH:
+ UnregisterCheckListControl();
break;
}
+
return TRUE;
}