1 added + 6 modified, total 7 files
reactos/lib/aclui
diff -u -r1.3 -r1.4
--- Makefile 11 Aug 2004 01:21:52 -0000 1.3
+++ Makefile 14 Aug 2004 11:50:25 -0000 1.4
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3 2004/08/11 01:21:52 weiden Exp $
+# $Id: Makefile,v 1.4 2004/08/14 11:50:25 weiden Exp $
PATH_TO_TOP = ../..
@@ -16,6 +16,7 @@
-DUNICODE \
-D_UNICODE \
-D__REACTOS__ \
+ -D_WIN32_IE=0x0500 \
-D_WIN32_WINNT=0x501 \
-DWINVER=0x600 \
-Wall \
reactos/lib/aclui
diff -u -r1.5 -r1.6
--- aclui.c 14 Aug 2004 00:46:54 -0000 1.5
+++ aclui.c 14 Aug 2004 11:50:25 -0000 1.6
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: aclui.c,v 1.5 2004/08/14 00:46:54 weiden Exp $
+/* $Id: aclui.c,v 1.6 2004/08/14 11:50:25 weiden Exp $
*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/aclui.c
@@ -28,6 +28,7 @@
*/
#define INITGUID
#include <windows.h>
+#include <commctrl.h>
#include <prsht.h>
#include <aclui.h>
#include <rosrtl/resstr.h>
@@ -36,38 +37,39 @@
HINSTANCE hDllInstance;
-
-
-BOOL STDCALL
-DllMain(HINSTANCE hinstDLL,
- DWORD dwReason,
- LPVOID lpvReserved)
-{
- switch (dwReason)
- {
- case DLL_PROCESS_ATTACH:
- hDllInstance = hinstDLL;
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
-}
-
-
UINT CALLBACK
SecurityPageCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
{
switch(uMsg)
{
case PSPCB_CREATE:
- return TRUE;
+ {
+ PSECURITY_PAGE sp;
+
+ sp = LocalAlloc(LHND, sizeof(SECURITY_PAGE));
+ if(sp != NULL)
+ {
+ /* save the pointer to the ISecurityInformation interface */
+ sp->psi = (LPSECURITYINFO)ppsp->lParam;
+ /* set the lParam to the allocated structure */
+ ppsp->lParam = (LPARAM)sp;
+ return TRUE;
+ }
+ return FALSE;
+ }
case PSPCB_RELEASE:
+ {
+ if(ppsp->lParam != 0)
+ {
+ PSECURITY_PAGE sp = (PSECURITY_PAGE)ppsp->lParam;
+ if(sp->hiUsrs != NULL)
+ {
+ ImageList_Destroy(sp->hiUsrs);
+ }
+ LocalFree((HLOCAL)sp);
+ }
return FALSE;
+ }
}
return FALSE;
@@ -77,6 +79,42 @@
INT_PTR CALLBACK
SecurityPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
+ PSECURITY_PAGE sp;
+
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ sp = (PSECURITY_PAGE)lParam;
+ if(sp != NULL)
+ {
+ LV_COLUMN lvc;
+ RECT rcLvClient;
+
+ sp->hWnd = hwndDlg;
+ sp->hWndUsrList = GetDlgItem(hwndDlg, IDC_ACELIST);
+ sp->hiUsrs = ImageList_LoadBitmap(hDllInstance, MAKEINTRESOURCE(IDB_USRGRPIMAGES), 16, 3, 0);
+
+ /* save the pointer to the structure */
+ SetWindowLong(hwndDlg, DWL_USER, (LONG)sp);
+
+ GetClientRect(sp->hWndUsrList, &rcLvClient);
+
+ /* setup the listview control */
+ ListView_SetExtendedListViewStyleEx(sp->hWndUsrList, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
+ ListView_SetImageList(sp->hWndUsrList, sp->hiUsrs, LVSIL_SMALL);
+
+ /* add a column to the list view */
+ lvc.mask = LVCF_FMT | LVCF_WIDTH;
+ lvc.fmt = LVCFMT_LEFT;
+ lvc.cx = rcLvClient.right;
+ ListView_InsertColumn(sp->hWndUsrList, 0, &lvc);
+
+ /* FIXME - hide controls in case the flags aren't present */
+ }
+ break;
+ }
+ }
return 0;
}
@@ -209,3 +247,23 @@
return Ret;
}
+BOOL STDCALL
+DllMain(HINSTANCE hinstDLL,
+ DWORD dwReason,
+ LPVOID lpvReserved)
+{
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ hDllInstance = hinstDLL;
+ break;
+ case DLL_THREAD_ATTACH:
+ break;
+ case DLL_THREAD_DETACH:
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
reactos/lib/aclui
diff -u -r1.2 -r1.3
--- aclui.rc 10 Aug 2004 15:47:54 -0000 1.2
+++ aclui.rc 14 Aug 2004 11:50:25 -0000 1.3
@@ -37,5 +37,6 @@
END
END
+IDB_USRGRPIMAGES BITMAP "res/usrgrp.bmp"
#include "aclui_En.rc"
reactos/lib/aclui
diff -u -r1.2 -r1.3
--- aclui_En.rc 11 Aug 2004 01:21:53 -0000 1.2
+++ aclui_En.rc 14 Aug 2004 11:50:25 -0000 1.3
@@ -10,7 +10,11 @@
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "&Group or user names:", -1, 7, 7, 105, 8
- CONTROL "", IDC_GRPUSRLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
+ CONTROL "", IDC_ACELIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
+ PUSHBUTTON "A&dd...", IDC_ACELIST_ADD, 116, 87, 50, 14
+ PUSHBUTTON "&Remove", IDC_ACELIST_REMOVE, 170, 87, 50, 14
+ LTEXT "Allow", -1, 135, 107, 32, 8, SS_CENTER
+ LTEXT "Deny", -1, 176, 107, 32, 8, SS_CENTER
END
STRINGTABLE DISCARDABLE
reactos/lib/aclui
diff -u -r1.2 -r1.3
--- internal.h 10 Aug 2004 15:47:54 -0000 1.2
+++ internal.h 14 Aug 2004 11:50:25 -0000 1.3
@@ -6,6 +6,14 @@
extern HINSTANCE hDllInstance;
+typedef struct _SECURITY_PAGE
+{
+ HWND hWnd;
+ HWND hWndUsrList;
+ HIMAGELIST hiUsrs;
+ LPSECURITYINFO psi;
+} SECURITY_PAGE, *PSECURITY_PAGE;
+
#endif /* __ACLUI_INTERNAL_H */
/* EOF */
reactos/lib/aclui
diff -u -r1.3 -r1.4
--- resource.h 11 Aug 2004 01:21:53 -0000 1.3
+++ resource.h 14 Aug 2004 11:50:25 -0000 1.4
@@ -1,14 +1,18 @@
#ifndef __ACLUI_RESOURCE_H
#define __ACLUI_RESOURCE_H
-#define IDD_SECPAGE 101
+#define IDD_SECPAGE 101
-#define IDC_GRPUSRLIST 1001
+#define IDC_ACELIST 1001
+#define IDC_ACELIST_ADD 1002
+#define IDC_ACELIST_REMOVE 1003
#define IDI_DEVMGR 100
#define IDS_PSP_TITLE 1001
+#define IDB_USRGRPIMAGES 1001
+
#endif /* __ACLUI_RESOURCE_H */
/* EOF */
CVSspam 0.2.8